summaryrefslogtreecommitdiff
path: root/log_reg
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-06-10 14:48:34 +0200
committerPatrick Simianer <p@simianer.de>2015-06-10 14:48:34 +0200
commit8151031373c08ccd714a99f50783eafcb54d2010 (patch)
tree1bcf6e78392978f4ae972a5dcc936a4c266f3d78 /log_reg
parente137509a77e3a8c12af32852ebba893dacb53f85 (diff)
undo unfortunate variable naming: cfg -> conf!
Diffstat (limited to 'log_reg')
-rwxr-xr-xlog_reg6
1 files changed, 3 insertions, 3 deletions
diff --git a/log_reg b/log_reg
index 3916d0c..82dc353 100755
--- a/log_reg
+++ b/log_reg
@@ -36,14 +36,14 @@ def approx_eql x, y, eps=10**-10
end
def main
- cfg = Trollop::options do
+ conf = Trollop::options do
opt :input, "input data", :type => :string, :required => true
opt :output, "1/0 output data", :type => :string, :required => true
end
- data = read_data cfg[:input]
+ data = read_data conf[:input]
dim = data[0].size
zeros = [0.0]*dim
- t = ReadFile.readlines(cfg[:output]).map{ |i| i.to_f }
+ t = ReadFile.readlines(conf[:output]).map{ |i| i.to_f }
model = Vector.elements zeros
prev_model = nil
gradient = Vector.elements zeros