AI, Python, Cognitive Neuroscience
3.88K subscribers
1.09K photos
47 videos
78 files
893 links
Download Telegram
#LogisticRegression is the most commonly used classification #algorithm in the industry. Here are 3 articles to understand the nitty-gritty of this technique:

Simple Guide to Logistic Regression in #R - https://lnkd.in/fQHsskA

Building a Logistic Regression model from scratch - https://lnkd.in/fK79Nf5

How to use Multinomial and Ordinal Logistic Regression in R? - https://lnkd.in/fHFHnDq

✴️ @AI_Python_EN
❇️ @AI_Python
🗣 @AI_Python_arXiv
This guide gives a complete understanding about various #machinelearning algorithms along with R & Python #codes to run them. These #algorithms can be applied to any data problem:
Linear Regression,
Logistic Regression,
Decision Tree,
SVM,
Naive Bayes,
kNN,
K-Means,
#Random Forest.
If you are keen to master machine learning, start right away.

Link : bit.ly/2CpWIjH

#machinelearning #deeplearning #python #coding #linkedin #decisiontrees #logisticregression #linearregression #forest #analytics #randomization #computervision

✴️ @AI_Python_EN
Why are Scikit-learn machine learning models not as widely used in industry as TensorFlow or PyTorch?

The algorithms in scikit-learn are kind of like toy algorithms.

The neural networks are a joke. They were introduced only a couple of years ago and come in two flavors: MLPClassifier and MLPRegressor. MLP is for Multi-layer Perceptron. The name alone should be enough to tell you that this isn’t the greatest implementation. Scikit-learn doesn’t support GPUs and the neural networks don’t scale at all. No one in their right mind would use this in production.

The implementation of the popular gradient boosting algorithm is useless too. Known as GradientBoostingClassifier and GradientBoostingRegressor, it’s a painfully slow implementation that gets completely embarrassed by libraries like XGBoost, LightGBM and CatBoost. I should note that the scikit-learn team is working on a new implementation of gradient boosting that borrows heavily from LightGBM and XGBoost.

The random forest implementation is decent enough, but it generally gets outperformed by gradient boosting on almost any #machinelearning task anyway.

The #SVM implementation with #nonlinear kernels is extremely slow too, and generally useless.

The Naive Bayes implementation is okay, I guess, but it’s not a type of model that one would realistically use in production.

#Logisticregression can actually be useful. If the requirement is a simple classifier that’s fast to train and easy to interpret, this can be a good choice, even in production. I mean, it’s pretty hard to get a dead simple algorithm like that wrong.

The linear regression algorithms are completely fine too. OLS, ridge regression, lasso, elastic nets and what have you. These can be useful for simple tasks that need interpretability.

I love scikit-learn for its helper functions for things like preprocessing, cross-validation, hyperparameter tuning and so on, but it’s generally not a library that’s suited for any sort of heavy lifting when it comes to model training.


✴️ @AI_Python_EN
In #DataScience textbooks I frequently read that #logisticregression (LR) is a misnomer because it's a classifier, not regression.

Some also are disdainful of the method, claiming its predictions are generally poor compared to other classifiers.

Both comments suggest the author became aware of LR through predictive analytics and is unfamiliar with its origins and the ways it is commonly used by statisticians and researchers.

LR, like the more familiar OLS regression introduced to us in Stats 101, is a member of the Generalized Linear Model (GLM) family. These are all regression methods. Regression methods for analyzing categorical data have been widely-used in many fields to help us understand phenomena.

Applied Logistic Regression (Hosmer and Lemeshow) Logistic Regression Models (Hilbe) are two classic books on LR.

Though not its original purpose, LR can also be used for classification. The output of LR are estimated probabilities of group membership. You can set the cutoff wherever you like - 0.50 is only a standard program default and inappropriate for imbalanced data.

The righthand side of the LR equation can also be modified to account for interactions and curvilinear relationships.

LR is not always the best choice for classification but often works very well.

My first serious use of LR was to both explain and predict, in this case, student loan default based on loan application data. I was not aware of the term "predictive analytics" at the time (early '80s) and it probably wasn't yet in use.

Explanation and prediction are not mutually exclusive, though historically LR and stats generally have been used more for explanation. Statisticians tend to frown on equations that don't make sense even if they predict well out of sample. It can be a warning sign.

An arbitrary distinction between "regression" and "classification" has emerged in recent years, the former being used when the dependent variable (label) is continuous or interval and the latter when it is categorical (e.g., purchased/didn't purchase). A statistician will tend to see both cases, as well as when the dependent variable is ordinal, count, or multinomial, as regression problems.

Discriminant analysis, which is related to MANOVA, was designed for classification but can also be used to help us understand a phenomenon.

There are many excellent books on GLM and categorical data analysis, and here are just a few:

- Generalized Linear Models and Extensions (Hardin and Hilbe)
- Generalized Linear Models & Generalized Estimating Equations (Garson)
- Regression Modeling Strategies (Harrell)
- Categorical Data Analysis (Agresti)
- Analyzing Categorical Data (Simonoff)
- Regression Models for Categorical Dependent Variables (Long and Freese)

✴️ @AI_Python_EN