Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

What is the default threshold when applying logistic regression in sklearn?

$
0
0

@syed.danish wrote:

I am trying Logistic Regression on Titanic data set. The code that I used is :

from sklearn.linear_model import LogisticRegression
clf=LogisticRegression(penalty='l2',C=1)
clf.fit(train_x,label_x)
pred=clf.predict(test_x)

I want to know the significance of Parameter 'C' in the code and also, In pred the output is either 1 or 0, here how did the logistic regression model chooses the threshold for classifying as 1 or 0? Is it .5 or model itself chooses the best result depending upon the AUC value?
Thanks in advance !
Syed Danish

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles