title: How to use a custom loss function in a Neural Network with MLPClassifier Sklearn?
body: <p>I would like to use a custom loss function to train a neural network in scikit learn; using MLPClassifier. I would like to give more importance to larger values. Therefore, I would like to use something like the mean square error but multiplying the numerator by y. Thus, it would look like :</p>
  
  <p>1/n∑y(yi-y(hat)i)^2</p>
  
  <p>Here is the code of my model: </p>
  
  <pre><code>mlp10 = MLPClassifier(hidden_layer_sizes=(150,100,50,25,10), max_iter=1000, 
  random_state=42)
  mlp10.fit(X_train, y_train)
  </code></pre>
  
  <p>How can I modify the loss function ? </p>