TransWikia.com

How is sklearn's Logistic Regression's Score Calculated?

Cross Validated Asked by user291976 on November 16, 2021

I used sklearn.linear_model.LogisticRegression to check how the price of a quote affects whether that quote is taken.

model = LogisticRegression()
model.fit(prices, isSelected)

To check the accuracy of my model, I applied the model.score method to test data, and got a score of 0.59. People seem to be saying that this is the number of correct predictions over the number of total predictions on the test set, however because of the low frequency of quote acceptance, my model predicts a less than 50% chance of acceptance for any quote in the set. Therefore, it’s impossible that a "correct prediction" just means there was a >50% chance of a False outcome, and the actual outcome was False, or there was a >50% chance of a True outcome, and the actual outcome was True. So, what does sklearn count as a correct prediction, and how does this factor into the calculation of score?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP