Skip to main content

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
1 answer
26 views

Why does precision decrease with inceasing threshold?

I've trained a Logistic Regression model using scikit-learns LogisticRegression class. I'm dealing with stock data so it's quite noisy and difficult to predict ...
Bryan Carty's user avatar
0 votes
1 answer
35 views

ROC curve manual calculation vs. pROC package R

I want do recreate ROC curve manually on my dataset and compare it to roc function from pROC package in R. I'm using dataset on customer churn telco.csv from Kaggle....
Nikola's user avatar
  • 1
0 votes
0 answers
30 views

How to Determine the Minimum Value of a Continuous Variable for Predicting Categorical variable using Logistic Regression?

I am using logistic regression to predict df['MortSubiteCardiaque'], which contains 0 and 1, based on my continuous variable df['NTProBNP']. I would like to determine the threshold for df['NTProBNP'], ...
Mohamed kenani's user avatar
1 vote
1 answer
29 views

Multinomial Logistic Regression sensitive to choice of Encoding

I am using the following LogisticRegression model using sklearn. The task requires to select one label from multi-labels, so if I provide a, b the output could be <...
user_04248753498's user avatar
0 votes
0 answers
25 views

How many different confusion matrices?

We want to determine whether a data point belongs to the class + or −. We train a classifier using binary logistic regression. Each data point has two features, f1 and f2, which can take the values 1 ...
dacritical's user avatar
0 votes
1 answer
34 views

Selecting optimal regression model using cross validation

I have a logistic mixed model (lme4 package in R). I want to assess whether participants scores on the measures 'sumspq', 'sumpdi', and 'sumcaps' significantly affect the difference in performance ...
SilvaC's user avatar
  • 103
2 votes
0 answers
49 views

Why is cross-entropy increasing with accuracy?

I'm making an implementation of the softmax regression and I'm struggling to understand the nature behind the problem of increasing value of Cross-Entropy: $H(y_i, p_i)=-\sum_{i=1}^C y_i log(p_i)$, ...
JoshJohnson's user avatar
1 vote
0 answers
36 views

Analysis of relationship between accuracy and total loss (or cost) during training with logistic loss function and threshold 0.5

I'm trying to understanding the relationship between training accuracy and training loss in classification tasks, specifically using logistic regression. When using logistic loss as the loss function ...
Tran Khanh's user avatar
0 votes
0 answers
50 views

Help with multinomial logistic regression

I am a data science student and have the opportunity to work on an article regrading cardiac arrests in our country. For now I performed the multinomial regression model and I also plan on doing a ...
Ni Vaznu's user avatar
0 votes
1 answer
112 views

Random Forest overfitting to unbalanced data set

I am working on an unbalanced classification problem. I have have 2000 points which are positive, and 6000 points as -ve (chosen randomly from 100k universe of -ve points universe). Although I have ~...
Gupta's user avatar
  • 75
1 vote
2 answers
116 views

Does it make sense to tune a model in scikit-learn and copy/paste the parameters into Rust's linfa?

I have a situation where my data can only be read from in a hosted Python environment, due to data security reasons. However, I am constrained to run ML models in a Rust environment due to work-...
wtwtwt's user avatar
  • 111
0 votes
0 answers
19 views

Logistics or linear regression for a regression task involving outputs between 0 and 1

Problem Consider a regression task of mapping inputs $X$ to outputs $y$ where $y \in [0,1]$. Two linear models that we can use to model this input-output relationships are logistic regression $f_\...
AXCLRoseUp's user avatar
0 votes
0 answers
50 views

Doubts on a custom loss function for regression problems

From what I read, I know we don't use log loss or cross entropy for regression problems. However, the entire logic behind binary cross entropy(say) is to firstly squeeze the y_hat between 0 and 1 (...
the_he_man's user avatar
1 vote
1 answer
72 views

Linear Regression and Logistic Regression

I'm a beginner, and I'm wondering whether a logistic regression in a nut-shell is just normalizing a linear regression? Correct me if I'm wrong, but I came to this conclusion because the predicted ...
Justin Jonany's user avatar
0 votes
0 answers
7 views

Error while using saved logistic regression model on scoring vector data -The columns of A don't match the number of elements of x. A: 6011, x: 232964

0 I'm getting error while using saved logistic regression model on scoring vector data. SparkException: [FAILED_EXECUTE_UDF] Failed to execute user defined function (ProbabilisticClassificationModel$$...
Kunal Sinha's user avatar
0 votes
0 answers
22 views

Mplus Monte Carlo Sim w/Covariates

I have an Mplus INP file with which I am running a Monte Carlo sim for a latent class analysis. I have the class solution working properly, but I genuinely cannot figure out how to add in covariates ...
JRW's user avatar
  • 1
