📜  ValueError: 查询数据维度必须匹配训练数据维度 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:12.532000             🧑  作者: Mango

代码示例1
example = np.array([7,4,3,2,4,5,3,6,7,4,2,3,5,6,8,4])
example = example.reshape(1, -1)

prediction = clf.predict(example)
print(prediction) # shouldn't error anymore