Questions tagged [logistic-regression]
Refers generally to statistical procedures that utilize the logistic function, most commonly various forms of logistic regression
28
questions
22
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}...
10
votes
3
answers
28k
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 ...
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 ...
13
votes
1
answer
8k
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 ...
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 ...
5
votes
2
answers
212
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 ...
4
votes
3
answers
576
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 ...
2
votes
2
answers
215
views
Feature Importance without Random Forest Feature Importances
Is their an intuitive way of finding feature importances without just using the random forest feature importances method?
I have a binary logistic regression problem where I have binary features (1 or ...
1
vote
2
answers
123
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 ...
30
votes
3
answers
122k
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 ...
12
votes
2
answers
4k
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, ...
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 ...
10
votes
3
answers
8k
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 (...
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 ...
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, ...
5
votes
2
answers
435
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 ...
4
votes
4
answers
877
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 ...
2
votes
0
answers
1k
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 ...
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' ...
2
votes
1
answer
450
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 ...
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 ...
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/...
1
vote
0
answers
86
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):
...
1
vote
1
answer
53
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 ...
1
vote
1
answer
1k
views
Why do we need the sigmoid function in logistic regression?
What is the purpose of the logistic sigmoid function as it is used in logistic regression? Why does it need to be part of the hypothesis function h(x) ?
As I understand it, the logistic sigmoid ...
0
votes
1
answer
123
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 ...
0
votes
1
answer
573
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 ...
0
votes
0
answers
71
views
Different training score but same test score when using pipeline
I have a problem that produce different training score when using pipeline and manual.
MANUAL :
...