# Tag Info

### Examples where simple classifier systems out-perform deep learning

Of course there are!! And this is a great question! I myself have discovered recently what follows! Deep learning architectures are good on unstructured data, such as time series, images, audio, ...
• 639

### Logistic Regression Modeling & Interpretation

For the first question, I can see that interest rate and grade have extremely high correlation of -0.95. The correlation to the target also show almost the same if you take the absolute value (both ...
• 256
Accepted

### Logistic Regression using Logisticregression() class

The Note you reference was added back when the only solver available in LogisticRegression was LIBLINEAR, and that solver uses ...
• 10.8k

### Why am I getting the exact same results with both a Logistic Regression and Decision Tree Classifier?

Running multiple times should indeed have no effect (if you used a random seed). Although sklearn documentation for logistic regression mentions that it is possible ...
• 518
Accepted

### Do Linear Regression and Logistic Regression models from sklearn include regularization?

In sklearn they are presented in a different way as you expected. Linear regression is without any regularization term, if you look for a regularized version as the ...
• 246

### How to generate a rule-based system based on binary data?

Decision trees should be able to give you good results, but you might need to increase the depth in order to reach very specific rules involving many variables. Each leaf of the tree represents a ...
• 24.5k
Accepted

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

No, there is no threshold for the amount of training data that can ensure ~100% accuracy for arbitrary models and data. Not all models have the same capacity (e.g. linear regression can represent ...
• 19.2k

### How do I get the mean values that are greater than .5 for my model?

So if I understand you correctly you want to "one-hot-encode" or dummy-encode your variable "specialty" so that it goes from an interval scaled variable to a binary variable where ...
• 1,713

### Understanding log odds equation with multiple variables

Assuming obesity is an indicator variable (0 for non and 1 for obese), then when someone is NOT obese, value of 0.415 * obese = 0. When obese = 1, then 0.415 is added to the 0.655 * age group. Without ...
• 904
Accepted

### Checking the interpretation of log odds in logistic regression (with multiple variables)

May I be wrong, but I do not think 2.5 times more. Considering you are not measuring the probability of heart disease to non-hypertension. On this way, your first sentence is correct, but the second, ...
• 116

### Tweak machine learning algorithm in SciKit to optimize for recall

Pursuing recall alone is not a well-defined decision rule: just classify everything as 1 and you'll get 100% recall. Actually, anything threshold-sensitive is not a very good optimization target, ...
• 656

### ROC Curve for model validation

The only ways that I can see how a ROC curve could be used for model validation is to check that it is above the $45$-degree line from $(0,0)$ to $(1,1)$. If the curve is below this, then then model ...
• 3,744

### ROC Curve for model validation

AUC is generally a good, relatively stable metric for evaluating a binary classifier. Looking at individual ROC curves not so much. The standard definition 'area under the ROC curve' translate that ...
• 2,377
Accepted

### Difference between sklearn's LogisticRegression and SGDClassifier?

Logistic regression has different solvers {‘newton-cg’, ‘lbfgs’, ‘liblinear’, ‘sag’, ‘saga’}, which SGD Classifier does not have, you can read the difference in the articles that sklearn offers. SGD ...
• 376

### Is Linear kernel SVM always better than Logistic regression?

SVM may perform worse than Logistic Regression when the dataset is small, thus data points near the decision boundary (Support Vectors) may not be a true representation of the actual decision boundary,...
• 51

### How to calculate accuracy of a logistic regression?

You need a threshold value $t$ to assign a class based on the probability, so that if $p < t$ you assign it to class 0, and if $p >= t$ you assign it to class 1. Then, you can compute the ...
• 19.2k
Accepted

### Which intrinsically explainable model has the highest performance?

To add a bit more to @noe 's answer: when you have a small number of features, explainable models can do a lot for you because they usually operate by making a prediction directly using the input ...
• 156

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

The default threshold is 0.5, so it is computed on that basis. It is kind of a problem as it isn't well documented (not even on the logistic regression predict page) and a very common pitfall. The two ...
• 2,377
1 vote
Accepted

### What is the best way to determine if there is variable interactivity between independent parameters in a prediction model

You can add an interaction term to the linear regression model. An interaction term models the effect that one feature has at different levels of another feature. If nationality is one-hot encoded, ...
• 19.5k
1 vote

### How can the deviance of my model be higher than the null deviance?

After looking over the model, I discovered that the problem was insufficient convergence on the test set due to overfitting, which was resolved through increasing the strength of the L2 regularization....
• 111
1 vote

### Tweak machine learning algorithm in SciKit to optimize for recall

You can use the balanced accuracy metric for such cases. It is defined as the average of recall obtained on each class. ...
1 vote

### Tweak machine learning algorithm in SciKit to optimize for recall

It is always tough when you have extreme unbalance in you classes. If you are able to do so, consider oversampling the minority class or undersampling the dominant class to create better balance. But ...
• 586
1 vote

### How to find the optimal cut-off point to minimize both the FNR and FPR in R?

Here are the libraries I used: p_load(ROCR, tidyverse, reshape2) I had to run the pull several times to get the csv to download. ...
• 163
1 vote
Accepted

### Is it possible to implement logistic regression (or any other ML method) to impute null values in a categorical feature with multiple values?

I am not saying this is a good idea. You could use multinomial models (logistic, trees). The test you posed "get an accurate imputation" is hard. Given the missing values are unknown, you ...
• 904
1 vote

### Error when predicting breast cancer using logistic regression

You need to use dropna before train test split. Xtest has na because it was made from df having na
• 311
1 vote

### Predict data using Pre-Trained Classification Model

Yes. Whatever steps/processing you have done to the data before feeding it to the model, all of steps needs to be done again in the raw data. Ideally you should create a function which takes the data/...
1 vote

### LSTM basic doubt

First of all LSTM does not know the word it received, not at least in the sense that you think. LSTM like all neural net cell works with numeric vector representation. Even if you would build a ...
• 4,603
1 vote

### NLP logistic regression

This is a completely plausible model. You have five features (probably one-hot encoded) and then a categorical outcome. This is a reasonable place to use a (multinomial) logistic regression. Depending ...
• 3,744
1 vote

### How do I modify a Logistic Regression to target a specific point on the ROC curve?

Yes, it is actually that simple :) The ROC curve is made of all the points obtained by varying the classification threshold on the predicted score (usually a probability) above which instances gets ...
• 24.5k
1 vote

### How Logistic Regression nomogram is constructed from binary classifier?

The maths if very simples for this : ...
• 1,799

Only top scored, non community-wiki answers of a minimum length are eligible