lib/eps/linear_regression.rb in eps-0.3.4 vs lib/eps/linear_regression.rb in eps-0.3.5

- old
+ new

@@ -35,10 +35,11 @@ str += "r2: %.3f\n" % [r2] if extended str += "adjusted r2: %.3f\n" % [adjusted_r2] str end + # TODO use keyword arguments for gsl and intercept in 0.4.0 def _train(**options) raise "Target must be numeric" if @target_type != "numeric" check_missing_value(@train_set) check_missing_value(@validation_set) if @validation_set @@ -59,10 +60,10 @@ :gslr else false end - intercept = @options.key?(:intercept) ? @options[:intercept] : true + intercept = options.key?(:intercept) ? options[:intercept] : true if intercept && gsl != :gslr data.size.times do |i| x[i].unshift(1) end end