lib/vowpalwabbit/classifier.rb in vowpalwabbit-0.1.1 vs lib/vowpalwabbit/classifier.rb in vowpalwabbit-0.1.2
- old
+ new
@@ -1,8 +1,8 @@
module VowpalWabbit
class Classifier < Model
def initialize(**params)
- super({loss_function: "logistic"}.merge(params))
+ super(loss_function: "logistic", **params)
end
def predict(x)
predictions = super
predictions.map { |v| v >= 0 ? 1 : -1 }