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
22 views

Normalization factor in logistic regression cross entropy

Given that probability of a matrix of features $X$ along with weights $w$ is computed: ...
1
vote
1answer
16 views

When should we use jaccard score?

I am a newbie in Machine Learning, I trained a binary classifier for bank loan prediction through Logistic Regression. I measured the accuracy of it with two methods: accuracy score and jaccard index. ...
2
votes
1answer
18 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. ...
0
votes
1answer
18 views

creating a logistic regression model with coefficients

I am trying to understand the details of the logistic regression models and now I was wondering how the model can be created if you have the coefficients and intercepts. So I created a logistic ...
0
votes
1answer
24 views

Understanding intution behind sigmoid curve in the context of back propagation

I was trying to understand significance of S-shape of sigmoid / logistic function. The slope/derivative of sigmoid approaches zero for very large and very small input values. That is $σ'(z) ≈ 0$ for $...
0
votes
0answers
10 views

Update function for NN with logistic and sofmax

Can anyone help me confirm my work or find resources on how to come up with the update function for each layer in the Neural Network for multi-class classification problem i.e I am using logistic as ...
1
vote
1answer
20 views

One predictor variable and 3 response variable (categorical and continuous) [closed]

If I have predictor variables which are a mixture of continuous and categorical, and a response variable that is continuous. What approach should I apply? Linear regression, logistic regression or k ...
3
votes
2answers
3k views

My data is highly overlapping, but when I apply logistic regression, it is giving an impressive accuracy of 79%. Why?

Logistic regression is supposed to work well only on data that is linearly separable. As we can see in the pair plot, the data points heavily overlap. The logistic regression model is in fact showing ...
2
votes
3answers
53 views

How to get the correct confusion matrix in imbalance class dataset?

I have created two simulated random dataset of 3 classes. Only difference between the dataset is that frequency of the classes. ...
1
vote
1answer
19 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
67 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
12 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
22 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
6 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
30 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
23 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
64 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
9 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
49 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
20 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
377 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
55 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
24 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 ...
2
votes
0answers
28 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
99 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
14 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
52 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
35 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
13 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
19 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
49 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
62 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
56 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 ...

1
2 3 4 5
12