当前位置:网站首页>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)
成功:
边栏推荐
- Lua introductory case of actual combat 1234 custom function and the standard library function
- HCIP(15)
- 785. 快速排序
- This map drawing tool is amazing, I recommend it~~
- 带wiringPi库在unbutu 编译 并且在树莓派运行
- HCIP(14)
- One service layer needs to call the other two service layers to obtain data and assemble it into the final data. The data is all lists. How to design the cache?
- 设备树——dtb格式到struct device node结构体的转换
- Character encoding and floating point calculation precision loss problem
- Dart 命名参数语法
猜你喜欢

JS new fun(); 类与实例 JS基于对象语言 只能通过书写构造函数充当类

解决安装MySQL后,Excel打开很慢的问题
![[Search topic] After reading the inevitable BFS solution to the shortest path problem](/img/f8/fbe906106dc8f7f7a6bd54d2dc3bc1.png)
[Search topic] After reading the inevitable BFS solution to the shortest path problem

MySQL4

TypeScript简化运行之ts-node

每周小结(*67):为什么不敢发表观点

Solve the problem that Excel opens very slowly after installing MySQL

The 16th day of the special assault version of the sword offer

IDEA modifies the annotation font

如何下载Keil包
随机推荐
Game Security 03: A Simple Explanation of Buffer Overflow Attacks
二舅
[cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]
By CSDN, torn
【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
pdb drug comprehensive database
大佬们,MySQL cdc source在增量过程中回收 replication slave 和 r
从设备树(dtb格式数据)中解析出bootargs
一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
彻底关闭Chrome浏览器更新及右上角的更新提示
HCIP(15)
[Message Notification] How about using the official account template message?
在打开MYSQL表时,有的可以显示编辑,有的没有,如何设置。
What is dynamic programming and what is the knapsack problem
Simple and easy to use task queue - beanstalkd
Ordinary users cannot access HGFS directory
win10 fixed local IP
Article summary: the basic model of VPN and business types
Flink deploys and submits jobs
MySQL3