简体   繁体   中英

Neural network Perceptron algorithm Sklearn

I want to optimize the weights by different algorithms like adam; stochastic gradient descent etc and try different activation function using a perceptron of sklearn as below:

I did not found in sklearn how to do that any suggestion ???

Perceptron(alpha=0.0001, class_weight=None, eta0=1.0, fit_intercept=True,
      max_iter=10, n_iter=None, n_jobs=1, penalty=None, random_state=42,
      shuffle=True, tol=None, verbose=0, warm_start=False)

Perceptron() is equivalent to SGDClassifier(loss=”perceptron”, eta0=1, learning_rate=”constant”, penalty=None) so is using SGD by design.

What you're looking for is I think sklearn.neural_network.MLPClassifier

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM