Questions tagged [logistic-regression]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
16 views

Comparison of classifier confusion matrices

I tried implementing Logistic regression, Linear Discriminant Analysis and KNN for the smarket dataset provided in "An Introduction to Statistical Learning" in python. Logistic Regression ...
2
votes
0answers
25 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 ...
0
votes
0answers
8 views

How to select features for a multivariable analysis with a small sample?

I've applied boruta method (RF) to select variables and applied them on a multivariate logistic regression, but the reviewer of my paper questioned the results once this method is "data-hungry&...
1
vote
0answers
7 views

Time complexity of scikit-learn implementations of RandomForestClassifier and LogisticRegression

Is there a documented source of the time complexities taken by sklearn implementations of supervised algorithms - specifically of RandomForestClassifier and ...
1
vote
0answers
21 views

What is correct equation for LR decision boundary?

I read that the equation perceptron decision boundary is given as follows:$$w^Tx-w_0=0$$ This can be proven as follows: Assuming $w$ is a unit vector (as we can multiply above equation with a ...
0
votes
0answers
5 views

How to predict categorial variable with another variable which is quantitative if present and qualitative if missing?

Here is my 2 step biological problem : Step 1 : I track single cells through time in order to detect parameter A At the end of this step, whether a single cell presented the parameter A and I record ...
0
votes
0answers
16 views

Correlation between continuous variables and multi class categorical variables in python

I was trying to figure out a way of finding a correlation between continuous variables and a non-binary target categorical label. The only thing I though of is by fitting the labels into Multinomial ...
1
vote
0answers
15 views

Permutation Importance is 0 with high accuracy

I am using sklearn's permutation_importance for feature selection, and all my features return score decreases of 0, even though my model accuracy is 0.96. I have ...
0
votes
0answers
63 views

Logistic Regression Model returning same output for all inputs

I made a simple linear regression model with a simple .csv dataset that had 2 categories. For reference, the dataset looks like a larger version of this Basically, it is a hobby classification ...
0
votes
0answers
5 views

Mutiple binary classification for for best propensity to buy one of the product

Problem:- I have 5 products for sell and I can pitch only one product in a month to one customer.so I wants to know which product customer can buy. Proposed solution:- I build 5 binary logistic models ...
2
votes
1answer
47 views

Logistic Regression to model a rare event

I have a data set which has data on consumers and a flag for whether they have expressed interest in a product or not. I am looking to build a model using R which will be able to predict whether or ...
1
vote
0answers
17 views

Sudden jumps in accuracy with logistic regression and bag of words : "glm.fit: algorithm did not converge"

I work on a bag of words, on the Toxic Comments Classifications challenge. The challenge is closed but the dataset is very nice to learn. I use R, tf-idf, tm, and logistic regression. I have a strange ...
0
votes
1answer
19 views

How to choose the right predictors for a classfication model?

I am working on a classification problem. I have two models: Logistic regression model Random Forest model For the first model, if I choose the only predictors with p-values<0.05 I will reduce ...
0
votes
0answers
35 views

Why is Testing Accuracy consistently higher than Validation Accuracy (even with multiple datasets and splits)?

I am having a problem where even after 1000 train/test splits, I am still getting a better accuracy in my testing set than my training set. I am stratifying my train/test sets and my sample size is ...
0
votes
0answers
11 views

Logistic regression giving higher coefficient to category with lower target rate

I am trying to solve a binary classification problem using a logistic regression model. I am not giving details of the features, but I have a categorical feature that takes values A, B, C, and D. The ...
3
votes
3answers
372 views

Model performance worsens after Cross Validation

I am training a logistic regression model on a dataset with only numerical features. I performed the following steps:- 1.) heatmap to remove collinearity between variables 2.) scaling using ...
1
vote
0answers
24 views

Logistic Regression : shouldn't weighting by the number of instances give the same result ? What could explain the discrepency?

