ValueError: Unknown label type: while implementing MLPClassifier

后端 未结 4 2073
盖世英雄少女心
盖世英雄少女心 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:35

    Use a regressor instead. This will solve float 2D data issue.

    from sklearn.neural_network import MLPRegressor   
    model = MLPRegressor(solver='lbfgs',alpha=0.001,hidden_layer_sizes=(10,10))
    
    model.fit(x_train,y_train)
    
    y_pred = model.predict(x_test)
    

提交回复
热议问题