当前位置:网站首页>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)
成功:
边栏推荐
- Device tree - conversion from dtb format to struct device node structure
- 2022 CSP-J1 CSP-S1 Round 1 Preliminary Competition Registration Guide
- Talking about hardware device computing storage and data interaction
- 二舅
- 【SemiDrive源码分析】系列文章链接汇总(全)
- MySQL3
- Introduction to the Elastic Stack
- Take you to experience a type programming practice
- How to write a high-quality digital good article recommendation
- By CSDN, torn
猜你喜欢
MySQL3
IDEA modifies the annotation font
被 CSDN,伤透了心
Interview Blitz 69: Is TCP Reliable?Why?
Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
Flink deploys and submits jobs
初出茅庐的小李第112篇博客项目笔记之机智云智能浇花器实战(1)-基础Demo实现
预言机简介
Raspberry pie arm version of GCC installed configuration and environment variables
随机推荐
787. Merge Sort
使用ts-node报错
Write a method to flatten an array and deduplicate and sort it incrementally
Open source project site must-have & communication area function
Replacing the Raspberry Pi Kernel
Flutter Tutorial 01 Configure the environment and run the demo program (tutorial includes source code)
Compiled on unbutu with wiringPi library and run on Raspberry Pi
【 Make YOLO Great Again 】 YOLOv1 v7 full range with large parsing (Neck)
【搜索专题】看完必会的BFS解决最短路问题攻略
Hackers can how bad to what degree?
Message queue design based on mysql
leetcode6133. 分组的最大数量(中等)
test
A way to deal with infinite debugger
这个地图绘制工具太赞了,推荐~~
The maximum quantity leetcode6133. Grouping (medium)
New York University et al | TM-Vec: Template Modeling Vectors for Rapid Homology Detection and Alignment
Flink deploys and submits jobs
pdb drug comprehensive database
Ordinary users cannot access HGFS directory