Skip to content

Commit

Permalink
Create evaluate_model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AKSHITHA-CHILUKA authored Jul 29, 2024
1 parent 8969ade commit a9edbc0
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pandas as pd
from sklearn.metrics import mean_squared_error
import joblib
def evaluate_model(df, model):
X = df.drop('target', axis=1)
y = df['target']
predictions = model.predict(X)
mse = mean_squared_error(y, predictions)
print(f'Mean Squared Error: {mse}')
if __name__ == "__main__":
df = pd.read_csv('path/to/features_data.csv')
model = joblib.load('path/to/model.pkl')
evaluate_model(df, model)

0 comments on commit a9edbc0

Please sign in to comment.