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
0answers
13 views

Which one first? Imputing missing values or dummy creation?

While working on model building using Logistic Regression, we did two different ways. Method 1: Created dummy variables before treating missing values. This resulted in 37 columns expanding to 192 ...
1
vote
1answer
49 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 ...
3
votes
4answers
108 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
17 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. ...
1
vote
0answers
34 views

Normalizing and joining of independent logistic regression model's prediction

I need to train several Logistic regression models on a different set of data (with a different set of labels): ...
0
votes
0answers
18 views

What is the Intuition behind weight vector W which is normal to the plane? Is the weight vector W same as the W which is normal to the plane π?

In an interview, I was asked the intuition behind the weight vector. I told the weight vector is a vector which we try to minimize to a local minima with the help of regulariser so we don't overfit. ...
0
votes
0answers
20 views

Predicting % of demand going to each product

I work within an industry with products that expire, therefore we would like to be able to choose which specific marketing keywords we should switch on to drive demand to the products that are over-...
1
vote
0answers
17 views

Simple constraints on Logistic Regression

I am doing with a binary classification problem. I have three features (w1x1 + w2x3 + w3x3 + w4), and I want to get a rule so that there is for sure w1 > 0, w2 > 0, w3 < 0 and any constant. ...
2
votes
1answer
103 views

Understanding logistic regression loss function equation

I am writing a scientific paper that - among other things - deals with logistic regression in the context of machine learning. I read this article where the author states that, given a set of instance-...
1
vote
1answer
29 views

Derivative of a custom loss function with the logistic function

I have costum loss function with $\mu ,p, o, u, v$ as variables and $\sigma$ is the logistic function. I need to derive this loss function. Due to multiple variables in the loss function, I need to ...
20
votes
3answers
30k views

Python implementation of cost function in logistic regression: why dot multiplication in one expression but element-wise multiplication in another

I have a very basic question which relates to Python, numpy and multiplication of matrices in the setting of logistic regression. First, let me apologise for not using math notation. I am confused ...
16
votes
4answers
8k views

Is logistic regression actually a regression algorithm?

The usual definition of regression (as far as I am aware) is predicting a continuous output variable from a given set of input variables. Logistic regression is a binary classification algorithm, so ...
3
votes
1answer
145 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 how much is the optimal value for a ...
1
vote
1answer
86 views

Baby cry detection model using binary classification through logistic regression

I need some help regarding my final year project. I am fairly new to machine learning and I have tried a lot to understand how to train a model using logistic regression. I have two datasets of audio ...
0
votes
1answer
28 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 ...
2
votes
0answers
25 views

Interpretable models apart from Logistic Regression

I am wondering about other interpretable models apart from logistic regression. I am looking for models that can interpret the effect on the target variable by unit change in any feature variable. I ...
1
vote
1answer
30 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 ...
7
votes
2answers
1k views

Loss Function for Probability Regression

I'm trying to predict a probability with a neural network, but having trouble figuring out which loss function is best. Cross entropy was my first thought, but other resources always talk about it in ...
1
vote
1answer
42 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
27 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. ...
1
vote
1answer
39 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 ...
0
votes
1answer
35 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 ...
1
vote
0answers
41 views

Linear and logistic regression output with same neural network

it seems like this should be a very common task, but I have not found anything useful in my research: How can I do linear and logistic regression with the same neural network? By example, what I mean ...
3
votes
1answer
165 views
3
votes
1answer
268 views

Determining whether a Machine Learning model is overfitted with regard to the stability of the features

I need to know how would I get to know if I have overfitted my Machine Learning model on the train data. The performance metric I have used is Logistic Loss. Does the stability of the features affect ...
0
votes
1answer
56 views

How to interpret my logistic regression result with statsmodels

so I'am doing a logistic regression with statsmodels and sklearn. My result confuses me a bit. I used a ...
0
votes
0answers
12 views

How to interpret feature weight coefficients in logistic regression for text classification?

