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
0answers
31 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 ...
-2
votes
0answers
15 views

Perform Logistic Regression on housing dataset to predict how many houses will have median price of 500k?

I have a housing dataset with price as a target variable. I know how to use Linear Regression to predict the price of the houses. But how should I find out the number of houses having median price of ...
0
votes
0answers
10 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 ...
1
vote
1answer
26 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 ...
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. ...
0
votes
1answer
13 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^...
1
vote
1answer
28 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 ...
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, ...
0
votes
0answers
15 views

Residual Deviance in GLM Output in Python vs. R

I am coming from R to Python for econometrics. In R, in case of fitting a logistic regression with glm, the output summary would include the result of test of the proposed model against the saturated ...
0
votes
1answer
26 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
25 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 ...
2
votes
1answer
24 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 ...
0
votes
1answer
39 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 ...
1
vote
0answers
51 views

How to interpret my logistic regression result?

I'm having a hard time to interpret my result of the logistic regression. I have a few question. Firstly, how can I check if a feature is more important to the others, like that there is a real ...
3
votes
1answer
25 views

Selecting a boundary on a binary classifier to optimal precision and recall

I have a logistic regression classifier that shows differing levels of performance for precision and recall at different probability boundaries as follows: The default threshold for the classifier to ...
1
vote
0answers
28 views

Best practice to select precision vs. recall threshold for a binary classifier

I have a logistic regression model in Scikit-Learn doing a binary classification. Looking at the Roc curve for the classifier I can see that it performs really well: The AUC score is 0.99 which is ...
7
votes
2answers
56 views

Concatenating embedding and hand-designed features for logistic regression

An interviewer told me that we cannot concatenate an embedding from a neural network (such as a pre-trained image representation) and hand designed features (such as image metadata) for use in a ...
1
vote
0answers
12 views

analyze the effect of some new changes to business rules on customers retention and sales

I am trying to analyze the effect of a particular business rule on customer behavior. Background: I have two call centers operating in my company. One is an in-house call center and the other one is a ...
1
vote
2answers
63 views

Bad results in Logistic Regression from-scratch Python implementation on sample gender data

I am quite a newbie to Machine Learning, now trying to implement from scratch in Python (using numpy) a logistic regression algorithm. I took the gender/height/weight data from here. Then I did the ...
0
votes
0answers
59 views

How to retrieve results summary from statsmodels GLM with regularization?

I'm trying to fit a GLM to predict continuous variables between 0 and 1 with statsmodels. Because I have more features than data, I need to regularize. ...
0
votes
1answer
31 views

Finding value of theta in linear classification

I have an examing coming up, and I'm practicing with exams from previous years. However, the answers to the questions are not provided unfortunately. I'm currently doing the question below, and the ...
1
vote
0answers
9 views

Prediction problem across a wide space

I have assembled a database of Clash Royale games in an attempt to understand the outcomes of various match-ups. The game is composed of an 8 card deck drawn from 102 cards. As you can see from the ...
0
votes
1answer
17 views

SKLearn - Understanding Discrepancy Between LogisticRegressionCV classification_report and scores_

Cross-posting from Stack Overflow: I'm running into a weird situation where my sklearn LogisticRegressionCV model is apparently getting 100% accuracy (the lack of ...
1
vote
1answer
34 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: ...
0
votes
0answers
16 views

How Do I Plot a Nonlinear Decision Boundary? [duplicate]

I finished training my Sci-Kit Learn Logistic Regression model and it is performing at 100% accuracy. However, when I went to plot the decision boundary, I got a bit confused. I am not running the ...
0
votes
1answer
18 views

How to determine a sufficient number of training examples for a linear regression classifier?

How do we determine a sufficient number of training examples for a linear regression classifier? What kind of behaviors might we expect if we use too few training examples?
0
votes
0answers
12 views

In multinomial logistic regression, how to explain the softmax outputs properly?

I tried to solve multiclass problem ("cat", "dog", "horse") problem and figured out that the more words in test text, the more difference between classes. I grouped the ...
0
votes
0answers
19 views

Logistic Regression performs better on longer texts

