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

Deciding Initial Weights In A Linear Classifier For Sentiment Analysis

I would like to build a simple sentiment analysis classifier using logistic regression. I downloaded a list of positive and negative words from cs.uic.edu. There are more than 6000 words both positive ...
1
vote
2answers
109 views

In handwritten digit recognition problem using logistic regression, what changes needed to add another class "Not a Digit"

In handwritten digit recognition problem using logistic regression, normal implementation would forcibly classify even a picture of dog or cat as a digit. To eliminate this, what changes are needed to ...
4
votes
1answer
454 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 ...
3
votes
1answer
311 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 ...
0
votes
1answer
116 views

Decomposing R squared or VIF

In the context of multi-regression, I am wondering if there is a way to decompose $$VIF_i = 1/(1-R_i^2)$$ where $R_i^2$ is the r squared obtained from the regression of dependent variable = i and ...
2
votes
2answers
122 views

Regularization for intercept parameter

Why is the regularization parameter not applied to the intercept parameter? From what I have read about the cost functions for Linear and Logistic regression, the regularization parameter (λ) is ...
1
vote
0answers
26 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
27 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 ...
3
votes
1answer
57 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 ...
3
votes
1answer
1k views

How many coefficients does the Logistic regression model has as a function of the number of features?

I have built a logistic regression model using Python anaconda and was surprised to see that the number of model coefficients turned out to be proportional to the training sample size i.e. My ...
19
votes
3answers
8k views

Linear regression with non-symmetric cost function?

I want to predict some value $Y(x)$ and I am trying to get some prediction $\hat Y(x)$ that optimizes between being as low as possible, but still being larger than $Y(x)$. In other words: $$\text{cost}...
1
vote
2answers
31 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 ...
1
vote
2answers
206 views

AUC ROC Threshold Setting in heavy imbalance

I am doing binary logistic regression on a dataset with very heavy class imbalance. Class 1 is only 1% of data. When I train logistic regressor without class weights I get ROC AUC Score of 0.6269. ...
0
votes
1answer
35 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 ...
1
vote
1answer
188 views

Custom regularisation for logistics regression

My understanding of l2 regularisation: Weights of the model are assumed to have a prior guassian distribution centered around 0. Then MAP estimate over data adds an extra penalty in cost function. My ...
1
vote
1answer
40 views

how to add cross term in logistic regression model?

I have a data of 2000 (say locations of different fruits grow) and 10000 (say factors responsile for growth of fruits). And I also know that there are 20 different types of fruits in these locations. ...
2
votes
1answer
33 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
48 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
34 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 ...
0
votes
1answer
92 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 ...
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 ...
0
votes
2answers
111 views

Binomial family in logistic regression

I was asked in an interview why do we use the binomial distribution in logistic regression and how is it related to the class that we are predicting? Could anyone explain, without any mathematical ...
3
votes
1answer
359 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
56 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 ...
1
vote
1answer
64 views

Predictive model to maximize sum of dependent variable?

I am trying to classify cars for a towing company. Junky cars earn more when sent to the junkyard, and the more valuable cars should earn more at the auction, despite the auction fee. Creating a ...
1
vote
1answer
41 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 ...
3
votes
4answers
206 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 ...
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\...
3
votes
4answers
194 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
25 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
1answer
54 views

Two questions on hyper-parameter tuning

Question 1: In the example of logistic regression, I often see the regularization constant and penalty methods being tuned by a grid search. However, it seems like there are a lot more options for ...
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
2answers
526 views

Logistic Regression Manual Update

For the logistic regression below, how can I manually update the coefficients a and b manually? EDIT y = 1.0 / (1.0 + exp(-ax - b)) after observing the following ...
0
votes
1answer
20 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 ...
0
votes
1answer
38 views

Logistic Regression Multi-level Independent variables

im trying to study logistic regression, when i did the target variable with all features, i had the summary showing the p-values as usual, but one for the features has 60 level, another feature has 13 ...
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) ...
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"?
1
vote
1answer
45 views

Data Structure For Multilevel Analysis

I am little confused about how to structure my specific data for multilevel analysis. I have 10 categories and each category has some items in them. The dataset is available for 117 weeks. There is ...
3
votes
1answer
283 views
1
vote
1answer
195 views

How to combine two logistic regression models trained on different set of data?

My data has a hierarchy structure - meaning that there is an N class at level 1 and an M class at level M. After training both models separately with a different set of data (both are Logistic ...
0
votes
1answer
62 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
43 views

Effect of a few wrongly scaled feature values on logistic regression model

I was given a situation to predict the validity of the logistic regression model when it was found that certain values of a heavily weighted feature were found to be erroneously multiplied by 1000. ...
0
votes
1answer
45 views

Deciding what type of model to use for predicting the bottom decile of student grades

I have a large dataset which includes 36 variables (in %iles) to describe a student, and then the output is the students grades as a %ile. I am trying to predict, using the 36 variables, whether a ...
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 ...

1
2 3 4 5
12