制作训练集时报错Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
debug发现是训练数据的锅,采集数据的时候软件有时候会差一位
规整数据后发现The error message “Expected 2D array, got 1D” suggests that the input array “array0” is a 1-dimensional array, but the SVM classifier expects a 2-dimensional array.
才知道svm算法的predict函数即使参数只有一个数据元素格式也要和训练集相同
【无标题】
最新推荐文章于 2024-06-13 12:16:07 发布