0 votes
0 answers
29 views

Logistic regression with E-net regularization produces different set of weights with each run

I am currently trying to make a model to classify brain tumor patients by incidence of epilepsy using a combination of variables extracted from clinical records, and radiomics features from segmented ...
reuben george's user avatar
0 votes
0 answers
72 views

SMOTE-NC not working, Error: Pandas output does not support sparse data

I want to get my SMOTENC to work, but i've been failing successfully ...
user155410's user avatar
0 votes
0 answers
29 views

warning 'newdata' had X row but variables found have Y rows

Linear Discriminant Analysis (LDA)+logistic regression model lda_model <- lda(train_labels ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width, data = train_data) LDA scores for the training ...
Maisha Maliha's user avatar
1 vote
1 answer
42 views

Feature selection for propensity model

I'm trying to build a propensity model for whether or not a customer will buy a second product. I was given data that looks like this: | Age | Income | DaysSince1stPurchase | Bought2ndProduct | |:---- ...
BlueSkyz's user avatar
0 votes
0 answers
24 views

If my logistic regression model is performing well, does it matter if my features don't pass the Box Tidwell Test?

I've built a logistic regression model for binary classification with a high F1 score, but when I run Box-Tidwell tests on continuous independent features/predictive variables, I find non-linearities ...
systems_engineer25's user avatar
1 vote
2 answers
162 views

Gradient Descent: Is the magnitude in Gradient Vectors arbitrary?

I am only just getting familiar with gradient descent through learning logistic regression. I understand the directional component in the gradient vectors is correct information derived from the slope ...
MrHunda's user avatar
  • 11
0 votes
0 answers
33 views

How does non-negative constrained optimization work?

I am dealing with a machine learning problem in which a logistic regression model is trained with under-bound constrained optimization for model interpretability purposes. In a simple 2-dimensional ...
hypothesisusable's user avatar
0 votes
0 answers
24 views

Logistic regression negative coefficient interpretation (reciprocal of negative logistic coefficient )

Suppose if a dependent variable is having a disease (1) and not having a disease (0). similarly , independent variable is smoking and not smoking. here , not smoking as reference group. Again, if ...
Prasanna's user avatar
0 votes
0 answers
70 views

PySpark Logistic regression model weights are inconsistent between runs

I am training a pyspark logistic regression model using pyspark mllib. I am noticing that the weights are not being consistent in between runs. I have set the random seed in the training script and ...
hypothesisusable's user avatar
0 votes
1 answer
91 views

Evaluating overfitting in a logistic regression model

I have developed a logistic regression model for a classification problem and obtained an AUC (Area Under the Curve) score of approximately 0.9. The model was estimated by splitting the available data ...
Derrick's user avatar
0 votes
1 answer
110 views

Why we need solver in LogisticRegression?

Why we need a solver like bfgs in LogisticRegression unlike LinearRegression? Don't we have a close form like LinearRegression?
Mahdi Amrollahi's user avatar
0 votes
0 answers
26 views

pytorch: implementing logistic regression: input dimension of torch.nn.Linear is input.flatten(start_dim=1)

I tried to implement a logistic regression class using pytorch. The following implementation worked. ...
thingy's user avatar
  • 11
0 votes
1 answer
28 views

Help me identify the type of plot and the relationship between the dependent variables

