1 of 27

INTRO TO

DATA SCIENCE

By: ACM Artificial Intelligence

2 of 27

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

3 of 27

ACM ARTIFICIAL

INTELLIGENCE

01

4 of 27

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

5 of 27

BASIC CONCEPT OF AI/ML

02

6 of 27

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!

7 of 27

INTRO TO DATA SCIENCE

03

8 of 27

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

9 of 27

Where Data Science

fits in

10 of 27

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

11 of 27

12 of 27

takes the

most time

13 of 27

14 of 27

PROGRAMMING LANGUAGES

Python

R

Julia

Scala

15 of 27

PROGRAMMING LANGUAGES

Python

R

Julia

Scala

Most common

16 of 27

INTRO TO NUMPY

04

17 of 27

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

18 of 27

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]])

19 of 27

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]

20 of 27

random.rand()

acmcsuf.com/intro-ds-sp24-collab

Syntax: np.random.rand(rows,columns)

random_array = np.random.rand(5,10) # 5x10 matrix

21 of 27

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

22 of 27

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

23 of 27

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

24 of 27

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]

25 of 27

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…

26 of 27

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

27 of 27

THANKS!_

Do you have any questions?

Please keep this slide for attribution

CREDITS: This presentation template was created by Slidesgo, and includes icons by Flaticon, and infographics & images by Freepik