DATA MUNGING
DATA CLEANING PYTHON
MACHINE LEARNING RECIPES
PANDAS CHEATSHEET
ALL TAGS
# How to Calculate Mean, Variance and Std of a Matrix or ndArray?

# How to Calculate Mean, Variance and Std of a Matrix or ndArray?

This recipe helps you Calculate Mean, Variance and Std of a Matrix or ndArray

Statical analysis is very important part preprocessing. Have you tried to do it for matrix?

So this is the recipe on how we can can Calculate Mean, Variance and Std a Matrix or ndArray.

```
import numpy as np
```

We have only imported numpy which is needed.

We have created a matrix by using np.array with different values.
```
matrixA = np.array([[1, 2, 3, 23],
[4, 5, 6, 25],
[7, 8, 9, 28],
[10, 11, 12, 41]])
```

We have calculated mean, median , variance and standard deviation by using numpy functions for a matrix.
```
print("Median: ", np.median(matrixA))
print("Mean: ", np.mean(matrixA))
print("Variance: ", np.var(matrixA))
print("Standrad Dev: ", np.std(matrixA))
```

So the output comes as

Median: 8.5 Mean: 12.1875 Variance: 118.27734375 Standrad Dev: 10.875538779757076

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

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

Data Science Project in Python- Given his or her job role, predict employee access needs using amazon employee database.

In this NLP AI application, we build the core conversational engine for a chatbot. We use the popular NLTK text classification library to achieve this.

Machine Learning Project in R-Detect fraudulent click traffic for mobile app ads using R data science programming language.

Data Science Project in R -Build a machine learning algorithm to predict the future sale prices of homes.

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

In this machine learning and IoT project, we are going to test out the experimental data using various predictive models and train the models and break the energy usage.

In this human activity recognition project, we use multiclass classification machine learning techniques to analyse fitness dataset from a smartphone tracker.

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