1.
DataConversionWarning:
A column-vector y was passed when a 1d array was expected.
Please change the shape of y to (n_samples, ), for example using ravel().
要对预测输出y做出ravel()转换,也就是说我的y是2D的形式(shapes, 1),要把二维的形式改成1D的形式(shapes, ),,这就可以对fit输入的y_train作y_train.ravel()这样的转换
2.
np.squeeze(cost)
makes sure cost is the dimension we expect. E.g., turns [[17]] into 17