Added modeling section

This commit is contained in:
Drew Giffin
2025-10-21 16:49:11 -04:00
parent 01b815deeb
commit b5f6069cea
2 changed files with 11 additions and 9 deletions
+4 -7
View File
@@ -41,8 +41,8 @@ def main():
# evaluation
le = get_label_encoder(df_clean)
# draw_feature_importance(model, X)
draw_confusion_matrix(y_test, y_pred, le)
draw_classification_report(y_test, y_pred, le)
# draw_confusion_matrix(y_test, y_pred, le)
# draw_classification_report(y_test, y_pred, le)
evaluate_accuracy(y_test, y_pred)
def evaluate_accuracy(y_test, y_pred):
@@ -134,12 +134,9 @@ def draw_feature_importance(model, X):
plt.show()
def train_logistic_regression(X_train, y_train):
model = LogisticRegression(
solver='lbfgs',
max_iter=10000
)
model = LogisticRegression()
model.fit(X_train, y_train)
return model
return model
def load_data():
df = pd.read_csv(data_path, encoding="ascii", delimiter=",")