MACHINE LEARNING RECIPES
DATA CLEANING PYTHON
DATA MUNGING
PANDAS CHEATSHEET
ALL TAGS
# Subtract the mean of each row of a matrix?

# Subtract the mean of each row of a matrix?

Subtract the mean of each row of a matrix

So this recipe is a short example on how to subtract the mean of each row of a matrix. Let's get started.

```
import numpy as np
```

Let's pause and look at these imports. Numpy is generally helpful in data manipulation while working with arrays. It also helps in performing mathematical operation.

```
a = np.random.rand(3, 4)
print(a)
```

We have created a random array of size 3x4.

```
b = a - a.mean(axis=1, keepdims=True)
print(b)
```

First, we find mean across each row and then subtract it from the original array. Finally, we are printing down the new array.

Once we run the above code snippet, we will see:

Scroll down to the ipython file below to visualize the output.

In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.

Machine Learning Project - Work with KKBOX's Music Recommendation System dataset to build the best music recommendation engine.

Deep Learning Project- Learn to apply deep learning paradigm to forecast univariate time series data.

This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

The goal of this data science project is to build a predictive model and find out the sales of each product at a given Big Mart store.

In this project, we are going to talk about H2O and functionality in terms of building Machine Learning models.

In this deep learning project, we will predict customer churn using Artificial Neural Networks and learn how to model an ANN in R with the keras deep learning package.

In this machine learning project, you will uncover the predictive value in an uncertain world by using various artificial intelligence, machine learning, advanced regression and feature transformation techniques.

PySpark Project-Get a handle on using Python with Spark through this hands-on data processing spark python tutorial.

In this project, we are going to talk about Time Series Forecasting to predict the electricity requirement for a particular house using Prophet.