Question: I am not sure how to describe the sample graph attached. Can you please help me identify the type of plot and how to statistically measure the relationship between the dependent variable (Y-...
Leo82's user avatar
  • 1
3 votes
3 answers
160 views

Logistic regression and non-linear relationship

In the Titanic dataset, there are two features, "SibSp" and "Parch," which have an impact on the survival rate. For instance, the survival rate tends to increase when the values of ...
jxqbbb's user avatar
  • 51
0 votes
0 answers
18 views

Getting The Data Right For A Model

I'm looking to use a logistic regression model to predict who is most likely to suffer a heart attack within a population. I have a dependent variable flag for has heart attack along with some other ...
HealthAnalyst's user avatar
1 vote
1 answer
59 views

What should I Improve from my Neural Network Model (Logistic Regression)

Initial Information I built a Neural Network Model (Logistic Regression) to classify Lung Cancer based on the patient's (user) symptoms My dataset is kind of small (only about 276 data) Here is the ...
Jonathan's user avatar
0 votes
1 answer
53 views

Ordering independent variables in relation to the dependent variable

I am building a regression model with some of the following variables: Dependent variable named 'Churned'. This contains either 1 or 0. 1 if they churned and 0 if they did not. Independent variable ...
Jay's user avatar
  • 1
1 vote
2 answers
677 views

Learning from aggregated data

Online and in the literature there seems to be a general consensus that training a machine learning model using aggregated data is harder and/or fundamentally different from training on raw event data....
dendog's user avatar
  • 120
0 votes
0 answers
25 views

Binary logistic regression vs generalized estimating equation (GEE) for time series

I have time series with 322 observations. My dataset contains financial data. My endogenous variable, "target" is a binary variable. My exogenous variables are two continuous variables: &...
Oskar Bieńko's user avatar
0 votes
0 answers
144 views

Ordinal logistic regression prediction and accuracy using statsmodels

I am trying to do a ordinal logistic regression analysis using statsmodels. However, the predictions I'm getting are vastly different from that I get when using SciKit-Learn ...
antikbd's user avatar
  • 101
0 votes
1 answer
137 views

Adjusting the p obtained from a Logistic Regression with 50% prevalence of Disease to the population with 10% prevalence

I have a question regarding Logistic Regression: My dataset consists of a case-control dataset of 100 sick cases and 100 healthy controls (Both fictitious Gaussian distributions. Thus, the prevalence ...
Ricardo's user avatar
0 votes
0 answers
75 views

Machine learning algorithm that predicts text based output based on the input

I have tried creating an algorithm that predicts outputs based on the inputs, like so: input,output a1,b2 b3,c4 d8,e9 As you can see these values increase by 1 each time. This is my code: ...
Rob 's user avatar
  • 1
2 votes
1 answer
92 views

What is the point of final test set in K-fold cross-validation?

I am carrying out logistic regression for my binary classification problem, and I have validated the model with kfold cross-validation (k=10). I don't understand why I need to have a final test set, ...
Karoline Teller's user avatar
0 votes
1 answer
143 views

Neural network architecture for multinomial logit model

I'm working on a neural network model to predict the outcomes of horse races. To date, I've built a model in R using a multinomial logit model (similar to a logit model but with N outcomes, where N = ...
gillenpj's user avatar
0 votes
0 answers
21 views

Given a logistic regression curve, How to select the data points which will result in the given curve?

I have special problem at hand, I know the logistic regression I want (i.e. I know the parameters for the curve), I want to select the data points (independent and dependent variable) which will ...
NAS_2339's user avatar
  • 243
0 votes
0 answers
723 views

Variable lengths differ error message in R

I am running a logistic regression on the spam dataset from https://hastie.su.domains/ElemStatLearn/. The dependent variable is in the last column, which is given ...
gunsnfloyd's user avatar
0 votes
1 answer
42 views

logistic regression graph - understanding data

I am trying to understand why my data is not showing a full S-curve? Is it because the predictor does not do a good job of predicting fellow = 1, or simply because there are few fellow = 1 that score ...
In_cognito's user avatar
0 votes
1 answer
30 views

How sklearn logistic regression computes accuracy, recall etc if we don't provide threshold?

It might be a stupid question, but I just realized that calling score function on logistic regression model shouldn't make any sense - as far as I know in sklearn ...
Brzoskwinia's user avatar
0 votes
0 answers
19 views

How to estimate this variable in an MILP formulation

This is my first question being asked here. I've thought about different methods to do it, but to no avail. I want to estimate a variable that is either 0 or a positive number. Then I want to use this ...
Mohammad Rajabdorri's user avatar
0 votes
1 answer
281 views

Why does Logistic Regression perform better than machine learning models in clinical prediction studies

I am developing binary classification models to predict a medical condition in my dataset. My results show that both Logistic Regression and Linear SVM consistently outperformed other ML algorithms (...
sums22's user avatar
  • 427
1 vote
1 answer
35 views

Why is my predictor value (continuous) perfectly correlated with my logit value (when testing logistic regression model assumptions)?

Question: Why is my predictor value (continuous) perfectly correlated with my logit value (when testing logistic regression model assumptions)? Code: ...
In_cognito's user avatar
0 votes
0 answers
41 views

Logistic Regression, Standardization, Stationarity, Differencing

I am going to be using the logistic regression in which I will use L2 Regularization. I have these 4 rolling standard deviation variables. Here are the results of the Augmented Dickey-Fuller Test for ...
DomIsAwesomee's user avatar
0 votes
1 answer
51 views

Machine learning / statistical model of a deterministic process: how large must my training set be to ensure almost perfect accuracy?

This may be a silly question, but if I got a deterministic process, for instance, a function (in the mathematical sense) that happens to be computationally expensive to evaluate, and I decided to ...
Koto's user avatar
  • 103
0 votes
2 answers
121 views

Which intrinsically explainable model has the highest performance?

Explainable AI can be achieved through intrinsically explainable models, like logistic and linear regression, or post-hoc explanations, like SHAP. I want to use an intrinsically explainable model on ...
Connor's user avatar
  • 631

1
2 3 4 5
15