当前位置:网站首页>AttributeError: ‘HistGradientBoostingClassifier‘ object has no attribute ‘_ n_ features‘
AttributeError: ‘HistGradientBoostingClassifier‘ object has no attribute ‘_ n_ features‘
2022-06-11 05:28:00 【Always happy old pea】
Preface
Project started normally , Call interface error
The error information is as follows
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py", line 1379, in predict_proba
raw_predictions = self._raw_predict(X)
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py", line 739, in _raw_predict
if X.shape[1] != self._n_features:
AttributeError: 'HistGradientBoostingClassifier' object has no attribute '_n_features'
[13/Aug/2021 06:50:40] "POST /helmet/data/ HTTP/1.1" 200 55
Current system time :2021-08-13 06:50:41
Current attention :1
This request took :313 ms
[13/Aug/2021 06:50:41] "POST /helmet/data/ HTTP/1.1" 200 120
Current fatigue value :3.613793103448276
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator GradientBoostingClassifier from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator HistGradientBoostingClassifier from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator RandomForestClassifier from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator LabelEncoder from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator DummyClassifier from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator DecisionTreeRegressor from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator _BinMapper from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator VotingClassifier from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator GradientBoostingRegressor from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator HistGradientBoostingRegressor from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator RandomForestRegressor from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator DummyRegressor from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/base.py:315: UserWarning: Trying to unpickle estimator VotingRegressor from version 0.23.2 when using version 0.24.2. This might lead to breaking code or invalid results. Use at your own risk.
UserWarning)
Traceback (most recent call last):
File "/usr/local/python/anqunmao/Helmet/interface/data_process.py", line 85, in helmet_data_process
dizziness_state = dizziness.make_prediction(primary_data_list_2)
File "/usr/local/python/anqunmao/Helmet/algorithm/dizziness_lib/dizziness.py", line 189, in make_prediction
y_class_pre = model_class.predict(df_eeg)
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_voting.py", line 309, in predict
maj = np.argmax(self.predict_proba(X), axis=1)
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_voting.py", line 329, in _predict_proba
avg = np.average(self._collect_probas(X), axis=0,
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_voting.py", line 324, in _collect_probas
return np.asarray([clf.predict_proba(X) for clf in self.estimators_])
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_voting.py", line 324, in <listcomp>
return np.asarray([clf.predict_proba(X) for clf in self.estimators_])
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py", line 1379, in predict_proba
raw_predictions = self._raw_predict(X)
File "/root/.local/share/virtualenvs/Helmet-HSTij6Wf/lib/python3.6/site-packages/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py", line 739, in _raw_predict
if X.shape[1] != self._n_features:
AttributeError: 'HistGradientBoostingClassifier' object has no attribute '_n_features'
terms of settlement
It is caused by the inconsistency between the local version and the server version when locating , So change it to be consistent
边栏推荐
- Oh my Zsh correct installation posture
- SwiftUI: Navigation all know
- 49. 字母异位词分组
- Wxparse parsing iframe playing video
- go MPG
- 课程设计总结
- Use acme SH automatically apply for a free SSL certificate
- Concurrent search set
- Section IV: composition and materials of asphalt mixture (2) -- main materials of asphalt
- Target detection - personal understanding of RCNN series
猜你喜欢
![[NIPS2021]MLP-Mixer: An all-MLP Architecture for Vision](/img/89/66c30ea8d7969fef76785da1627ce5.jpg)
[NIPS2021]MLP-Mixer: An all-MLP Architecture for Vision

Why is the smart door lock so popular? What about the smart door locks of MI family and zhiting?

Restoration of binary tree -- number restoration

Preliminary understanding of DFS and BFS

(15) Infrared communication

BERT知识蒸馏

智能门锁为什么会这么火,米家和智汀的智能门锁怎么样呢?

22. Generate parentheses

White Gaussian noise (WGN)

KD-Tree and LSH
随机推荐
QT Road (1) -- Introduction to pro file
How to make lamps intelligent? How to choose single fire and zero fire intelligent switches!
Handle double quotation mark escape in JSON string
C (I) C basic grammar all in one
[opencv learning problems] 1 Namedwindow() and imshow() show two windows in the picture
Traversal of binary tree -- restoring binary tree by two different Traversals
35. search insertion position
The central rural work conference has released important signals. Ten ways for AI technology to help agriculture can be expected in the future
【深入kotlin】 - Flow 进阶
Emnlp2021 𞓜 a small number of data relation extraction papers of deepblueai team were hired
1. use alicloud object OSS (basic)
Oh my Zsh correct installation posture
BP neural network derivation + Example
JS promise, async, await simple notes
智能门锁为什么会这么火,米家和智汀的智能门锁怎么样呢?
Minimize maximum
GAMES101作业7-Path Tracing实现过程&代码详细解读
Thesis 𞓜 jointly pre training transformers on unpaired images and text
Basics of customized view
Share 𞓜 jointly pre training transformers on unpaired images and text