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
21 votes
3 answers
9k views

Linear regression with non-symmetric cost function?

I want to predict some value $Y(x)$ and I am trying to get some prediction $\hat Y(x)$ that optimizes between being as low as possible, but still being larger than $Y(x)$. In other words: $$\text{cost}...
user avatar
9 votes
3 answers
23k views

How to plot logistic regression decision boundary?

I am running logistic regression on a small dataset which looks like this: After implementing gradient descent and the cost function, I am getting a 100% accuracy in the prediction stage, However I ...
user avatar
  • 281
1 vote
2 answers
2k views

Finding optimal weights for models

I'm trying to implement an algorithm to find the minimal value of a function. Before moving to sigmoid activation functions, i'm trying to understand linear regression. Usually, a gradient descent ...
user avatar
  • 389
7 votes
1 answer
4k views

Why does logistic regression in Spark and R return different models for the same data?

I've compared the logistic regression models on R (glm) and on Spark (LogisticRegressionWithLBFGS) on a dataset of 390 obs. of ...
user avatar
  • 113
1 vote
2 answers
116 views

Regression Algorithms in Production

I am interested in predicting if a doctor would prescribe a specific drug and have chosen Logistic Regression as a starting point. I have a few questions: Is feature selection the first step to take ...
user avatar
13 votes
1 answer
7k views

What is the difference in xgboost binary:logistic and reg:logistic

What is the difference in R in xgboost between binary:logistic and reg:logistic? Is it only in evaluation metric? If yes, how does RMSE on binary classification compare to error rate? Is the ...
user avatar
5 votes
2 answers
181 views

Confused AUC ROC score

I am working on binary classification problem, I try to evaluate the performance of some classification algorithms (LR,Decission Tree , Random forest ...). I am using a cross validation technique (to ...
user avatar
  • 103
3 votes
3 answers
448 views

Model performance worsens after Cross Validation

I am training a logistic regression model on a dataset with only numerical features. I performed the following steps:- 1.) heatmap to remove collinearity between variables 2.) scaling using ...
user avatar
  • 1,261
27 votes
3 answers
108k views

How to get p-value and confident interval in LogisticRegression with sklearn?

I am building a multinomial logistic regression with sklearn (LogisticRegression). But after it finishes, how can I get a p-value and confident interval of my model? It only appears that sklearn only ...
user avatar
  • 371
12 votes
2 answers
3k views

The differences between SVM and Logistic Regression

I am reading about SVM and I've faced to the point that non-kernelized SVMs are nothing more than linear separators. Therefore, ...
user avatar
  • 5,654
6 votes
2 answers
2k views

Voting combined results from different classifiers gave bad accuracy

I used following classifiers along with their accuracies: Random forest - 85 % SVM - 78 % Adaboost - 82% Logistic regression - 80% When I used voting from above classifiers for final classification, ...
user avatar
  • 367
5 votes
2 answers
334 views

How to adjust cofounders in Logistic regression?

I have a binary classification problem where I apply logistic regression. I have a set of features that are found significant. But I understand that Logistic regression doesn't consider feature ...
user avatar
  • 2,163
10 votes
4 answers
2k views

Is this a good practice of feature engineering?

I have a practical question about feature engineering... say I want to predict house prices by using logistic regression and used a bunch of features including zip code. Then by checking the feature ...
user avatar
9 votes
3 answers
7k views

What cost function and penalty are suitable for imbalanced datasets?

For an imbalanced data set, is it better to choose an L1 or L2 regularization? Is there a cost function more suitable for imbalanced datasets to improve the model score (...
user avatar
  • 91
7 votes
2 answers
6k views

Regression model to predict probability of rare event

I have a dataset with around 900.000 records, around 1000 of which are marked as positive (the studied event occurred). The probability of the event occurring is always low (i.e. < 0.1), and I ...
user avatar
  • 71
3 votes
4 answers
396 views

Why are deep learning models unstable compare to machine learning models?

I would like to understand why deep learning models are so unstable. Suppose I use the same dataset to train a machine learning model multiple times (for example logistic regression) and a deep ...
user avatar
  • 121
2 votes
1 answer
2k views

Normal distribution instead of Logistic distribution for classification

Logistic regression, based on the logistic function $\sigma(x) = \frac{1}{1 + \exp(-x)}$, can be seen as a hypothesis testing problem. Where the reference distribution is the standard Logistic ...
user avatar
2 votes
0 answers
663 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 ...
user avatar
  • 157
1 vote
0 answers
65 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): ...
user avatar
  • 131
2 votes
1 answer
3k views

Updating One-Hot Encoding to account for new categories

My question is focused around how to appropriately update an encoded feature set when a new category is introduced by the test data. I use the data in logistic regression and I know it is not a 'live' ...
user avatar
2 votes
1 answer
347 views

difference between feature interactions and confounding variables

Let me define the problem space. I am working a binary classification problem. I am trying to build a causal model as well as predictive model. My aim is to find list of significant features (based ...
user avatar
  • 2,163
2 votes
2 answers
1k views

What is the purpose of Logit function? At what stage of model building process this logit function is used?

We have two prominent functions (or we can say equations) in logistic regression algorithm: 1. Logistic regression function. 2. Logit function. I would like to know: a. Which of these equation(s) is/...
user avatar
1 vote
1 answer
45 views

When it is okay to stick with low performance models?

I posted here already but it is marked to close, so thought of posting it here (as this might be the right forum) Am working on a simple logistic regression with 1000 records and 28 features. My ...
user avatar
  • 2,163
0 votes
1 answer
100 views

Interpretation of Log Odds in Logistic Regression

$\log(\text{odds}) = \text{logit}(P)=ln \big({{P}\over{1-P}}\big)$ $ln\big({{P}\over{1-P}}\big)=\beta_0+\beta_1x$ Consider this example: $0.7=\beta_o+\beta_1(x)+\beta_2(y)+\beta_3(z)$ How can this ...
user avatar
  • 239
0 votes
1 answer
107 views

Improving precision and recall for imbalanced large data set

I have a data set of 1 million points and 30 features. The output variable has multiple classes (1 to $n$) but the problem I'm interested in is only concerned whether the output belongs to class 1 or ...
user avatar