INTRO TO
DATA SCIENCE
By: ACM Artificial Intelligence
TABLE OF CONTENTS
01
04
02
05
03
06
ABOUT ACM AI
BASIC CONCEPT OF AI/ML
WHAT’S DATA SCIENCE
INTRO TO NUMPY
EXPLORE NUMPY
CODING CHALLENGE
ACM ARTIFICIAL
INTELLIGENCE
01
OUR TEAM
ASHLEY
TEAM LEAD
DANI
VP, AI OFFICER
KYLE
AI OFFICER
DULCE
AI OFFICER
GABRIELLA
AI OFFICER
RYAN
AI OFFICER
SEBASTIAN
AI OFFICER
ANTHONY
AI OFFICER
BASIC CONCEPT OF AI/ML
02
Machine Learning? I’d rather it didn’t
Neural networks are just big fancy decision trees
We use statistics instead of booleans!
We don’t need to build the tree ourselves because we have math for that!
INTRO TO DATA SCIENCE
03
DEFINITION
Data Science is the science which uses computer science, statistics and machine learning, visualization and human-computer interactions to collect, clean, integrate, analyze, visualize, interact with data to create data products.
data product: an insight or tool created out of raw data that can be used to improve decision making
Where Data Science
fits in
DATA -> DATA PRODUCT
DATA | DATA PRODUCT |
Medical Data | Diagnosis |
Movies Data | Recommendation System |
Scam Email Data | Email Fraudulent Detection System |
Real-time Traffic Data | Navigation, Map |
Stock Market Data | Stock Prediction Tool |
takes the
most time
PROGRAMMING LANGUAGES
Python
R
Julia
Scala
PROGRAMMING LANGUAGES
Python
R
Julia
Scala
Most common
INTRO TO NUMPY
04
What is Numpy?
Python’s library for creating N-dimensional arrays
Ability to quickly broadcast functions
Built-in linear algebra, statistical distribution, trigonometric, and random number capabilities
Creating your first Numpy Array
acmcsuf.com/intro-ds-sp24-collab (Copy to your Drive)
import numpy as np
numpy_array = np.array([1,2,3])
numpy_matrix = np.matrix([[1,2,3],[4,5,6]])
arange()
acmcsuf.com/intro-ds-sp24-collab
Syntax: np.arange(start,stop,step)
one_to_ten = np.arange(1,11) # 11 is exclusive
one_to_ten_with_step = np.arange(1,11,2)
Output: [1,3,5,7,9]
random.rand()
acmcsuf.com/intro-ds-sp24-collab
Syntax: np.random.rand(rows,columns)
random_array = np.random.rand(5,10) # 5x10 matrix
random.randint()
acmcsuf.com/intro-ds-sp24-collab
Syntax: np.random.randint(start,end,(rows,columns))
randomint_array = np.random.randint(1,10,(5,5)) # 5x5 matrix with random integer from 1 to 9
reshape()
acmcsuf.com/intro-ds-sp24-collab
Syntax: YOUR_ARRAY.reshape(rows,columns)
original_array = np.arange(1,17)
reshaped_array = original_array.reshape(4,4)
reshaped_array = original_array.reshape(5,5) #ERROR
Note: Matrix size = rows x columns
Numpy Indexing
acmcsuf.com/intro-ds-sp24-collab
Standard Python indexing
np_arr = np.arange(1,11)
np_arr[1:5] # 2,3,4,5
np_arr_2d = np.random.randint(1,10,(5,5))
np_arr_2d[0] # first row
np_arr_2d[0,2] # first row, third column
Numpy Selecting
acmcsuf.com/intro-ds-sp24-collab
np_arr_select = np.array([10,20,-1,-2,-30])
np_arr_select[np_arr_select > 0] # 10,20
np_arr_select[np_arr_select % 2 == 0] # [10, 20, -2, -30]
Numpy Operation
acmcsuf.com/intro-ds-sp24-collab
np_arr_operation = np.array([2,4,6,8,10,-100,-2])
np_arr_operation.sum() # -72
np_arr_operation.max() # 10
np_arr_operation.min() # -100
np_arr_operation.mean() # -10.28…
Coding Challenge
acmcsuf.com/intro-ds-sp24-collab
Design a Python function using NumPy to help a small business track its weekly sales. The business sells three different products, and the sales data is stored in a 2D array where each row represents a day of the week (Monday to Friday), and each column represents one of the products. Your function should calculate the total for each day and store it in a 1D array