Questions tagged [logistic-regression]
Refers generally to statistical procedures that utilize the logistic function, most commonly various forms of logistic regression
680
questions
0
votes
1
answer
27
views
Why does Logistic Regression perform better than machine learning models in clinical prediction studies
I am developing binary classification models to predict a medical condition in my dataset. My results show that both Linear Regression and Linear SVM consistently outperformed other ML algorithms (SVM,...
1
vote
1
answer
26
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:
...
0
votes
0
answers
27
views
Logistic Regression, Standardization, Stationarity, Differencing
I am going to be using the logistic regression in which I will use L2 Regularization. I have these 4 rolling standard deviation variables. Here are the results of the Augmented Dickey-Fuller Test for ...
0
votes
0
answers
17
views
Classification problem with a numerical variable that uses a special (high) value to indicate a qualitatively different status
I have a classification problem where I need to predict an outcome based on 20+ variables, some categorical, some numerical. One of the numerical variables is 'dlast' - which is the number of days ...
0
votes
1
answer
21
views
Machine learning / statistical model of a deterministic process: how large must my training set be to ensure almost perfect accuracy?
This may be a silly question, but if I got a deterministic process, for instance, a function (in the mathematical sense) that happens to be computationally expensive to evaluate, and I decided to ...
0
votes
2
answers
47
views
Which intrinsically explainable model has the highest performance?
Explainable AI can be achieved through intrinsically explainable models, like logistic and linear regression, or post-hoc explanations, like SHAP.
I want to use an intrinsically explainable model on ...
1
vote
0
answers
27
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 ...
0
votes
2
answers
21
views
How will a model handle real-life values in real-life applications without scaling?
I am learning ML and facing confusion about data scaling. For example, I have the following data:
Weight(KG)
Balance($)
75
3401542
99
4214514
Now, if I use StandardScaler, I may get something like ...
0
votes
1
answer
41
views
How to calculate accuracy of a logistic regression?
A logistic regression involves a linear combination of features to predict the log-odds of a binary, yes/no-style event. That log-odds can then be transformed to a probability. If $\hat L_i$ is the ...
0
votes
1
answer
22
views
What statistical model suits for this problem?
I have a dataset with 6 target variables and the target variables are Boolean. The requirement is to use logistic regression to build the model. Which ML approach can be used in this situation?
Will ...
0
votes
0
answers
24
views
Logistic regression, derivation of log-oods
In logistic regression we can model the target variable in the log-odds space to derive the coefficients using linear regression methods, so that:
$\log\frac{p}{1-p} = \beta_0 + \beta_1 x_1 + \beta_2 ...
1
vote
1
answer
39
views
Probability distribution of probabilities
We can get the prediction probabilities of a binary classifier from sklearn's API using the predict_proba method. Is it reasonable to expect that the shape of a histogram plotted for the prediction ...
1
vote
0
answers
48
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 ...
0
votes
0
answers
18
views
model interaction between words for a sentiment analysis task
I am wondering what is the most appropriate way to model the interaction between two words/variables in a language model for a sentiment analysis task. For example, in the following dataset:
...
0
votes
0
answers
35
views
Understanding the stochastic average gradient (SAG) algorithm used in sklearn
For pedagogical purposes I've been trying to create my own implementation of the stochastic average gradient (SAG) algorithm in a logistic regression framework. Page 10 of the associated paper ...
0
votes
1
answer
28
views
Is Linear kernel SVM always better than Logistic regression?
We know that linear kernel SVM may give better results than logistic regression since maximizing the margin usually leads to more stable results/better displacement of the decision boundary. But is ...
0
votes
1
answer
22
views
Quasi complete separation problem
I have some question related to quasi complete seperation problem on logistic regression algorithm.
So i run the model to predict credit risk and turns out it gave me good prediction score (AUC around ...
6
votes
1
answer
235
views
Logistic Regression Modeling & Interpretation [closed]
I'm building a logistic regression model to predict the credit risk of lending company customers.
I'm using dataset from kaggle : https://www.kaggle.com/datasets/ranadeep/credit-risk-dataset/code
...
0
votes
1
answer
28
views
Redundant feature after one hot encoding
I have a numerical feature called $x$ and a categorical feature called $y$.
$y$ is an ordinal feature (A,B,C,D,E,F).
I am using label encoding for my y feature and when I am seeing the correlation ...
0
votes
1
answer
27
views
Is Logistic Regression possible using a Convenience Sample?
I've collected some survey data on homeless individuals, surveying their drug use, education level, age, gender etc. I hope to run a logistic regression to see how impactful homelessness (+other ...
0
votes
0
answers
25
views
Is there a difference in result if we apply Polynomial / Kernel Regression on mean of target data, or all data?
Let's say we have some data :
input data X with shape (1, N=100), this will be duplicated 1000 times.
target data Y with shape (S=1000, N=100).
We have 1000 experimental data points, samples.
My ...
2
votes
0
answers
22
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
...
0
votes
0
answers
32
views
Decision tree vs logistic regression feature importances
I have trained Logistic regression and decision tree in skearn on the same standardized dataset (binary classification).
Top important coefficients for decision tree are (sorted by tree....
0
votes
1
answer
94
views
Why does Adam outperform SGD in logistic regression?
I am training a logistic regression model. In case it matters, the features are 1376-dimensional embeddings output from a neural network. I tried both SGD and Adam with a learning rate of $10^{-3}$ ...
0
votes
1
answer
55
views
Difference between sklearn's LogisticRegression and SGDClassifier?
What is the difference between sklearn's LogisticRegression classifier and its SGDClassifier? I understand that the SGD is an ...
1
vote
3
answers
61
views
ROC Curve for model validation
Is there a general approach that the ROC curve can be used for to validate a model? My understanding is that we can use it to compare different threshold values to determine the best, or even see how ...
3
votes
1
answer
97
views
Why am I getting the exact same results with both a Logistic Regression and Decision Tree Classifier?
I am working on a binary classification problem and am using sklearn's logistic regression model and decision tree classifier.
Somehow I am getting the exact same results and accuracy score on both.
I ...
0
votes
0
answers
29
views
comparison between gaussian Naive bayes and logistic regression
I am following the lectures CORNELL CS4780: Machine learning for Intelligent Systems.
Link:- https://www.youtube.com/watch?v=GnkDzIOxfzI&list=PLl8OlHZGYOQ7bkVbuRthEsaLr7bONzbXS&index=11&...
0
votes
1
answer
24
views
Can I use clustering after classification to improve the performance of my classifier?
Say I have a classifier that segments my feature vectors (e.g. representing applicants) into 3 distinct segments A, B, C by assigning each applicant a score between 0 (worst) and 1 (best) with e.g. a ...
2
votes
1
answer
26
views
What is the best way to determine if there is variable interactivity between independent parameters in a prediction model
OK, the best way to describe this is with an example. (admittedly simplified)
I want to predict the speed of drivers on a motorway and I have two input variables
the nationality of the driver
how ...
0
votes
0
answers
15
views
How we interpret the coefficients of the WOE and Log-odd transformed variables in Logistic Regression?
We have a model with below-mentioned details:
target = PD (probability of default)
feature_1 = WOE transformed age ({
...
0
votes
0
answers
76
views
Logistic Regression Negative Log Likelihood Loss Function
Consider the following dataset:
We wish to fit a standard logistic regression model to this dataset.
(a) What will be the negative log likelihood loss function for this dataset.
(b) Is the iterative ...
0
votes
0
answers
68
views
Different training score but same test score when using pipeline
I have a problem that produce different training score when using pipeline and manual.
MANUAL :
...
0
votes
3
answers
118
views
Tweak machine learning algorithm in SciKit to optimize for recall
I am given a dataset to detect fraud. Something similar like this:
https://www.kaggle.com/code/imgremlin/4th-place-in-fraud-detection-from-zindi
The issue with SciKit machine learning algorithm is ...
0
votes
1
answer
49
views
How to find the optimal cut-off point to minimize both the FNR and FPR in R?
I should find the optimal threshold to minimize both the false positive rate and false negative rate. An equal weight between these two rates should be assumed. I write the following code:
...
0
votes
0
answers
25
views
Why does unbalanced training data affect only the estimate of the model intercept in logistic regression
For logistic regression models unbalanced training data affects only the estimate of the model intercept.
This conclusion is from here:
https://stats.stackexchange.com/questions/6067/does-an-...
3
votes
1
answer
49
views
Logistic Regression using Logisticregression() class
In the documentation of Logisticregression() offered by sklearn library, it states the following note:
The underlying C implementation uses a random number ...
0
votes
0
answers
24
views
Which algorithm to use for predictors which are sparse for classification problem
I have a classification problem with target has 85% to 15 % ratio (0,1) and around 35 predictor which all are 0 or 1 , I tried building logistic regression however the auc is around 0.53 , I am not ...
0
votes
0
answers
53
views
why when I find the best accuracy for logistic regression then it give me this error (AttributeError: split not found)
after run this code I face the split not found error.
...
0
votes
1
answer
38
views
How can the deviance of my model be higher than the null deviance?
I have a simple logistic regression model in Python, set up using sklearn. The code for training the model (and calculating some metrics across multiple runs) looks something like this:
...
8
votes
1
answer
201
views
Examples where simple classifier systems out-perform deep learning
I have been working on a problem where published results using deep learning are substantially worse than results I have obtained on the same task (using the same experimental protocol) using simple ...
0
votes
0
answers
12
views
Sigmoid Cross Entropy Implementation Min Value
When looking through the TF API docs I was reading the Sigmoid Cross Entropy Implementation I wanted to do a sanity check by checking the min/max value of the function which should be 0 loss at each ...
0
votes
1
answer
54
views
Is it possible to implement logistic regression (or any other ML method) to impute null values in a categorical feature with multiple values?
I'm doing a Data Science project, and I'm on the stage of cleaning categorical features. I've been researching, and it seems that imputing the mean or median can change the distribution. Therefore, a ...
0
votes
0
answers
17
views
What is the effect of sign of the coefficient in Logistic Regression performance?
I am trying to build a logistic regression model with 7 independent and 1 dependent variables. The sign of all the 7 least squared regression coefficient estimates is positive. In the Population% (y-...
0
votes
1
answer
19
views
How to use binomial regression in Python? Or any other appropriate analysis for this data set
How can I use binomial regression or any other appropriate analysis technique to find out how all of these factors affect the wins and losses of these teams?
0
votes
1
answer
105
views
Do Linear Regression and Logistic Regression models from sklearn include regularization?
I'm learning Data Science by enrolling on different courses, and I've recently learnt something that seems very interesting to apply when doing linear or logistic regression models: regularization.
In ...
1
vote
0
answers
22
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 ...
0
votes
1
answer
76
views
Error when predicting breast cancer using logistic regression
Summarize the problem: Received an error
...
1
vote
1
answer
28
views
Understanding log odds equation with multiple variables
"If we take the antilog of the regression coefficient associated with obesity, exp(0.415) = 1.52 we get the odds ratio adjusted for age. The odds of developing CVD are 1.52 times higher among ...
0
votes
1
answer
35
views
Checking the interpretation of log odds in logistic regression (with multiple variables)
Here's a log odds equation -->
0.8=2.5(Hypertension)+0.3(Gender)+0.06(Age)+15
Please let me know if my interpretation of it is right -->
My interpretation: With one unit change in 'Hypertension',...