DATA MUNGING
# How to calculate dot product of two vectors?

# How to calculate dot product of two vectors?

This recipe helps you calculate dot product of two vectors

This data science python tutorial does the following: 1. Creating customized numpy vectors 2. Taking dot products of two vectors using different methods

In [1]:

```
## How to calculate dot product of two vectors
def Kickstarter_Example_14():
print()
print(format('How to calculate dot product of two vectors','*^72'))
# Load library
import numpy as np
# Create two vectors
vectorA = np.array([1,2,3])
vectorB = np.array([4,5,6])
# Calculate Dot Product (Method 1)
print(); print(np.dot(vectorA, vectorB))
# Calculate Dot Product (Method 2)
print(); print(vectorA @ vectorB)
Kickstarter_Example_14()
```

In [2]:

```
## How to calculate dot product of two matrices
def Kickstarter_Example_14_1():
print()
print(format('How to calculate dot product of two matrices','*^72'))
# Load library
import numpy as np
# Create two vectors
matrixA = np.array([[2, 3, 23],
[5, 6, 25],
[8, 9, 28]])
matrixB = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
# Calculate Dot Product (Method 1)
print(); print(np.dot(matrixA, matrixB))
# Calculate Dot Product (Method 2)
print(); print(matrixA @ matrixB)
Kickstarter_Example_14_1()
```

In [3]:

```
## How to describe a matrix
def Kickstarter_Example_14_2():
print()
print(format('How to describe a matrix','*^72'))
# Load library
import numpy as np
# Create a matrix
matrixA = np.array([[2, 3, 23],
[5, 6, 25],
[8, 9, 28]])
# View number of rows and columns
print(); print("Shape: ", matrixA.shape)
# View number of elements (rows * columns)
print(); print("Size: ", matrixA.size)
# View number of dimensions
print(); print("Dimention: ", matrixA.ndim)
Kickstarter_Example_14_2()
```

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

In this deep learning project, you will build a classification system where to precisely identify human fitness activities.

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.

There are different time series forecasting methods to forecast stock price, demand etc. In this machine learning project, you will learn to determine which forecasting method to be used when and how to apply with time series forecasting example.

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.

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

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

In this data science project, you will work with German credit dataset using classification techniques like Decision Tree, Neural Networks etc to classify loan applications using R.

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

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.