Machine Learning

Sklearn Ridge Regression Ridge Regression Python

Sklearn Ridge Regression | Ridge Regression Python

Ridge regression is similar to linear regression but it uses L2 regularization to reduce overfitting and increase model generalizability. We can quickly implement ridge regression in Python using the Sklearn library. In this tutorial, I will use the diabetes dataset for ridge regression because it is already available in Sklearn. I highly recommend this book for machine …

Sklearn Ridge Regression | Ridge Regression Python Read More »

Sklearn Multiple Linear Regression

Sklearn Multiple Linear Regression | Linear Regression

Linear Regression is a supervised machine-learning algorithm. Linear regression is used for regression problems. We can quickly implement multiple linear regression in Python using the Sklearn library. You have to follow the given steps to implement the multiple linear regression. In this tutorial, I will use this dataset for multiple linear regression. It is available …

Sklearn Multiple Linear Regression | Linear Regression Read More »

Sklearn Logistic Regression Logistic Regression Python

Sklearn Logistic Regression | Logistic Regression Python

Logistic Regression is a supervised machine-learning algorithm. Logistic regression is used for classification problems. It predicts the probability of the target variable. We can quickly implement logistic regression in Python using the Sklearn library. You have to follow the given steps to implement the logistic regression. Step 1: Import the libraries Step 2: Import the …

Sklearn Logistic Regression | Logistic Regression Python Read More »

Sklearn Naive Bayes

Sklearn Naive Bayes | Naive Bayes classifier in Python

Naive Bayes classifiers are supervised machine learning algorithms. The Naive Bayes algorithms are based on Bayes’ theorem. We can quickly implement the Naive Bayes classifier in Python using the Sklearn library. You have to follow the given steps. Step 1: Import the libraries Step 2: Import the iris dataset sepal_length sepal_width petal_length petal_width species 0 …

Sklearn Naive Bayes | Naive Bayes classifier in Python Read More »

Sklearn KNN

Sklearn KNN | k-nearest neighbor classifier in Python

KNN (k-nearest neighbor) is a supervised machine learning algorithm. The KNN algorithm can be used for classification and regression. We can quickly implement KNN in Python using the Sklearn library. You have to follow the given steps. Step 1: Import the libraries Step 2: Import the iris dataset sepal_length sepal_width petal_length petal_width species 0 5.1 …

Sklearn KNN | k-nearest neighbor classifier in Python Read More »

Train Test Split Sklearn

Train Test Split Sklearn

In this article, you’ll see the implementation of a train-test split in Python using Sklearn. If you want to learn machine learning, I recommend you get the “Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow” book. In this example, we will use the iris dataset. There are 150 rows and 5 columns in this dataset. …

Train Test Split Sklearn Read More »