Questions tagged [logistic-regression]

Refers generally to statistical procedures that utilize the logistic function, most commonly various forms of logistic regression

200 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
9 votes
4 answers
3k views

Loss Function for Probability Regression

I am trying to predict a probability with a neural network, but having trouble figuring out which loss function is best. Cross entropy was my first thought, but other resources always talk about it in ...
ahbutfore's user avatar
  • 191
4 votes
1 answer
86 views

Force positive coefficients for Logistic Regression and LinearSVC

Do you know what is the best way to force positive coefficients with Logistic Regression and Linear SVC using scikit learn? for instance ...
Alex's user avatar
  • 165
3 votes
1 answer
517 views

Two steps optimization of a credit card limit

I have a problem similar to what is on the title but not the same. The problem on the title allows me to explain the dynamics of my need. I have to determine what the optimal value is for a variable ...
Juan Esteban de la Calle's user avatar
3 votes
0 answers
907 views

How to retrieve results summary from statsmodels GLM with regularization?

I'm trying to fit a GLM to predict continuous variables between 0 and 1 with statsmodels. Because I have more features than data, I need to regularize. ...
Rylan Schaeffer's user avatar
3 votes
1 answer
153 views

Issues with self-implemented logistic regression

I am trying to self-implement a logistic regression algorithm to do some self-learning but I am having a bit of trouble with achieving similar accuracy to the logistic regression of sklearn. Here is ...
Steve Ahlswede's user avatar
3 votes
4 answers
341 views

ML: Classification Model Comparison

Given is a dataset that I need to use for a classification and I want to compare the performance of different classification models. Let's assume, I want to look at logistic regression (with ...
espressionist's user avatar
3 votes
1 answer
489 views

Error while plotting Logistic Regression Classification

I was trying to plot by using the following code ...
Pradeep Singh's user avatar
2 votes
0 answers
46 views

Why is cross-entropy increasing with accuracy?

I'm making an implementation of the softmax regression and I'm struggling to understand the nature behind the problem of increasing value of Cross-Entropy: $H(y_i, p_i)=-\sum_{i=1}^C y_i log(p_i)$, ...
JoshJohnson's user avatar
2 votes
0 answers
28 views

In logistic regression, why not just use the boundary instead of using probabilities to classify?

We know that logistic regression assign probabilities that an object belongs to a binary category, say {0,1}. We also know that if the object is "above" or "below" the boundary, it ...
A_cat's user avatar
  • 31
2 votes
2 answers
448 views

Why do we don't write units with MAE or RSME for regression problem ? If I wish to write the units when how do I identify the units for them?

I have referred many research paper but no one is talking about the units of the metrics. Do MAE , RMSE etc have some units ?
Savita Lonare's user avatar
2 votes
2 answers
106 views

Logistic Regression for prediction

I would like to ask about the theoretical approach of using Logistic Regression for customer data and more specifically Churn Prediction (in BigQuery and Python). I have my customer data for an online ...
Ledian K.'s user avatar
  • 121
2 votes
1 answer
33 views

What is the best Classification Method alternative to Nominal Logistic Regression, if your Response and all Predictor variables are Categorical?

Hy, I need help in choosing the best classification method. My response variable is nominal with "4" categories and five predictor variables, two of them are nominal and three are binary. ...
Usama2298's user avatar
2 votes
0 answers
2k views

Binary classification with imbalanced dataset, about lightgbm output probability distribution

I trained a binary classifier for an imbalanced dataset. I did two experiments: lightgbm classifier, boosting_type='gbdt', objective='cross_entropy', SMOTE upsample After training the lgbm model, I ...
JisongXie's user avatar
2 votes
0 answers
21 views

Determine most important features in diagnostic data

I have a dataset of device diagnostics. I have two tables: one relating each device to failures code. Two devices can share a failure code for example a common chip malfunction. The second table links ...
Amirby's user avatar
  • 21
2 votes
0 answers
27 views

Best Method for Using Experts to Score Qualitative Data

TL;DR: Looking for recommendations or resources on the best method to have subject matter experts score qualitative data to train ML model. Problem: I am working on a problem in the biochemistry ...
chazman's user avatar
  • 21
2 votes
0 answers
2k views

How to interpret my logistic regression result?

I'm having a hard time to interpret my result of the logistic regression. I have a few question. Firstly, how can I check if a feature is more important to the others, like that there is a real ...
grumpyp's user avatar
  • 157
2 votes
0 answers
15 views

Connection between prob output LogisticReg/SVM and ROC

