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
2 votes
0 answers
38 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
33 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
26 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
55 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
79 views

Does it make sense to train data in scikit-learn and copy+paste 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
38 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
65 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
4 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
17 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
21 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
26 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
10 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
26 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
14 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
101 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
32 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
20 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
52 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
58 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
37 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
21 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
  • 1
0 votes
1 answer
26 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
133 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
53 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
40 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
327 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
17 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
114 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
88 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
52 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
0 votes
1 answer
46 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
90 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
20 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
  • 233
0 votes
0 answers
518 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
39 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
0 answers
34 views

Matlab - Machine Learning: Hyperparameter tuning of a fitcecoc - model + training it on new data

I have trained a logistic regression multi-class model in Matlab for multi-class classification using XTrainSet_A / YTrainSet_A, look at this simplified code: ...
De Ro's user avatar
  • 1
0 votes
1 answer
24 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
15 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
145 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
  • 417
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
33 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
0 answers
19 views

Classification problem with a numerical variable that uses a special (high) value to indicate a qualitatively different status

I have a classification problem where I need to predict an outcome based on 20+ variables, some categorical, some numerical. One of the numerical variables is 'dlast' - which is the number of days ...
Ido Sarig's user avatar
  • 101
0 votes
1 answer
41 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
83 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
  • 617
1 vote
0 answers
90 views

What is ROC curve based on for SVM?

I was studying about the ROC curves for Logistic regression. There is a threshold in this method that determines the classification. By changing this threshold we get different confusion matrices and ...
Mina's user avatar
  • 111
0 votes
2 answers
27 views

How will a model handle real-life values in real-life applications without scaling?

I am learning ML and facing confusion about data scaling. For example, I have the following data: Weight(KG) Balance($) 75 3401542 99 4214514 Now, if I use StandardScaler, I may get something like ...
Ishrat Hossain's user avatar
0 votes
1 answer
736 views

How to calculate accuracy of a logistic regression?

A logistic regression involves a linear combination of features to predict the log-odds of a binary, yes/no-style event. That log-odds can then be transformed to a probability. If $\hat L_i$ is the ...
Dave's user avatar
  • 3,909
0 votes
1 answer
29 views

What statistical model suits for this problem?

I have a dataset with 6 target variables and the target variables are Boolean. The requirement is to use logistic regression to build the model. Which ML approach can be used in this situation? Will ...
Miuni Nihara's user avatar

1
2 3 4 5
15