python 多层感知器 sklearn.neural_network MLPClassifier.predict()函数
生活随笔
收集整理的這篇文章主要介紹了
python 多层感知器 sklearn.neural_network MLPClassifier.predict()函数
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
官方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()] 的列數(shù)要跟X.train的列數(shù)一致, 否則無法predict.
總結(jié)
以上是生活随笔為你收集整理的python 多层感知器 sklearn.neural_network MLPClassifier.predict()函数的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Intel RealSense D435
- 下一篇: python sklearn.neura