I am performing a logistic regression in a standard supervised framework (Data Set X, target y). The dataset X is composed of a handfull of categorical variables (that I one-hot encode), thus it ...
0
votes
0answers
29 views

Implementation cost function in logistic regression in python using numpy

I am implementing the cost function for logistic regression and have a question. The formulation for cost function is $J = -\frac{1}{m}\sum_{i=1}^{m}(y^{(i)}\log(a^{(i)})+(1-y^{(i)})\log(1-a^{(i)}))$ ...
0
votes
0answers
16 views

Combining output (deciles or risk score) of 2 or more logistic regression based model into one single output SCORE so to use for any decision making

I have 3 different datasets in which customer can or cant be present in all 3 datasets. I have built 3 models for all 3 datasets which are working fine. Kindly note, i cant make a make model ...
0
votes
1answer
14 views

Logistic Regression Model on Test Set - in Titanic Data Showing Error

I have built the model on Titanic Data set , with Logistic Regression Succeffullly and it is giving prediction on training set , but unfortunately I am unable to implement this on test data set. ...
0
votes
0answers
22 views

How to implement predict_proba() with spark.ml logistic regression

In sklearn it is possible to use the predict_proba() function to obtain the probability matrix. Since in ...
0
votes
1answer
32 views

Algorithms for SMS spam detection

Which among KNN, Logistic and Naive Bayes would yield best results for SMS spam detection? Is there any other efficient approach worth exploring. I am planning to make a python application for SMS ...
1
vote
0answers
20 views

A simple logistic regression using keras and R

I am new in ML. I try to run a simple logistic regression using Keras in R. I have 0 or 1 in a train$y data set. It corresponds to ...
0
votes
1answer
20 views

Confusion matrix and accuracy not in sync

I am getting the following result for the confusion matrix and accuracy for a logistic regression model. ...
1
vote
0answers
17 views

How do I interpret logistic regression coefficients with the use of both one-hot encoder and L2 regularization?

I have read two articles saying we should avoid dropping one level of a categorical variable as the reference group while using both one-hot encoder and regularization in linear regression/logistic ...
1
vote
3answers
92 views

logistic regression or density estimation for binary dependent variable and binary (or categorical) features [closed]

I have a binary dependent variable $t$ and categorical features. We can even simplify to binary features since I can one-hot encode the categorical variables. In practice the one-hot encoding induces ...
0
votes
0answers
13 views

Counter-intuitive weight in logistic regression

I have a question about logistic regression. One of the features I built is a binary feature which produces either 0 or 1. The number of the positive instances with the feature activated is ~110K ...
3
votes
1answer
51 views

Why does my logistic regression predict all 0's?

I built a logistic regression in scikit-learn and all of my predicted values are 0, it can't be so. It must have at least some predictability power. I am trying to predict which flights are likely to ...
0
votes
0answers
9 views

From The Logistic Equation to Code

I am reading an article on Introduction to Logistic Regression. https://towardsdatascience.com/an-introduction-to-logistic-regression-8136ad65da2e From the ...
0
votes
0answers
13 views

Use probability estimate of logistic regression of a binary dependent variable: how to evaluate the model?

Logistic Regression gives a the probability for a specific outcome. It does not return the outcome itself. Say, we use the continous probabilities themselves instead of the binary classification for ...
1
vote
0answers
22 views

Training data with one class

I have a real-time scenario, finding out whether a transaction is fraudulent or not. I have a dataset that contains only fraudulent transactions. For any binary classification algorithm, we may need ...
0
votes
1answer
15 views

How to use Word2Vec CBOW in statistical algorithm?

I have seen a few examples of using CBOW in neural network models (although I did not understand them). I know that Word2Vec is not similar to BOW or TFIDF, as there is no single value for CBOW and ...
0
votes
0answers
18 views

Is logistic regression suited to predict whether or not a flight will be late 15 minutes of more? How arrange data?

I have data for of past flights with quite a lot of features. I am trying to think whether a logistic regression would be suitable to predict which type of flights are likely to be late in the future. ...
2
votes
1answer
33 views

