Update app/modelling.py
Browse files- app/modelling.py +4 -10
app/modelling.py
CHANGED
@@ -33,16 +33,10 @@ def train(dataset):
|
|
33 |
model.fit(X_train,y_train)
|
34 |
predict=model.predict(X_test)
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
joblib.dump(transform,transform_pth)
|
42 |
-
joblib.dump(encoder,encoder_pth)
|
43 |
-
joblib.dump(model,model_pth)
|
44 |
-
|
45 |
-
return {"Accuracy":f"{accuracy_score(y_test,predict):4f}",
|
46 |
"F1_Score":f"{f1_score(y_test,predict):4f}"}
|
47 |
|
48 |
|
|
|
33 |
model.fit(X_train,y_train)
|
34 |
predict=model.predict(X_test)
|
35 |
|
36 |
+
return {"model":model,
|
37 |
+
"encoder":encoder,
|
38 |
+
"transform":transform,
|
39 |
+
"Accuracy":f"{accuracy_score(y_test,predict):4f}",
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
"F1_Score":f"{f1_score(y_test,predict):4f}"}
|
41 |
|
42 |
|