<jupyter_start><jupyter_text>PredictionI think the random forest model will do better because the ability to increase the n_estimators will help the model training<jupyter_code># Train the Logistic Regression model on the unscaled data and print the model score
classifier = LogisticRegression().fit(x_train, y_train)
print(f"Training Data Score: {classifier.score(x_train, y_train)}")
print(f"Testing Data Score: {classifier.score(x_test, y_test)}")
# Train a Random Forest Classifier model and print the model score
RFclassifier = RandomForestClassifier(random_state=1, n_estimators=25).fit(x_train, y_train)
print(f'Training Score: {RFclassifier.score(x_train, y_train)}')
print(f'Testing Score: {RFclassifier.score(x_test, y_test)}')<jupyter_output>Training Score: 0.9986863711001642
Testing Score: 0.6261165461505742<jupyter_text>Model ComparisionAs expected, the random forest model did better with both the training and testing score, tho it seems to be over fitting<jupyter_code># Scale the data
scaler = StandardScaler().fit(x_train)
x_train_scaled = scaler.transform(x_train)
x_test_scaled = scaler.transform(x_test)<jupyter_output><empty_output><jupyter_text>PredictionSince the random forest did better in the intial test, I think it will again do better than the logistic regression model.<jupyter_code># Train the Logistic Regression model on the scaled data and print the model score
scaled_classifier = LogisticRegression().fit(x_train_scaled, y_train)
print(f'Training Score: {scaled_classifier.score(x_train_scaled, y_train)}')
print(f'Testing Score: {scaled_classifier.score(x_test_scaled, y_test)}')
# Train a Random Forest Classifier model on the scaled data and print the model score
scaled_RFclassifier = RandomForestClassifier(random_state=1, n_estimators=25).fit(x_train_scaled, y_train)
print(f'Training Score: {scaled_RFclassifier.score(x_train_scaled, y_train)}')
print(f'Testing Score: {scaled_RFclassifier.score(x_test_scaled, y_test)}')<jupyter_output>Training Score: 0.9986863711001642
Testing Score: 0.6273925988940876
StarcoderdataJupyterStructuredCleanDedup