Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
arwas11 committed Dec 5, 2024
1 parent 47977dc commit 289a978
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/system/small/ml/test_linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,12 @@ def test_linear_reg_model_predict(penguins_linear_model, new_penguins_df):
def test_linear_reg_model_predict_explain(penguins_linear_model, new_penguins_df):
predictions = penguins_linear_model.predict_explain(new_penguins_df).to_pandas()
assert predictions.shape == (3, 12)
result = predictions[["predicted_body_mass_g"]]
result = predictions[["predicted_body_mass_g", "baseline_prediction_value"]]
expected = pandas.DataFrame(
{"predicted_body_mass_g": [4030.1, 3280.8, 3177.9]},
{
"predicted_body_mass_g": [4030.1, 3280.8, 3177.9],
"baseline_prediction_value": [9362.7, 9362.7, 9362.7],
},
dtype="Float64",
index=pandas.Index([1633, 1672, 1690], name="tag_number", dtype="Int64"),
)
Expand Down

0 comments on commit 289a978

Please sign in to comment.