I have the following ROC generated using LPOCV and Logistic regression or SVM (l2 norm). Now, let's say I have a test set containing 10 patients and I get that the probabilities of those patients to ...
Luis Pinto's user avatar
2 votes
0 answers
4k views

Some of the p-values are NaN - logistic regression

I am trying to do logisitc regression, but have this issue - some of the p values are NaN ...
Sim_Demo's user avatar
2 votes
0 answers
227 views

Probability of the recipient to open the email

I am trying to build a model using logistic regression, where my dependent variable is y=1 if the mail was opened, y=0 if it was not. I have data approximately 10 records (10 rows) for every ...
Sim_Demo's user avatar
2 votes
0 answers
29 views

Interpretable models apart from Logistic Regression

I am wondering about other interpretable models apart from logistic regression. I am looking for models that can interpret the effect on the target variable by unit change in any feature variable. I ...
SKB's user avatar
  • 554
2 votes
1 answer
279 views

Logistic Regression Model for categorical features with multiple values in each category

I am working on an insurance use case to build a logistic regression classifier to predict if a policy will lapse or not. The dataset has more than 20 categorical features for a policy. Each ...
tanmay's user avatar
  • 173
2 votes
2 answers
238 views

Different results for LogisticRegression on python 2.7 and 3

I have different results for the same kernel on python 2.7 (local machine) and python3 (the system running on kaggle) for LogisticRegression. How it is possible? Here my results from my local machine:...
Mutatos's user avatar
  • 181
2 votes
0 answers
134 views

Logistic Regression with Tensorflow

Is this the correct Estimator for Logistic Regression in TF 1.10? There used to be a function called: LogisticRegressor which is deprecated In README.md file it ...
gogasca's user avatar
  • 749
2 votes
0 answers
31 views

When should the bias b be updated with weights w and when should it be updated seperately?

It seems in some Machine Learning models, the bias term $b$ is updated just like other weights $w_i, i=1...n$. For example, in Logistic Regression, using SGD, $b \ \text{or} \ w_0$ is updated with: $$...
CyberPlayerOne's user avatar
2 votes
0 answers
92 views

What Is The Difference Between Additive Natural Cubic Splines and Tensor Product Natural Cubic Splines?

Good day. Taking into account the picture shown, using tensor product is computationally expensive considering the fact that it has higher dimensions. I am just thinking why it is compared both ...
kindgnice's user avatar
2 votes
0 answers
64 views

Is it possible to run logistic regression on data with a few longitudinal parameters?

Currently, I am building a credit rating model based on logistic regression and faced a problem with inserting panel variables in it. Is it possible to do so in logistic regression and if it is, what ...
Dominykas Tunaitis's user avatar
2 votes
0 answers
101 views

What are some machine learning problems that can be attacked with continuous multiobjective optimization?

I am working on continuous vector optimization, and hence continuous multiobjective optimization is a particular case. I am interested in finding applications in machine learning for this problems. Is ...
John D's user avatar
  • 123
2 votes
0 answers
350 views

Learning ranking

