ValueError: Expected 2D array, got 1D array instead 问题解决

问题截图如下 根据提示找到问题所在为 调用svc.predict()处出现问题 查看svc.predict的使用方法 print(help(svc.predict)) 参数的shape为[n_samples,n_features],例如(1,1118) 而我传入的格式为 (1118,),所以需要进行类型转换,使用reshape 修改前 test_prediction = svc.predict(h
相关文章
相关标签/搜索