当前位置:网站首页>Invalid classes inferred from unique values of `y`. Expected: [0 1 2], got [1 2 3]
Invalid classes inferred from unique values of `y`. Expected: [0 1 2], got [1 2 3]
2022-08-01 03:36:00 【川川菜鸟】
解决方法:对y_train进行编码再训练
from sklearn.preprocessing import LabelEncoder
le = LabelEncoder()
y_train = le.fit_transform(y_train)
model.fit(X_train, y_train)
成功:
边栏推荐
- Open source project site must-have & communication area function
- HCIP(15)
- 内核的解压缩过程详解
- Hackers can how bad to what degree?
- 初出茅庐的小李第112篇博客项目笔记之机智云智能浇花器实战(1)-基础Demo实现
- When opening a MYSQL table, some can display editing, some do not, how to set.
- 使用ts-node报错
- MySQL4
- Character encoding and floating point calculation precision loss problem
- Completely closed Chrome updated and in the top right corner of the tip
猜你喜欢
Four implementations of
batch insert: have you really got it? Software Testing Weekly (Issue 82): In fact, all those who are entangled in making choices already have the answer in their hearts, and consultation is just to get the choice that they prefer.
TypeScript simplifies running ts-node
二舅
【搜索专题】看完必会的BFS解决最短路问题攻略
黑客到底可以厉害到什么程度?
HIRO: Hierarchical Reinforcement Learning 】 【 Data - Efficient Hierarchical Reinforcement Learning
HCIP(15)
Introduction to Oracle
IDEA修改注释字体
随机推荐
IDEA修改注释字体
Message queue design based on mysql
EntityFramework saves to SQLServer decimal precision is lost
MySQL3
Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
开源项目站点必备&交流区功能
Raspberry pie arm version of GCC installed configuration and environment variables
How is the tree structure of the device tree reflected?
手写二叉查找树及测试
[Message Notification] How about using the official account template message?
【入门教程】Rollup模块打包器整合
This map drawing tool is amazing, I recommend it~~
The kernel's handling of the device tree
New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment
ARM 交叉编译
二舅
普通用户无法访问hgfs目录
初出茅庐的小李第113篇博客项目笔记之机智云智能浇花器实战(2)-基础Demo实现
What is dynamic programming and what is the knapsack problem
HCIP (14)