This is running guide of https://microsoft.github.io/AI-For-Beginners
Top-Down Approach (Symbolic reasoning) - Reasoning inside the computer
Bottom- Up Approach (Neural Networks) - Using training data
MXN = Y
M = No of samples
N = No. of features
Y = Vector of size M
Set up Virtual Environment
# Create a virtual environment
python -m venv ai_env
# Activate it
# Windows:
ai_env\Scripts\activate
# macOS/Linux:
source ai_env/bin/activate
Numpy
https://jakevdp.github.io/PythonDataScienceHandbook/02.01-understanding-data-types.html
np.array([3.14, 4, 2, 3])
np.array([1, 2, 3, 4], dtype='float32')
# Create a length-10 integer array filled with zeros
np.zeros(10, dtype=int)
# Create a 3x5 floating-point array filled with ones
np.ones((3, 5), dtype=float)
# Create a 3x5 array filled with 3.14
np.full((3, 5), 3.14)
array([[ 3.14, 3.14, 3.14, 3.14, 3.14],
[ 3.14, 3.14, 3.14, 3.14, 3.14],
[ 3.14, 3.14, 3.14, 3.14, 3.14]])
# Create an array filled with a linear sequence
np.arange(0, 20, 2)
array([ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18])
# Create an array of five values evenly spaced between 0 and 1
np.linspace(0, 1, 5)
array([ 0. , 0.25, 0.5 , 0.75, 1. ])