Skip to content

Commit

Permalink
Update submission.py
Browse files Browse the repository at this point in the history
Removed test submission function
  • Loading branch information
AdrienneMendrik authored Mar 10, 2024
1 parent a2c4f43 commit 0034d45
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,3 @@ def predict_outcomes(df):
predictions = model.predict(df)
# Return the result as a Pandas DataFrame with the columns "nomem_encr" and "prediction"
return pd.concat([nomem_encr, pd.Series(predictions, name="prediction")], axis=1)


def test_submission(df, model_path="./model.joblib"):
"""Test if the code will work"""
# Load fake data
df = pd.read_csv(os.path.join(os.path.dirname(__file__), "data/fake_data.csv"))
ids = df[["nomem_encr"]]

# Clean data as you did before the model
df = clean_df(df)

# Load model
model = load(model_path)

# Create prediction
ids["prediction"] = model.predict(df)
return ids

0 comments on commit 0034d45

Please sign in to comment.