Logistic regression estimator always outputs the same class in scikit-learn I am using a logistic regression estimator with scikit-learn. The estimator I had trained predicts the same class all the time. (This is a 2 class identification problem.)
The data set is built of 2 classes which are a bit skewed (70% output 1 and 30 output 0). It has about 2000 samples and is built of 8 features for each sample.
when I am  fitting for logistic regression I get only 1's on the output so the confusion matrix looks like that: 
Confusion Matrix:
[[  0  53]
 [  0 155]]



*

*I tried to play with the the regularization parameter (from 1e-6 to 1e8) and nothing changes.

*The data base do not look linearly separable.

*I would expect that the worst logistic regression estimator would at least yield P(y=1)=0.7 P(y=0)=0.3.  Let me note that when using SVM with rbf kernel I get much better results. Below is the confusion matrix of the SVM:  
Confusion Matrix:
[[ 48   5] 
[ 15 140]]


*Any idea why my logistic regression estimator is always predicting the same result?   
 A: Adding to Tim's answer.  The confusion matrix you got indicates that your model did not change the probability of any observation to less than 0.5, which is the default decision rule.  If you can change that rule in the program, then you may get a better-looking confusion matrix. Check the documentation for how to do this. 
A: Logistic regression is not a classifier. It predicts probabilities of $1$'s. For example, the intercept-only model 
$$ E(Y) = g^{-1}(\beta_0) $$
where $g^{-1}$ is inverse of the logistic link function, would predict $\Pr(Y=1)=0.7$ for all cases. If you'd use decision rule "if probability is greater then $0.5$ then predict $1$", then you'd end up with classifying all-ones. So indeed the predicted probabilities would be correct, but the proportions of zeros and ones in the confusion matrix would not be the same as in $Y$. The same would be true for more complicated model. Saying it once again, logistic regression does not attempt to make correct classifications, but it estimates the conditional mean of $Y$.
