แนะนำคอร์ส

Introduction to Linear Modeling in Python

Jason Vestuto

Data Scientist

แนะนำบทที่ 1

แผนบทที่ 1:

  • ตัวอย่างเปิดบทเรียน
  • การแสดงภาพข้อมูล
  • สถิติเชิงพรรณนา
Introduction to Linear Modeling in Python

ตัวอย่างข้อมูลการเดินทาง

กราฟแสดงจุดข้อมูล แกน x คือเวลา (ชั่วโมง) แกน y คือระยะทาง (ไมล์)

Introduction to Linear Modeling in Python

โมเดลในฐานะคำอธิบาย

# Range of y data, in miles
y_range = np.max(y) - np.min(y) = 300 - 0 = 300
# Range of x data, in hours
x_range = np.max(x) - np.min(x) = 6 - 0 = 6
# Estimating the speed
mph = y_range / x_range = 300 / 6 = 50
Introduction to Linear Modeling in Python

แสดงภาพโมเดล

กราฟแสดงข้อมูลและโมเดล แกน x คือเวลา แกน y คือระยะทาง

Introduction to Linear Modeling in Python

การพยากรณ์ด้วยโมเดล

# Model as python expression
miles = 50*hours
# Model predicts distance is 300 miles at 6 hours
time = 6
distance = 50 * time = 50 * 6 = 300
def model(time):
    return 50*time

predicted_distance = model(time=10)
Introduction to Linear Modeling in Python

การประมาณค่าภายในช่วง (Interpolation)

กราฟระยะทางเทียบกับเวลา โดยมีจุด interpolation ที่ระบุไว้ระหว่างจุดข้อมูลสองจุด

Introduction to Linear Modeling in Python

การประมาณค่านอกช่วง (Extrapolation)

กราฟระยะทางเทียบกับเวลา โดยมีจุด extrapolation ที่ระบุไว้นอกช่วงข้อมูลที่เวลามากขึ้น

Introduction to Linear Modeling in Python

มาฝึกกันเถอะ!

Introduction to Linear Modeling in Python

Preparing Video For Download...