found input variables with inconsistene numbers of samples:[] 报错处理

在用train_text_spilt进行机器学习的训练时候,出现了以下的报错:

found input variables with inconsistene numbers of samples:[] 报错处理_第1张图片

 代码检查发现错误 :

train_x,train_y,test_x,test_y=train_test_split()

train_x,train_y的行数不一致

应该改为:

train_x,test_x,train_y,test_y=train_test_split()  


你可能感兴趣的:(python,人工智能)