成功解决xgboost\core.py:614: UserWarning: Use subset (sliced data) of np.ndarray is not recommended beca

简介: 成功解决xgboost\core.py:614: UserWarning: Use subset (sliced data) of np.ndarray is not recommended beca

解决问题


xgboost\core.py:614: UserWarning: Use subset (sliced data) of np.ndarray is not recommended because it will generate extra copies and increase memory consumption

 "because it will generate extra copies and increase memory consumption")




解决思路


错误地址:xgboost\core.py:614

用户警告:

使用np.ndarray的子集(切片数据),不推荐使用np.ndarray,因为它会生成额外的副本并增加内存消耗

“因为它会生成额外的副本,并增加内存消耗”




解决方法


此信息提示为警告,而不是error,即使不处理也不会影响代码编程的运行。如果想要去掉,可以更新库至最新版本!

然后根据要求提示修改使用方法!

在进行sliced data时,' np.ndarray '方法不再推荐使用!



相关文章
|
TensorFlow API 算法框架/工具
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
321 0
解决AttributeError: module ‘keras.utils‘ has no attribute ‘plot_model‘
|
网络虚拟化
在torch_geometric.datasets中使用Planetoid手动导入Core数据集及发生相关错误解决方案
在torch_geometric.datasets中使用Planetoid手动导入Core数据集及发生相关错误解决方案
763 0
在torch_geometric.datasets中使用Planetoid手动导入Core数据集及发生相关错误解决方案
from sklearn.cross_validation import train_test_split发生报错
from sklearn.cross_validation import train_test_split发生报错
263 0
from sklearn.cross_validation import train_test_split发生报错
成功解决_catboost.CatBoostError: Invalid cat_features[4] = 8 value: index must be < 8.
成功解决_catboost.CatBoostError: Invalid cat_features[4] = 8 value: index must be < 8.
成功解决h5py\_init_.py:26:FutureWarning: Conversion of the second argument of issubdtype from `float` to
成功解决h5py\_init_.py:26:FutureWarning: Conversion of the second argument of issubdtype from `float` to
成功解决h5py\_init_.py:26:FutureWarning: Conversion of the second argument of issubdtype from `float` to
|
PyTorch 算法框架/工具
关于Pytorch中torch.manual_seed()用法
关于Pytorch中torch.manual_seed()用法
成功解决sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is amb
成功解决sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is amb
成功解决sklearn\ensemble\weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an interna
成功解决sklearn\ensemble\weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an interna
成功解决xgboost\core.py", ValueError: feature_names may not contain [, ] or <
成功解决xgboost\core.py", ValueError: feature_names may not contain [, ] or <
成功解决preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous
成功解决preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous