ValueError: Unknown label type: while implementing MLPClassifier

后端 未结 4 2056
盖世英雄少女心
盖世英雄少女心 2021-02-14 08:38

I have dataframe with columns Year, month, day,hour, minute, second, Daily_KWH. I need to predict Daily KWH using neural netowrk. Please let me know how to go about it



        
4条回答
  •  无人共我
    2021-02-14 09:24

    The fit() function expects y to be 1D list. By slicing a Pandas dataframe you always get a 2D object. This means that for your case, you need to convert the 2D object you got from slicing the DataFrame into an actual 1D list, as expected by fit function:

    y = list(df['Daily_KWH_System'])
    

提交回复
热议问题