We’re rewarding the question askers & reputations are being recalculated! Read more.

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
0
votes
1answer
14 views
0
votes
0answers
13 views

Derivative of logarithm of loss function. Logistic regression

I am reading machine learning literature. I found the log-loss function of logistic regression algorithm: $$ l(w) = \sum_{n=0}^{N-1}\ln(1+e^{-y_nw^Tx_n}) $$ Where $ y \in {-1;1}, w \in R^P, x_n \in R^...
-1
votes
1answer
22 views

How to find and calculate correlation in a data set which has category and continuous variables?

I am working on an Insurance domain use case to predict if an existing customer will buy a second insurance policy or not. I have a few personal details saved under different categories like Marital ...
0
votes
0answers
5 views

SGDClassifier partial_fit() for online learning - is one step of gradient descent enough?

I'm interested in incremental (online) learning for my logistic regression model trained with SGDClassifier. Basically updating the model as more labeled data comes ...
0
votes
1answer
16 views

Feature Importance based on a Logistic Regression Model

I was training a Logistic Regression model over a fairly large dataset with ~1000 columns. I did apply scaling of features using MinMaxScaler. I was wondering how to interpret the coefficients ...
-1
votes
1answer
26 views

Predicting the winner in an n-horse race [closed]

For my example I am trying to predict the most likely winner of horse races. Each race features a different number of horses, somewhere between 4 and 20. Lets say I want to use the characteristics of ...
0
votes
0answers
16 views

How do I get confidence intervals for an ElasticNet in sklearn?

I need to produce a row for the confidence interval for every field that I am calculating coefficients and scores off of. So here is my code so far- ...
0
votes
1answer
18 views

Cannot fig out error in my gradient function implementation in python

Im trying to implement following gradient descent function in Python for logistic regression: $∇θ(−logL)=−X^T 􏰀(y−e^{Xθ}􏰁)$ This is my python implementation: ...
0
votes
0answers
18 views

Python, Logistic regression - How to calculate Nagelkerke pseudo r squared

I am doing logistic regression in sklearn and I would like to calculate (Nagelkerke) pseudo r squared, which makes more sense for logistic regression analysis. I don't see it is available in sklearn ...
0
votes
1answer
39 views

Binary classification: is there a tradeoff between predicting class 1 vs 0?

I have been digging much more in detail into classification performance metrics lately to get my head around the 'dynamics' of classification algorithms. What I have noticed is that in binary ...
1
vote
0answers
30 views

Low ROC AUC with good Information Value

I'm trying to build my first application scorecard with Logistic Regression and getting low ROC AUC score (about 0.7). Dataset ...
0
votes
2answers
20 views

How to Keep Missing Values in Ordinal Logistic Regression

I’m using mord package in python to do ordinal logit regression (predict response to movie rating 1-5 stars). One of my predictor variables is also ordinal but ...
0
votes
0answers
19 views

How to handle missing data in a logistic regression?

I am building a model to solve a binary classification task. So far, the input is low dimensional (10 dimensions at most). I need to face the occurrences of missing input. It is my first time at ...
2
votes
1answer
48 views

Help in understanding the maths behind Logistic Regression

I am following the lecture notes available https://www.stat.cmu.edu/~cshalizi/uADA/12/lectures/ch12.pdf I cannot understand how Eqs 12.4 and 12.5 come, why the Bernoulli probability has $1-p(x)$ in ...
0
votes
1answer
26 views

KNN scoring low compared to Logistic regression in MNIST challenge

KNN gives me a score of 0.76100 while it shows 94% accuracy for my training data (splitted with test_size =0.3) in my jupyter notebook while logistic regression gives me a score of 0.91485 with an ...
0
votes
2answers
48 views

kNN vs Logistic Regression

Good day, I had this question set as optional homework and wanted to ask for some input. Suppose an individual was to take a data set, divide it in half into training and test data sets and then ...
1
vote
1answer
14 views
0
votes
0answers
13 views

