Question 19
You're working on a binary classification task using the ‘MLPClassifier’ to predict whether a customer will make a purchase based on their browsing behavior. You're concerned about underfitting due to the complexity of the data. You decide to increase the ‘alpha’ parameter to control underfitting. The following code snippet shows the application of ‘MLPClassifier’:
from sklearn.neural_network import MLPClassifierimport numpy as np
data = np.array([[10, 3], [20, 5], [5, 1], [15, 4], [8, 2]])
# Corresponding target labels (0: No Purchase, 1: Purchase)target = np.array([0, 1, 0, 1, 0])
# Initialize MLPClassifier with alpha parameterclf = MLPClassifier(alpha=0.001, random_state=42)clf.fit(data, target)
# Predict class labelspredicted_labels = clf.predict(data)By setting/changing the ‘alpha’ parameter to 0.01, how are you affecting the neural network model's behavior?
Increasing the model’s complexity to fit the training data more closely.
Adding a stronger regularization term to the loss function, discouraging complex models.
Making the model more capable to learn more complex behaviour.
Adjusting the learning rate to control convergence speed.