DATA MUNGING
DATA CLEANING PYTHON
MACHINE LEARNING RECIPES
PANDAS CHEATSHEET
ALL TAGS
# How to ADD numerical value to each element of a matrix?

# How to ADD numerical value to each element of a matrix?

This recipe helps you ADD numerical value to each element of a matrix

Have you tried to add a constant element in a matrix?

So this is the recipe on how we can add a constant to each element of a matrix.

```
import numpy as np
```

We have only imported numpy which is needed.

We have created a matrix a matirx on which we will perform operation.
```
matrixA = np.array([[2, 3, 23],
[5, 6, 25],
[8, 9, 28]])
```

We have made a lambda function to add 100 in every value of matrix. We have created an object to add 100 in the vector form of matrix.
```
add_100 = lambda i: i + 100
vectorized_add_100 = np.vectorize(add_100)
print(vectorized_add_100(matrixA))
```

So the output comes as

[[102 103 123] [105 106 125] [108 109 128]]

Data Science Project - Build a recommendation engine which will predict the products to be purchased by an Instacart consumer again.

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

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 project, we are going to talk about Time Series Forecasting to predict the electricity requirement for a particular house using Prophet.

Data Science Project in R-Predict the sales for each department using historical markdown data from the Walmart dataset containing data of 45 Walmart stores.

In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

In this ensemble machine learning project, we will predict what kind of claims an insurance company will get. This is implemented in python using ensemble machine learning algorithms.

Text data requires special preparation before you can start using it for any machine learning project.In this ML project, you will learn about applying Machine Learning models to create classifiers and learn how to make sense of textual data.

In this machine learning churn project, we implement a churn prediction model in python using ensemble techniques.

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