Is this a reasonable way to deal with known input data uncertainty for logistic regression predictions?

Suppose I want to use a logistic regression model to predict the class of N objects. Further, suppose the prediction is time sensitive: I need the prediction for each object on Day 1, but the value of ...
0
votes
0answers
34 views

Plotting Decision Boundary of Logistic Regression

For plotting decision boundary for Logistic Regression after finding required weights and hypothesis Therefore , we need to plot this equation -- where, This works perfectly fine. Just wanna ask ...
0
votes
0answers
8 views

Recursive feature elimination on train data or complete dataset and dummy encoding

I am using RFE with logistic regression. I will also be doing cross validation with RFE (RFECV in sklearn) to get the optimum number of features. I am not sure whether to use RFECV on just train ...
0
votes
0answers
28 views

Indicator for target variable in logistic regression

I am trying to predict the probability of an event occurrence for different entities based on historical time series data. The event is binary (0, 1) and monthly snapshots are available. I am setting ...
0
votes
1answer
19 views

build a classification model under constraint

Suppose I have n features $(x_1, x_2, ...., x_n)$ (all float) and want to classify $y$ (0 or 1) For now I have a legacy expert system to do the classification. Expert system rules: Categorize all $...
1
vote
1answer
18 views

Interpreting fraction of zero weights in TensorFlow

I am using the TensorFlow to do a simple linear classification using logistic regression. The graph included from the TensorBoard displays what they call the fraction of zero weights. How do I ...
2
votes
1answer
25 views

is the logit transform ever actually computed in modeling process of logistic regression?

i've been tying to wrap my head around logistic regression, the logit transform, and the sigmoid function. logit transform: from what i understand, in practice all we want to do is maximize the ...
0
votes
1answer
25 views

How to perform logistic regression in R with grouped data?

Say I have a categorical variable with 2 levels, and for instance 289 people fall in level 1 and 386 fall in level 2. How would I go about modelling such a variable as a logistic response? All ...
0
votes
0answers
9 views

High accuracy in one v. all, lower accuracy in all vs. all

I am training a classifier (similar to logistic regression) on MNIST. I have 10 one -vs.-all classifiers for each number, each of which independently achieves >90% test set accuracy. However, when I ...
0
votes
1answer
19 views

How does the given data gets plotted on a graph

I come from a programming background and learning the math behind the data science and algorithms now. I would like to understand the logic behind how a data gets plotted in a graph when using ...
2
votes
3answers
108 views

References for longitudinal data analysis

So my goal is to study longitudinal data (data in time series) by applying some data mining techniques. Ultimately I want to be able to "predict" outcomes. For example, a study of patients along the ...
1
vote
0answers
16 views

How does a simple logistic regression model achieve a 92% classification accuracy on MNIST?

Even though all the images in the MNIST dataset are centered, with a similar scale, and face up with no rotations, they have a significant handwriting variation that puzzles me how a linear model ...
1
vote
1answer
26 views

Accuracy noise patterns during model training

I'm training a logistic regression model on a small dataset. I have about 1300 samples that I split into a training and a testing set (70% and 30% respectively). The training seems ok, however when I ...
0
votes
1answer
22 views

Why the Logistic regression model trained with tensorflow performed so poor

I trained a logistic regression model with tensorflow but the accuracy of the model was so poor (accuracy = 0.68). The model was trained using simulated dataset and the result should be very good. is ...
1
vote
1answer
35 views

Is it compulsary to normalize the dataset if doing so can negatively impact a Binary Logistic regression performance?

I am using raw data set with 4 feature variables to do a Binominal Classification using Logistic Regression Algorithm. I made sure that the class counts are balanced. i.e., an equal number of ...
0
votes
0answers
26 views

Linear/Logistic Regression for unknown values or how to get a good prior for new coefficients