I trained the LogisticRegression model with TF-IDF (both birgams and unigrams) and while predicting class it revealed that in longer texts (up to 3000 symbols)it works better that if I use short (+-...
0
votes
0answers
15 views

Neural Network probabilities problem

I am using machine learnig to measure probability for the outcome of tennis matches. If the winer is 1 that means that p1 won otherwise p2 won. in Columns LG, SVC, RF and NN there are probaiblities ...
0
votes
0answers
107 views

Non-linear decision boundary in logistic regression algorithm with polynomial features

Lately I have been playing with drawing non-linear decision boundaries using the Logistic Regression Classifier. I used this notebook to learn how to create a proper plot. Author presents a really ...
0
votes
2answers
59 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 ...
2
votes
1answer
118 views

From logistic regression to XGBoost - selecting features to run the model with

I have been asked to look at XGBoost (as implemented in R, and with a maximum of around 50 features) as an alternative to an already existing but not developed by me logistic regression model created ...
1
vote
1answer
45 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 ...
2
votes
0answers
26 views

Assessing model performance on different sub-segments

I am currently working on a credit risk related project where i built a binary logistic regression model for an imbalanced dataset. According to the regulations i have to prove that the model performs ...
0
votes
2answers
23 views

Impossible to increase model accuracy [closed]

I'm building binary classification models on my company's dataset. The problem I'm having is that I haven't been able to increase the accuracy of my models. I have trained, tuned, cross validated ...
0
votes
1answer
32 views

Predicting results of tennis matches based on historical data [closed]

I am writing my Bachelor thesis in Python about predicting results of tennis matches based on historical data. I have started from Logistic Regression but my model isn't efficient. If you could look ...
0
votes
0answers
14 views

How many positive responses are good enough for building a marketing response model when the response rate is low(0.5%)

We are planning a marketing campaign to collect data and the response rates for a random sample. Total population size is 10 million and historically, response rates are low (0.5 - 0.65 %). How long ...
1
vote
2answers
51 views

How much data do you need to build a classifier?

I would like to ask you what a good size of dataset would be for building a classifier. I know that there are datasets of 1000 obs and datasets of 1m obs. But I also read papers where classifiers were ...
2
votes
1answer
24 views

Including column of indices as predictor for model?

I have a small dataset consisting of 1000 observations (rows), 11 predictors + 1 response (12 columns). It is a toy dataset used for learning purposes in a machine learning class at university -- ...
3
votes
1answer
259 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
0answers
7 views

What is the explanation of discretized log logistic in the following code? Is there any reference regarding this piece of code?

I have taken the following piece of code from the OpenAI code of GitHub from the following link: https://github.com/openai/iaf/blob/master/tf_utils/distributions.py#L28 def discretized_logistic(mean, ...
1
vote
0answers
38 views

What's the order in applying SMOTE transformation in a pipeline?

Here's the thing, I have an imbalanced data and I was thinking about using SMOTE transformation. However, when doing that using a sklearn pipeline, I get an error because of missing values. This is my ...
1
vote
1answer
52 views

Modifying binary classification to Multi-Class Classification (Logistic Regression) [closed]

I am using this code that I found here for logistic regression for binary classification with 2 classes. Git Repo The data that I am testing with is calling for multi-class classification (6 classes). ...
2
votes
1answer
29 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 ...
0
votes
0answers
158 views

SVM is taking too long for hyperparameter tuning

I am running SVM,Logistic Rregression and Random Forest on the credit card dataset. My training dataset has the shape (454491, 30). I performed 5-fold cross validation(which took more than an hour) ...
1
vote
1answer
32 views

Area under the ROC curve approximation

I wanted to compute the Area under the ROC curve for a logistic regression model in the context of binary classification. For that I computed, for a list of thresholds, say 0.1 0.2 ... 0.9, the TPR ...
1
vote
0answers
46 views

How to Fit S shape (Sigmoid Function) in my scatterplot [closed]

How to interpret my chart? I want to get the maximum likelihood in logistic regression with this result (I'm really not sure if this is how it looks like): I am currently using logistic regression to ...
2
votes
3answers
289 views

Train/Test size and bias

I'm running a classifier (logistic regression). The information on my dataset are the following: dataset size= 279 observations (80/20 rule) ...
4
votes
1answer
91 views

How to include categorical fields to enhance a text classification

I would have a question on how to add more categorical fields in a classification problem. My dataset had initially 4 fields: ...
0
votes
0answers
19 views

How to model a non linear distribution using logistic regression

To put us on the same page the goal for a logistic regression is to determine a vector of real numbers which will serve as coefficients producing a linear combination of the feature vector values (...

1
2 3 4 5
11