About 120,000 results
Open links in new tab
  1. plotting decision boundary of logistic regression

    The logistic regression lets your classify new samples based on any threshold you want, so it doesn't inherently have one "decision boundary." But, of course, a common decision rule to use is p = .5. We can also just draw that contour level using the above code:

  2. How to perform logistic lasso in python? - Stack Overflow

    Jan 13, 2017 · lasso isn't only used with least square problems. any likelihood penalty (L1 or L2) can be used with any likelihood-formulated model, which includes any generalized linear model modeled with an exponential family likelihood function, which includes logistic regression.

  3. python - Finding coefficients for logistic regression - Stack Overflow

    Sep 13, 2019 · Provided that your X is a Pandas DataFrame and clf is your Logistic Regression Model you can get the name of the feature as well as its value with this line of code: pd.DataFrame(zip(X_train.columns, np.transpose(clf.coef_)), columns=['features', 'coef'])

  4. python - sklearn logistic regression with unbalanced classes

    I'm solving a classification problem with sklearn's logistic regression in python. My problem is a general/generic one. I have a dataset with two classes/result (positive/negative or 1/0), but the set is highly unbalanced. There are ~5% positives and ~95% negatives.

  5. python - Evaluating Logistic regression with cross validation

    Aug 26, 2016 · I would like to use cross validation to test/train my dataset and evaluate the performance of the logistic regression model on the entire dataset and not only on the test set (e.g. 25%). These concepts are totally new to me and am not very sure if am doing it right.

  6. logistic regression - Roc curve and cut off point. Python - Stack …

    Feb 25, 2015 · I ran a logistic regression model and made predictions of the logit values. I used this to get the points on the ROC curve: from sklearn import metrics fpr, tpr, thresholds = metrics.roc_curve(Y...

  7. matplotlib - How to plot ROC curve in Python - Stack Overflow

    I am trying to plot a ROC curve to evaluate the accuracy of a prediction model I developed in Python using logistic regression packages. I have computed the true positive rate as well as the false positive rate; however, I am unable to figure out how to plot these correctly using matplotlib and calculate the AUC value.

  8. logistic regression - calculating odds ratio in python - Stack …

    Apr 4, 2020 · Short answer: In both cases, you should get the same odds ratio of 9. By default, penality is 'L2' in sklearn logistic regression model which distorts the value of coefficients (regularization), so if you use penality='none, you will get the same matching odds ratio.

  9. statistics - Python package for getting the maximum likelihood ...

    Jul 16, 2019 · Documentation on the logistic regression model in statsmodels may be found here, for the latest development version. All models follow a familiar series of steps, so this should provide sufficient information to implement it in practice (do make sure to have a look at some examples, e.g. here ).

  10. python - GridSearchCV on LogisticRegression in scikit-learn - Stack ...

    The class name scikits.learn.linear_model.logistic.LogisticRegression refers to a very old version of scikit-learn. The top level package name is now sklearn since at least 2 or 3 releases. It's very likely that you have old versions of scikit-learn installed concurrently in your python path.

Refresh