ValueError: x and y must be the same size

后端 未结 4 1669
抹茶落季
抹茶落季 2020-12-11 03:16
import numpy as np
import pandas as pd
import matplotlib.pyplot as pt

data1 = pd.read_csv(\'stage1_labels.csv\')

X = data1.iloc[:, :-1].values
y = data1.iloc[:, 1]         


        
4条回答
  •  我在风中等你
    2020-12-11 04:06

    In my case the problem was that the size of test_size was different from the range of the scatter plot. The range should be the same of the test_size (40% in your code) of the total observation. Here you should set the range of your scatter plot as 40% of total observations that you are processing in your model.

提交回复
热议问题