This is a sort of a follow-up to this newbie question:Suppose I want learn ranking (so, I have a bunch of data points, ranked $1, 2, 3, ...$ Now, one way is to use something like logistic regression ...
Igor Rivin's user avatar
2 votes
0 answers
103 views

Type of Test to Determine Correlation in R

I have a dataset of approximately 48,000 rows each one a click of a an article, some of these clicks were also comments. For each article I have the country and subject of the article and name of ...
Jonathan Dine's user avatar
2 votes
0 answers
586 views

Sales Dataset to determine best model for predicting future sales

We have a set of products in which we are trying to determine which products we should continue to sell, and which products to remove from our inventory. The file contains BOTH historical sales data ...
David B's user avatar
  • 29
2 votes
0 answers
38 views

Outputting risk groups for a logistic regression model

I have a problem with outputting the terms for a logistic regression model in R. For a given list of independent values, say list l of terms {w,y,z} to determine dependent variable {x}, I want to ...
uhhh_big_mike_boiii's user avatar
2 votes
0 answers
126 views

Random Forest Class Weighting for Logistic Probabilities

I have a model at work that I am building and am running into some odd outputs from the random forest as it pertains to the probability of response. In my case, the class distributions are very ...
Nate Thompson's user avatar
2 votes
0 answers
589 views

SAS Nested Likelihood Ratio Test for a Logistic Model

Using SAS Studio (online, student version)... Need to do a "nested likelihood ratio test" for a logistic regression. Entirety of instructions are: "Perform a nested likelihood ratio test comparing ...
Lauren's user avatar
  • 21
2 votes
0 answers
492 views

How to Interpret Multinomial Specification in R's `mnlogit` package

The mnlogit package in R allows for the fast estimation of multinomial logit models. The specification of forumlas is a bit different from most other regression ...
Hack-R's user avatar
  • 1,919
2 votes
0 answers
89 views

Cross-sell models and additional holders

I would like to pose a question about how to treat additional holders in the propensity-to-buy models of banking products. Up to now I was only taking into considerations the clients as first holders....
Elisa's user avatar
  • 81
1 vote
0 answers
35 views

Analysis of relationship between accuracy and total loss (or cost) during training with logistic loss function and threshold 0.5

I'm trying to understanding the relationship between training accuracy and training loss in classification tasks, specifically using logistic regression. When using logistic loss as the loss function ...
Tran Khanh's user avatar
1 vote
1 answer
61 views

What is the point of final test set in K-fold cross-validation?

I am carrying out logistic regression for my binary classification problem, and I have validated the model with kfold cross-validation (k=10). I don't understand why I need to have a final test set, ...
Karoline Teller's user avatar
1 vote
1 answer
35 views

Why is my predictor value (continuous) perfectly correlated with my logit value (when testing logistic regression model assumptions)?

Question: Why is my predictor value (continuous) perfectly correlated with my logit value (when testing logistic regression model assumptions)? Code: ...
In_cognito's user avatar
1 vote
0 answers
105 views

What is ROC curve based on for SVM?

I was studying about the ROC curves for Logistic regression. There is a threshold in this method that determines the classification. By changing this threshold we get different confusion matrices and ...
Mina's user avatar
  • 111
1 vote
0 answers
129 views

scikit learn logistic regression to annotate single cell RNA seq data

I want to use scikit learn logistic regression to train a model on a labelled single cell RNA sample and subsequently apply this model on new unlabelled single cell RNA seq samples to annotate the ...
LabDancer's user avatar
1 vote
0 answers
562 views

logistic regression,machine learning

I just started learning ML, so I tried to implement logistic regression on my own in 2 ways (the first code and the second code), but they aren't working, I cross-checked by using sklearn (third code ...
Prathvik G S's user avatar
1 vote
0 answers
33 views

Deriving a binary logistic classifier from a multi class logistic classifier

Given a multi class logisitic classifier $f(x)=argmax(softmax(Ax + \beta))$, and a specific class of interest $y$, is it possible to construct a binary logistic classifier $g(x)=(\sigma(\alpha^T x + b)...
user1767774's user avatar
1 vote
0 answers
285 views

Different results in same logistic regression model from sklearn and same dataset

I got this strange behavior when deploying my logistic regression trained in scikit-learn into production. I trained the model on my own machine and stored it in form of ...
Student's user avatar
  • 411
1 vote
0 answers
248 views

Is it possible to "fine-tune" a pre-trained logistic regression model?

Fine tuning is a concept commonly used in deep learning. We may have a pre-trained model and then fine-tune it to our specific task. Does that apply to simple models, such as logistic regression? For ...
eduardokapp's user avatar
1 vote
1 answer
449 views

Log odds vs Log probability

Log-odds has a linear relationship with the independent variables, which is why log-odds equals a linear equation. What about log of probability? How is it related to the independent variables? Is ...
Apoorva's user avatar
  • 275
1 vote
0 answers
84 views

Additive model of Logit

Log converts values from multiplicative scale to additive scale. What is the advantage of an additive model in logistic regression over a multiplicative model for which we use log?
Apoorva's user avatar
  • 275
1 vote
1 answer
55 views

Effect of log odds on skewed data

Does taking the log of odds bring linearity between the odds of the dependent variable & the independent variables by removing skewness in the data? Is this one reason why we use log of odds in ...
Apoorva's user avatar
  • 275
1 vote
0 answers
36 views

Logistic Regression-Log odds calculation example

Can someone provide me an example/link of how log odds is calculated in logistic regression (with multiple independent variables)? All the examples I've come across explain log odds calculation with a ...
Apoorva's user avatar
  • 275
1 vote
0 answers
42 views

Meaning of 'Closed Form'

Here's an excerpt from a paper explaining Logistic Regression. What does 'Closed Form' mean in this context? Please explain in simple terms. The definitions online are confusing. Gradient of Log ...
Apoorva's user avatar
  • 275
1 vote
1 answer
887 views

Difficulties in create a confusion matrix in R for Yes or No

I am new to regression and confusion matrix and trying to create a confusion matrix from logistic binary regression model. I am trying to create a confusion matrix from Yes or No values from the ...
painintheass's user avatar