Suppose, we model the probability of making holidays by country and town. The input data are people and how many people actually made holiday in that particular town: ...
2
votes
1answer
238 views

How to interpret Logistic regression coefficients using scikit learn

I have created a model using Logistic regression with 21 features, most of which is binary. I created these features using get_dummies. Few of the other features are numeric. I get a very good ...
0
votes
0answers
11 views

Code line explanations: Visuals of LogRegression

Why do we use -1 and +1 in the following code? ...
0
votes
1answer
33 views

What do we learn from training a dataset for logistic regression

What do we learn from training our dataset in Logistic Resgression? Like in Linear Regression, with the help of training set we are able to generate a best fit line(y = mx+c) where m and c come from ...
3
votes
2answers
56 views

Which classifier performs better when using 'class_weight'?

I have used the 'class_weight' method to balance my multi-class classification problem, using Logistic Regression, Random Forest, and XGBoost classifiers. Among these three methods, logistic ...
0
votes
1answer
50 views

Calculating Univariate and MultiVariate Logistic Regression with Python

I have a simple data set of a number of variables and a single binary dependent variable. The data is stored in a data frame. When I use python's statsmodels.api and logit.fit() on the dataframe I ...
0
votes
2answers
94 views

Logistics regression with polynomial features vs neural networks for classification

I am taking Andrew Ng's Coursera class on machine learning. He mentions that training a logistic regression model with polynomial features would be very expensive for certain tasks compared to ...
0
votes
0answers
12 views

Ideas to derive new column or eliminate a column for Logistic Regression problem related to binary classification

I am working on a Logistic Regression problem to identify the leads that result into a student conversion for candidature. I have 2 columns in the dataset 'Last Activity' and 'Last Notable Activity' ...
1
vote
1answer
25 views

How do we decide on the classification algorithm to use with huge training size?

I am solving a questions binary classification problem and the training size for this is huge(291 billion). The data has bloated because of using tfidfvectorizerfor ...
0
votes
2answers
44 views

How to do predict a new sms to be spam or not?

I have trained a model for spam classification - This is my code - ...
1
vote
1answer
34 views

Why do we divide the regularization term by the number of examples in regularized logistic regression?

So this is the formula for the regularized logistic regression cost function: $x^{(i)}$ - the $i$'th training example $\theta_j$ - the parameter of the $j$'th feature $m$ - the number of training ...
0
votes
0answers
13 views

Do pseudo r squared metrics make sense for classifiers that aren't logistic regression?

I'm working with some domain scientists that are used to using logistic regression to predict a binary value. One of the ways they evaluate their logistic regression model is through the Nagelkerke $...
0
votes
2answers
59 views

Testable hypotheses construction; minimum predictive strength vs. significance

Is this null hypothesis TESTABLE? Research Question: "Can a predictive model utilizing logistic regression be built which predicts at least one customer will churn in 90 days, and this individual ...
2
votes
1answer
29 views

Can a Logsitic Regression model continue making predictions after removing predictions from the data set?

I have a logistic regression model that predicts churn (0 vs. 1). I was asked to use the model to predict on a historical group of non-churners, remove anyone who was marked as a churner, and then ...
0
votes
0answers
15 views

What type of regression to use when modeling the relationship between a continuous variable and a discrete?

I'd like to create a regression model to find the marginal effect between usage (a rate from 0 - 100%) and tap-distance (1,2,3,4...). I'm working to find how a change in tap-distance to a feature will ...
1
vote
1answer
25 views

How to find what events cluster together?

I have a data set that looks at a five-year timespan of peoples' lives and indicates if specific events have occurred (Divorce, Birth of Child, Health Shock, etc.). ...
1
vote
0answers
22 views

Significance of AUC score

My model (Logistic Regression) has AUC score of 0.8 Am I right in stating that the probability of the model ranking a random positive sample higher than a random negative sample is 0.8? Also, how ...