Split Iris using the same 70/30 split as above, and fit StandardScaler only on Train.
Procedure
Compare LogisticRegression(max_iter=500) and MLPClassifier(hidden_layer_sizes=(16,),max_iter=300,random_state=7).
Record Train Accuracy, Test Accuracy, and whether convergence warnings occurred.
Results to retain
A table of both models and Test Confusion Matrices.
Items to record and points to check
Model
Train Accuracy
Test Accuracy
Iteration count and warnings
Points to check
Did you avoid refitting the scaler on test data?
Did you avoid hiding warnings and assuming that the result had converged?
2. Comparing Network Sizes
Starting conditions
Change only MLP's hidden_layer_sizes to (4,),(16,),(32,), and compare using the same metrics.
Procedure
Reuse the preceding Train/Test split and Scaler fitted on Train. Train MLPs by changing only hidden_layer_sizes to (4,), (16,), and (32,).
Keep max_iter=300, random_state=7, and the other settings unchanged. Record hidden size, train accuracy, test accuracy, and whether convergence warnings occur in a table.
Explain how Train Accuracy and Test Accuracy each change as Hidden size increases, distinguishing cases with and without warnings.
Results to retain
A table comparing Accuracy and convergence warnings by Hidden size.
Items to record and points to check
Hidden size
Train Accuracy
Test Accuracy
Convergence warnings
Points to check
Did you use the same split and preprocessing for each model?
3. Checking Other Inputs
Starting conditions
Compare the same two models with split seed=11 and examine variability in a small dataset.
Procedure
Change only the split Seed to 11, refit the Scaler on the new Train set, and transform Train and Test.
Retrain the Logistic Regression and Hidden (16,) MLP from Activity 1 on the new Train set with the same settings.
Tabulate split seed, model name, Train Accuracy, and Test Accuracy, and compare with the two-model comparison at seed 7. Explain how changing the Test samples affected the comparison.
Results to retain
A table of both models' Accuracy for each shared split and changes in the comparison results.
Items to record and points to check
Split Seed
Model and settings
Train·Test Accuracy
Comparing Different Splits
Points to check
Did you refit the scaler only on the new train data?