알고리즘 선택

PySpark로 하는 Feature Engineering

John Hogue

Lead Data Scientist, General Mills

Spark ML 개요

ML 플로차트

PySpark로 하는 Feature Engineering

Spark ML 개요

ML 플로차트

PySpark로 하는 Feature Engineering

Spark ML 개요

ML 플로차트

PySpark로 하는 Feature Engineering

Spark ML 개요

ML 플로차트

PySpark로 하는 Feature Engineering

PySpark 회귀 메서드

ml.regression의 메서드:

  • GeneralizedLinearRegression
  • IsotonicRegression
  • LinearRegression

 

  • DecisionTreeRegression
  • GBTRegression
  • RandomForestRegression
PySpark로 하는 Feature Engineering

PySpark 회귀 메서드

ml.regression의 메서드:

  • GeneralizedLinearRegression
  • IsotonicRegression
  • LinearRegression

 

  • DecisionTreeRegression
  • GBTRegression
  • RandomForestRegression
PySpark로 하는 Feature Engineering

RFR 다이어그램

PySpark로 하는 Feature Engineering

시계열 학습/검증 분할

PySpark로 하는 Feature Engineering

시계열 학습/검증 분할

# Create variables for max and min dates in our dataset
max_date = df.agg({'OFFMKTDATE': 'max'}).collect()[0][0]
min_date = df.agg({'OFFMKTDATE': 'min'}).collect()[0][0]
# Find how many days our data spans
from pyspark.sql.functions import datediff
range_in_days = datediff(max_date, min_date)
# Find the date to split the dataset on
from pyspark.sql.functions import date_add
split_in_days = round(range_in_days * 0.8)
split_date = date_add(min_date, split_in_days)
# Split the data into 80% train, 20% test
train_df = df.where(df['OFFMKTDATE'] < split_date) 
test_df = df.where(df['OFFMKTDATE'] >= split_date)\
  .where(df['LISTDATE'] >= split_date)
PySpark로 하는 Feature Engineering

Vamos praticar!

PySpark로 하는 Feature Engineering

Preparing Video For Download...