Как повысить точность модели MMLPRegressor в sklearn.neural_network.MLPRegressor?Python

Программы на Python
Anonymous
Как повысить точность модели MMLPRegressor в sklearn.neural_network.MLPRegressor?

Сообщение Anonymous »


I want to train a multi-layer neural network model on my dataset and the best fit I found was using the 'MLPRegressor'.

The dataset is: https://www.kaggle.com/datasets/dwiknrd ... prediction

dataset = pd.read_csv('maintenance_servicehours.csv') X = dataset.drop(columns=['GearSelect', 'ServiceHours']) y = dataset['GearSelect'] X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) regr = MLPRegressor(hidden_layer_sizes=(50, 100, 20), solver = 'adam', learning_rate=('adaptive'), tol = 1e-4, n_iter_no_change= 10, random_state = 1, max_iter = 20000) regr.fit(X_train, y_train) regr.score(X_test, y_test) #gives between 0.68-0.72 I used 3 hidden layers, each with No. of neurons 50, 100, 20 each respectively. then trained the data on X_train and y_train.

i was hoping for score of the model to be somewhere around 90% but I am continually getting somewhere between 68%-72%. any way to improve this score? any help would be appreciated. Because the predicted data on this score is not anywhere near close to the actual output.

Also my iterations usually stops in the somewhere below 200 which is I guess is not good? could that be a reason.

To improve the score, I have already tried these:
  • Adjust the hidden layers and No. of neuron on each layer.
  • changed the solver from 'adam' and 'sgd'
  • learning_rate
  • tol
  • n_iter_no_change

I also tried to adjust the 'n_iter_no_change' and increase it so that more iterations could happen and result in an improved score but it stay the same betweek 68%-72%


Источник: https://stackoverflow.com/questions/780 ... etwork-mlp

Вернуться в «Python»