Question RE: skLearn Logistic Regression
I have a case with binary results and 1-D features, like: X = np.array(-3,-2,-1,0,1,2,3,) and y = np.array(0, 0, 0, 1, 1, 1, 1) only longer arrays (about 180 entries in each array) of this general type. So this should be the "simplest" case. Altho I've tried several variations of the Logistic input formats, in LogisticRegression.fit(X, y) they keep being rejected with the most common error message being Missing argument y I assure you I do indeed have an array "y" that is passed to "fit" So----What do I have to do to get Logistic Regression to accept 1-D features?
These are not numpy arrays. Try: X = np.array([-3,-2,-1,0,1,2,3]).reshape(-1,1) And y = np.array([0, 0, 0, 1, 1, 1, 1]).reshape(-1,1) Makis On 31 Oct 2020, at 17:51, The Helmbolds via scikit-learn <scikit-learn@python.org<mailto:scikit-learn@python.org>> wrote: I have a case with binary results and 1-D features, like: X = np.array(-3,-2,-1,0,1,2,3,) and y = np.array(0, 0, 0, 1, 1, 1, 1) only longer arrays (about 180 entries in each array) of this general type. So this should be the "simplest" case. Altho I've tried several variations of the Logistic input formats, in LogisticRegression.fit(X, y) they keep being rejected with the most common error message being Missing argument y I assure you I do indeed have an array "y" that is passed to "fit" So----What do I have to do to get Logistic Regression to accept 1-D features? _______________________________________________ scikit-learn mailing list scikit-learn@python.org<mailto:scikit-learn@python.org> https://mail.python.org/mailman/listinfo/scikit-learn
Hi all, Is there an implemented method for Consensus Clustering (https://link.springer.com/article/10.1023%2FA%3A1023949509487<https://link.springer.com/article/10.1023/A:1023949509487>)? Cheers, Makis
participants (3)
-
Serafeim Loukas -
serafim loukas -
The Helmbolds