python 多层感知器 sklearn.neural_network MLPClassifier.predict()函数
生活随笔
收集整理的这篇文章主要介绍了
python 多层感知器 sklearn.neural_network MLPClassifier.predict()函数
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
官方doc:
Signature: mlp.predict(X) Docstring: Predict using the multi-layer
perceptron classifier
Parameters
---------- X : {array-like, sparse matrix}, shape (n_samples, n_features)
The input data.
Returns
------- y : array-like, shape (n_samples,) or (n_samples, n_classes)
The predicted classes. File: c:\users\huawei\appdata\local\programs\python\python36\lib\site-packages\sklearn\neural_network\multilayer_perceptron.py
Type: method
如:
Z=mlp.predict(np.c_[xx.ravel(),yy.ravel()])其中, np.c_[xx.ravel(),yy.ravel()] 的列数要跟X.train的列数一致, 否则无法predict.
总结
以上是生活随笔为你收集整理的python 多层感知器 sklearn.neural_network MLPClassifier.predict()函数的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Intel RealSense D435
- 下一篇: python sklearn.neura