Generazione di feature

Feature Engineering con PySpark

John Hogue

Lead Data Scientist

Perché creare nuove feature?

Generazione

Moltiplicare

Sommare

Fare la differenza

Dividere

Feature Engineering con PySpark

Perché creare nuove feature?

Grafico del modello lineare: lunghezza

Grafico del modello lineare: larghezza

Feature Engineering con PySpark

Combinare due feature

Moltiplicazione

# Creating a new feature, area by multiplying
df = df.withColumn('TSQFT', (df['WIDTH'] * df['LENGTH']))

Grafico del modello lineare: area

Feature Engineering con PySpark

Altri modi per combinare due feature

# Sum two columns
df = df.withColumn('TSQFT', (df['SQFTBELOWGROUND'] + df['SQFTABOVEGROUND']))
# Divide two columns
df = df.withColumn('PRICEPERTSQFT', (df['LISTPRICE'] / df['TSQFT']))
# Difference two columns
df = df.withColumn('DAYSONMARKET', datediff('OFFMARKETDATE', 'LISTDATE'))
Feature Engineering con PySpark

Qual è il limite?

Automazione delle feature

  • FeatureTools e TSFresh
  • Esplosione di feature
  • Ordini superiori e oltre?

Immagine futuristica

Feature Engineering con PySpark

Vai e combina!

Feature Engineering con PySpark

Preparing Video For Download...