How to Calculate Mean, Variance and Std of a Matrix or ndArray?
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

0
This python source code does the following: 1. Creates custom numpy matrix 2. Performs statistical analysis of the matrix
In [1]:
## How to Calculate Mean, Variance and Std a Matrix or ndArray
def Kickstarter_Example_11():
    print()
    print(format('How to Calculate Mean, Variance and Std a Matrix or ndArray'
                 ,'*^72'))
    # Load library
    import numpy as np
    # Create matrix
    matrixA = np.array([[1, 2, 3, 23],
                       [4, 5, 6, 25],
                       [7, 8, 9, 28],
                       [10, 11, 12, 41]])
    # Return median, mean, variance and std
    print(); print("Median: ", np.median(matrixA))
    print(); print("Mean: ", np.mean(matrixA))
    print(); print("Variance: ", np.var(matrixA))
    print(); print("Standrad Dev: ", np.std(matrixA))
Kickstarter_Example_11()
******How to Calculate Mean, Variance and Std a Matrix or ndArray*******

Median:  8.5

Mean:  12.1875

Variance:  118.27734375

Standrad Dev:  10.875538779757076

Relevant Projects

Predict Census Income using Deep Learning Models
In this project, we are going to work on Deep Learning using H2O to predict Census income.

Loan Eligibility Prediction using Gradient Boosting Classifier
This data science in python project predicts if a loan should be given to an applicant or not. We predict if the customer is eligible for loan based on several factors like credit score and past history.

Forecast Inventory demand using historical sales data in R
In this machine learning project, you will develop a machine learning model to accurately forecast inventory demand based on historical sales data.

Predict Churn for a Telecom company using Logistic Regression
Machine Learning Project in R- Predict the customer churn of telecom sector and find out the key drivers that lead to churn. Learn how the logistic regression model using R can be used to identify the customer churn in telecom dataset.

Solving Multiple Classification use cases Using H2O
In this project, we are going to talk about H2O and functionality in terms of building Machine Learning models.

Natural language processing Chatbot application using NLTK for text classification
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.

Customer Churn Prediction Analysis using Ensemble Techniques
In this machine learning churn project, we implement a churn prediction model in python using ensemble techniques.

Resume parsing with Machine learning - NLP with Python OCR and Spacy
In this machine learning resume parser example we use the popular Spacy NLP python library for OCR and text classification.

Human Activity Recognition Using Smartphones Data Set
In this deep learning project, you will build a classification system where to precisely identify human fitness activities.

Data Science Project in Python on BigMart Sales Prediction
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.