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
4
votes
1answer
428 views

Are linear models better when dealing with too many features? If so, why?

I had to build a classification model in order to predict which what would be the user rating by using his/her review. (I was dealing with this dataset: Trip Advisor Hotel Reviews) After some ...
1
vote
0answers
23 views

What should be the target variable shape? should it be (n,1) or (n,)?

I tried logistic regression on the titanic dataset but used 2 different code: 1st code: ...
1
vote
1answer
26 views

Where shall I use odds logarithm and when shall I use sigmoid in logistic regression?

I have been interested in DS and ML recently and logistic regression was on of the first algorithms I learned. In my first course it was said that ln(p/(1-p) was used for the logistic regression. But ...
1
vote
2answers
29 views

MLE & Gradient Descent in Logistic Regression

In Logistic Regression, MLE is used to develop a mathematical function to estimate the model parameters, optimization techniques like Gradient Descent are used to solve this function. Can somebody ...
0
votes
1answer
32 views

Improving precision and recall for imbalanced large data set

I have a data set of 1 million points and 30 features. The output variable has multiple classes (1 to $n$) but the problem I'm interested in is only concerned whether the output belongs to class 1 or ...
2
votes
1answer
28 views

Logistic Regression - Odds & log of odds

ln(p1−p)=β0+β1X The equation of line in the above equation denotes that the log of odds is linearly related to the predictor variables. Why is log of odds linearly related to the predictor variables, ...
0
votes
1answer
24 views

Logistic regression - Odds ratio vs Probability

In Logistic regression, the final values we achieve are associated with Probability. Then why do we need Logit/Log of odds? We can directly use probability. Is Logit used to get the equation of a best ...
1
vote
2answers
43 views

Relation between MLE (Maximum Likelihood Estimation) & Gradient Descent

What are the similarities & dissimilarities between MLE (used to find the best parameters in logistic regression) & Gradient Descent?
0
votes
1answer
15 views

Logistic Regression mapping formula

Sigmoid function predicts the probability value which is between 0 & 1. What is the formula in logistic regression that maps the predicted probabilities to either 1 or 0?
0
votes
2answers
33 views

Mapping values in Logistic Regression

When mapping probabilities obtained in logistic regression to 0s & 1s using the sigmoid function, we use a threshold value of 0.5. If the predicted probability lies above 0.5, then it gets mapped ...
1
vote
1answer
12 views

How to customize logistic regression for this case?

I have a binary classification problem, with a dataset comprising of several features. When I train LogisticRegression on it, I get large number of false positives ...
1
vote
0answers
11 views

How to use principal components in R to apply a multinomial logistic regression? [closed]

Context: I have an original dataset of +- 20k rows (samples) and 253 features (deletions, insertions and substitutions). These columns/dimensions/features are called SNVs (single nucleotide variants ...
3
votes
1answer
357 views

In machine learning, what is the difference between a probabilistic approach and a geometric approach?

For example: The probabilistic approach of logistic regression involves the MLE (maximum likelihood estimation) maximizing the likelihood function, or in other words, finding the best parameters for ...
0
votes
0answers
18 views

Logistic regression forms

If we have dataset $D=(X,\Theta)$, where $X={x^{(i)},y^{(i)}}, i=1, \cdots, n$ and $\Theta$ representing our parameters of the model that we want to learn, a simple form can be the following: $$ p\...
1
vote
1answer
34 views

Gradient descent implementation of logistic regression

Objective Seeking for help, advise why the gradient descent implementation does not work below. Background Working on the task below to implement the logistic regression. Gradient descent Derived the ...
1
vote
0answers
15 views

Complete separation of logistic regression

I came over problem that might occur in logistic regression. In case dataset is too small to observe events with low probabilities. For example, in the following table we have response set to 0 if $X\...
1
vote
1answer
22 views

Finding logistic loss/negative log likelihood - binary logistic regression classification

I am new to ML and data science and am struggling with a simple problem. In my problem, I am given a series of datapoints $X_i$ where $X_i = (x_{i1}, x_{i2})$ with each data point having a label $y_i$ ...
1
vote
0answers
20 views

Linear combination of features reverses importance of all features

I am trying with a logistic model with 2 features independently or with linear combination, but in the linear combination, combining these features would reverse importance through significance levels ...
1
vote
0answers
18 views

Why is PyTorch's Dataloader is not inerrable?

I am working on MNIST dataset for an assignment and it seems to be I am stuck at some point for long. I have wrote my code for LogisticRegression and when I try to train the model it is not working as ...
0
votes
1answer
19 views

Kernel dies or proses stuck when making LR prediction on dataframe using apply

I'm trying to making predictions with a simple model. model=LogisticRegression() model.fit(X_train,y_train) After fitting, i try to make predictions. A sample ...
1
vote
1answer
53 views

Logistic Regression - Probabilistic intuition vs Geometric intuition

The Probabilistic approach of logistic regression involves the MLE (Maximum Likelihood Estimation) maximizing the likelihood function, or in other words, finding the best parameters for the best fit ...
3
votes
4answers
189 views

Why are deep learning models unstable compare to machine learning models?

I would like to understand why deep learning models are so unstable. Suppose I use the same dataset to train a machine learning model multiple times (for example logistic regression) and a deep ...
1
vote
1answer
29 views

Cost function - Log Loss query

What is the purpose of using "log" in the logistic regression cost function "log loss"?
0
votes
1answer
60 views

How python LogisticRegression() binary classification works for more than 2 independent variables

I created bag of words (in which number of columns were around 15000 i.e greater than 1) and corresponding output data (0 or 1). After that I used LogisticRegression() (I didn't passed any parameters) ...
0
votes
0answers
33 views

Can any data be learned using polynomial logistic regression?

We know that a Taylor polynomial can approximate any smooth function. In binary logistic regression we're trying to fit a decision boundary to our data. But this decision boundary is not necessarily a ...
0
votes
1answer
20 views

Do I have to remove features with pairwise correlation even if I am doing a regularized logistic regression?

Normally we would remove features that have high pairwise correlation with another feature before performing regression. But is this step necessary if I am applying L2 regularized logistic regression (...
0
votes
0answers
13 views

Low-value coefficients in logistic regression

I prepared a logistic regression model. I then checked the coefficients/weights of the features, some of which were close to 0, which means these features do not contribute much to our predictive ...
1
vote
2answers
33 views

log(odds) to p formulation

$$Log(Odds) = log({p \over (1-p)}) $$ $${p \over (1-p)} = e^{b+b_1x_1+....}$$ I understand up to here, however how does this: $$p = (1-p) e^{b+b_1x_1+...}$$ become: $$ p = {1 \over {1+e^{-(b+b_1x_1+......
1
vote
1answer
27 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
24 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
20 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
22 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
25 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
12 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
25 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 ...
1
vote
3answers
66 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
22 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
254 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&...
0
votes
0answers
25 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 ...
0
votes
0answers
23 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
171 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
36 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
67 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
21 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
55 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
19 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
23 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 ...

1
2 3 4 5
12