lib/eps/base_estimator.rb in eps-0.2.0 vs lib/eps/base_estimator.rb in eps-0.2.1
- old
+ new
@@ -10,18 +10,16 @@
x.each { |r| r.delete(target) } if target
end
y = prep_y(y.to_a)
- @target = target || "target"
-
if x.size != y.size
raise "Number of samples differs from target"
end
@x = x
@y = y
- @target = target
+ @target = target || "target"
end
def predict(x)
singular = !(x.is_a?(Array) || daru?(x))
x = [x] if singular