Skip to content

Commit

Permalink
Fixed CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Oct 23, 2024
1 parent b687822 commit fd7b39f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/vowpalwabbit_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def test_regressor
x = [[1, 2], [3, 4], [5, 6], [7, 8]]
y = [1, 2, 3, 4]

model = VowpalWabbit::Regressor.new(learning_rate: 100)
model = VowpalWabbit::Regressor.new(learning_rate: 100, power_t: 1)
assert_nil model.fit(x, y)

tempfile = Tempfile.new("vowpal-wabbit")
Expand Down Expand Up @@ -33,7 +33,7 @@ def test_classifier
end

def test_regressor_file
model = VowpalWabbit::Regressor.new(learning_rate: 100)
model = VowpalWabbit::Regressor.new(learning_rate: 100, power_t: 1)
assert_nil model.fit("test/support/regressor.txt")
assert_in_delta 0.3333333432674408, model.intercept
assert_equal [1.0, 2.0, 3.0, 4.0], model.predict("test/support/regressor.txt")
Expand All @@ -48,7 +48,7 @@ def test_classifier_file
end

def test_compressed_file
model = VowpalWabbit::Regressor.new(l: 100)
model = VowpalWabbit::Regressor.new(l: 100, power_t: 1)
assert_nil model.fit("test/support/regressor.txt.gz")
assert_in_delta 0.3333333432674408, model.intercept
assert_equal [1.0, 2.0, 3.0, 4.0], model.predict("test/support/regressor.txt.gz")
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_numo
x = Numo::DFloat.cast([[1, 2], [3, 4], [5, 6], [7, 8]])
y = Numo::DFloat.cast([1, 2, 3, 4])

model = VowpalWabbit::Regressor.new(l: 100)
model = VowpalWabbit::Regressor.new(l: 100, power_t: 1)
assert_nil model.fit(x, y)
assert_in_delta 0.3333333432674408, model.intercept
assert_equal [1.0, 2.0, 3.0, 4.0], model.predict(x)
Expand Down

0 comments on commit fd7b39f

Please sign in to comment.