# marklu87/machine-learning-intro

2 years ago

### Introduction to Machine Learning

#### Linear Regression

##### Linear Regression model

$\hspace{2.5cm} X \hspace{1.1cm} \times \hspace{1.2cm} W^T \hspace{1.2cm} + \hspace{1cm} b \hspace{2cm}$

$\left[ \begin{array}{cc} 73 & 67 & 43 \\ 91 & 88 & 64 \\ \vdots & \vdots & \vdots \\ 69 & 96 & 70 \end{array} \right] % \times % \left[ \begin{array}{cc} w_{11} & w_{21} \\ w_{12} & w_{22} \\ w_{13} & w_{23} \end{array} \right] % + % \left[ \begin{array}{cc} b_{1} & b_{2} \\ b_{1} & b_{2} \\ \vdots & \vdots \\ b_{1} & b_{2} \\ \end{array} \right]$

#### Feedfoward Neural Network

Conceptually, you think of feedforward neural networks as two or more linear regression models stacked on top of one another with a non-linear activation function applied between them.

To use a feedforward neural network instead of linear regression, we can extend the nn.Module class from PyTorch.

In [1]:
!pip install jovian --upgrade -q
In [2]:
import jovian
In [3]:
jovian.commit()
[jovian] Saving notebook.. 
[jovian] Creating a new notebook on https://jovian.ml/ [jovian] Please enter your API key ( from https://jovian.ml/ ): API Key:········ [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/marklu87/6f6b1db6972a4b3684825a3cde57b19d 
In [4]:
test = 'new test'
In [ ]:
jovian.commit()
[jovian] Saving notebook.. 
In [ ]: