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

This recipe helps you subtract the mean of each row of a matrix using numpy

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 Deep Learning Project on Image Segmentation Python, you will learn how to implement the Mask R-CNN model for early fire detection.

In this deep learning project, you will build a convolutional neural network using MNIST dataset for handwritten digit recognition.

In this machine learning resume parser example we use the popular Spacy NLP python library for OCR and text classification.

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

In this time series project, you will forecast Walmart sales over time using the powerful, fast, and flexible time series forecasting library Greykite that helps automate time series problems.

Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

The project will use rasa NLU for the Intent classifier, spacy for entity tagging, and mongo dB as the DB. The project will incorporate slot filling and context management and will be supporting the following intent and entities. Intents : product_info | ask_price|cancel_order Entities : product_name|location|order id The project will demonstrate how to generate data on the fly, annotate using framework and how to process those for different pieces of training as discussed above .

In this OpenCV project, you will learn computer vision basics and the fundamentals of OpenCV library using Python.

Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.

Use the Mercari Dataset with dynamic pricing to build a price recommendation algorithm using machine learning in Python to automatically suggest the right product prices.