I am working on a simple text classification problem where I have as inputs tweets and as class whether that tweet contains fake news or not (0 is real news, 1 is fake news). I have trained a logistic ...
0
votes
2answers
94 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 ...
1
vote
1answer
3k views
2
votes
1answer
34 views

Having trouble scaling scores of logistic regression

I am constructing a credit scorecard using logistic regression, similar to the one shown here. However, when trying to convert the coefficients of logistic regression into score representation (by ...
1
vote
1answer
30 views

How to predict when and why of hospitalization?

I have an EHR data source which has info on a) Patient visit records (Inpatient, outpatient, Emergency etc) and why did he visit hospital (diagnosis codes attached to each visit) b) Patients drugs ...
2
votes
1answer
37 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 ...
1
vote
2answers
33 views

Classification report question

I need some help to interpret the 2 classification reports of the same logistic regression. The only difference between them is the size of test_size. Even though my second classification report has a ...
0
votes
1answer
75 views

Text classification analysis based on similarity

I have been reading a lot of literature regarding text classification and different approaches/models, especially using Python language, but probably I am still missing something on how to build the ...
0
votes
3answers
2k views

Using random forest to select important variables & then putting into logistic regression?

I was wondering does it make sense to use random forest to select most important variables then put into logistic regression for prediction? I think that it might not make sense because what's ...
0
votes
1answer
426 views

Imbalanced Data how to use random forest to select important variables?

I am trying to use random forest to select important variables out of 15K features and fit them into logistic regression. My evaluation is based on F1 score. Dataset 2 classes ratio are around: 99.5:0....
6
votes
4answers
7k views

Bad classification performance of logistic regression on imbalanced data in testing as compared to training

I am trying to fit a logistic regression model to an imbalanced dataset (0.5/99.5) with high dimensionality(about 15k). I used random forest to select top 200 important features. Observations are ...
0
votes
2answers
26 views

How can i solve the classification's problem with cross validation in LogisticRegression?

I want to make a data frame with most repeated word in sentences and make a classification via Logistic-Regression. I tried to write the steps clearly in codes. ...
2
votes
2answers
109 views

Different results for LogisticRegression on python 2.7 and 3

I have different results for the same kernel on python 2.7 (local machine) and python3 (the system running on kaggle) for LogisticRegression. How it is possible? Here my results from my local machine:...
0
votes
2answers
53 views

Logistic regression for classification?

I have a dataset with most columns having Boolean values and categorical values. A sample of it is: ...
-2
votes
2answers
4k views

Logistic regression score is negative

I am trying to implement logistic regression algorithm. I am using sklearn for this purpose. When I am printing the accuracy its printing negative value. Code: <...
1
vote
1answer
35 views

How to improve results from ML model? (spam classification)

I am trying to build a model that predicts if an email is spam/not-spam. After building a logistic regression model, I have got the following results: ...
2
votes
1answer
77 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 ...
0
votes
1answer
14 views

Math of Logistic regression cost function

In the current scikit-learn documentation for binary Logistic regression there is the minimization of the following cost function: $$\min_{w, c} \frac{1}{2}w^T w + C \sum_{i=1}^n \log(\exp(- y_i (X_i^...
0
votes
0answers
11 views

Which features are causing a class to be classified correctly or incorrectly?

I am doing a project that involves training and testing different algorithms to predict a developer's profile type (Frontend, Fullstack, QA, ML, etc.) using that developer's skills (AWS, Selenium, ...
1
vote
0answers
36 views

Table function output and order of arguments

I have a silly question. Below is the output of a logistic regression analysis I did. I notice that when I switch the order of the arguments I put in the table function in R that it also switch the ...
0
votes
1answer
19 views

Optimization function returns the same optimal parameters for two labels

I've recently enrolled in the Coursera machine learning, and am working my way through making my own classifier for the Iris dataset problem using matlab. I'm training a classifier for each species (...
3
votes
4answers
5k views

Should I use regularization every time?

I have learned regularization for linear and logistic regression but when I implement that algorithm to my code generally my estimates not changing.I mean,it looks like ineffective.I know,it's for ...

1
2 3 4 5
11