# AI News, A Complete Machine Learning Project Walk-Through in Python: Part One

- On Tuesday, June 5, 2018
- By Read More

## A Complete Machine Learning Project Walk-Through in Python: Part One

Here we are using the seaborn visualization library and the PairGrid function to create a Pairs Plot with scatterplots on the upper triangle, histograms on the diagonal, and 2D kernel density plots and correlation coefficients on the lower triangle.

machine learning model can only learn from the data we provide it, so ensuring that data includes all the relevant information for our task is crucial.

Taking the square root, natural log, or various powers of features is common practice in data science and can be based on domain knowledge or what works best in practice.

The following code selects the numeric features, takes log transformations of these features, selects the two categorical features, one-hot encodes these features, and joins the two sets together.

Features that are strongly correlated with each other are known as collinear and removing one of the variables in these pairs of features can often help a machine learning model generalize and be more interpretable.

(I should point out we are talking about correlations of features with other features, not correlations with the target, which help our model!) There are a number of methods to calculate collinearity between features, with one of the most common the variance inflation factor.

For regression problems, a reasonable naive baseline is to guess the median value of the target on the training set for all the examples in the test set.

Before calculating the baseline, we need to split our data into a training and a testing set: We will use 70% of the data for training and 30% for testing: Now we can calculate the naive baseline performance: The naive estimate is off by about 25 points on the test set.

The second post (available here) will show how to evaluate machine learning models using Scikit-Learn, select the best model, and perform hyperparameter tuning to optimize the model.

- On Thursday, September 19, 2019

**Pre-Modeling: Data Preprocessing and Feature Exploration in Python**

April Chen Data preprocessing and feature exploration are crucial steps in a modeling workflow. In this ..

**Variable/feature Selection | Stepwise, Subset, Forward & Backward selection| Machine Learning**

Variable selection or Feature selection is a technique using which we select the best set of features for a given machine learning model. The same can be used ...

**Interactions among explanatory variables in R**

Learn more about statistical modeling at In thinking about effect size, keep in mind that there ..

**Piecewise Linear Regression | Dummy Variable & Interaction terms**

Piecewise linear regression is suitable when the data looks somewhat non linear so that by partitioning the in to sub sample with the help of threshold and fitting ...

**Introduction to experiment design**

Introduction to experiment design. Explanatory and response variables. Control and treatment groups.

**R Tutorial 13: Variable Selection and Best Subsets Selection (regsubsets)**

This video is going to show how to perform variable selection and best subsets selection using regsubsets() in R. Measures include R-squared, Adjusted ...

**The Best Way to Visualize a Dataset Easily**

In this video, we'll visualize a dataset of body metrics collected by giving people a fitness tracking device. We'll go over the steps necessary to preprocess the ...

**R Stats: Multiple Regression - Variable Selection**

This video gives a quick overview of constructing a multiple regression model using R to estimate vehicles price based on their characteristics. The video ...

**4. Variable Selection and Creating Data Partitions**

How to select which variables to include in models. How to partition data into training and validation partitions.

**Normal Distribution - Explained Simply (part 1)**

I describe the standard normal distribution and its properties with respect to the percentage of observations within each standard deviation. I also make ...