Creating adversarial sample against logistic regreession

I performed a binary classification using logistic regression. My goal is the following: I know the coefficient w of the hyperplane equation $y = wTx + b$. What I would like to do is create opposing ...
0
votes
0answers
12 views

Linear models: Imputing missing not at random

This question is a continuation of a similar question for linear models instead of Tree-based model. Given that linear models (e.g. lasso, ridge, Linear regression, elastic net, etc.) can't handle ...
0
votes
0answers
16 views

Cold Start and First Price Auctions

I have the following contrived scenario... I've participated on various auction platforms where I bid on widgets. Assume that win/loss outcomes on individual platforms are well-separated such that for ...
1
vote
0answers
15 views

CoxPH model with Frailty and L1 regularization

This question stems from an approach proposed by Dr. Silverman, "Predicting Horse Race winners through A Regularized Conditional Logistic Regression with Frailty." In this paper, he proposes ...
0
votes
1answer
47 views

What does my learning curve indicate?

I have performed logistic regression. And I am getting an accuracy of 77% with my current model. I divided my training set into cross validation set and train set. And I plotted a learning curve (...
0
votes
1answer
55 views

Naive bayes expectation maximization vs logistic regression for binary classification

Assuming I'm dealing with binary classification. For what kind of data Naive bayes using expectation maximization would give a better solution and for what kind of data logistic regression would be ...
0
votes
1answer
47 views

Why do I get different coefficients from Logistic regression in Python and SPSS

I am a bit confused in regards to the model coefficients calculated by SPSS and sklearn's LogisticRegression. I am getting different coefficients and intercepts for both methods. in Python, I am ...
0
votes
0answers
22 views

what is the effect of initial weights on model training for different algorithms

If I do a model training on a dataset with three different algorithms Logistic Regression (L1), SVM(S1) and a Neural Net(N1). If I train the models again with the same data set and same parameters ...
0
votes
1answer
40 views

Does it make sense to repeat calculating AUC in logistic regression?

I have a question regarding logistic regression models and testing its skill. I am not quite sure if I understand correctly how the ROC Curve is established. When calculating the ROC curve, is a train ...
0
votes
1answer
55 views

dividing Mean by standard Deviation meaning

I have played around with logistic regression a little using movement data intervals that are prelabeled as either resting or active. I now found that if I divide the mean movement of the individual ...
0
votes
1answer
61 views

Association between continuous input and categorical output

I have two independent continuous variables like Age, Price and an outcome variable like purchased or not purchased Now, which test should I use to ascertain the association of continuous input ...
0
votes
1answer
18 views

Can I modify a Logistic Regression classifier to out put more than one class based on the probabilty?

I'm training a Logistic Regression classifier on text data. I found that many of my data points have more than one target class. Is it possible to modify my model to output more than one class based ...
2
votes
0answers
20 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 ...
0
votes
0answers
6 views

Prediction count seems to be way in logistic regression despite good accuracy, precision and recall score

I built a Logistic Regression Model to predict Loan Acceptors. The dataset is 94% non acceptors and 6% acceptors. I've run several logistic regression models one with the original dataset, one after ...
0
votes
0answers
6 views

Proportional Hazards Assumption - Schoenfeld Residuals X-Axis

I am testing the PH assumption for my COX PH model. Can someone describe what the two x-axis's are in the Schoenfield Residuals plots? One is rank-transformed time and the other is km-transformed time....
0
votes
0answers
13 views

XGBoost:Logistic poor performance with Scaled and PCA data

Working on a data set similar to fraud but not monetary transactions. Here are the steps that I have taken on the modeling side: Convert Some of the categorical into numerical (One hot encode) Over ...
1
vote
2answers
20 views

Why does using Gradient descent over Stochatic gradient descent improve performance?

Currently, I'm running two types of logistic regression. logistic regression with SGD logistic regression with GD implemented as follows ...

1
2 3 4 5
12