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

Logistic regression

$
0
0

@tillutony wrote:

Hi All,

below is the code used for building logistic regression. please help in in understanding the code.

from sklearn.linear_model import LogisticRegression ----importing libraries

log=LogisticRegression(penalty='l2',C=.01) --------?
log.fit(X_train_scale,Y_train)----------building the model

we are not predicting with test data with the above model and then comparing the accuracy in next line bit confused pls need your inputs
Checking the model's accuracy

accuracy_score(Y_test,log.predict(X_test_scale))
Out : 0.75

regards,
Tony

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles