Sezione 1. Capitolo 4
single
Challenge: Building a Feature Pipeline for Customer Data
Scorri per mostrare il menu
Compito
Scorri per iniziare a programmare
You are given a flights dataset as a list of rows. Load it into a DataFrame using createDataFrame and apply the encoding and scaling techniques from the previous chapters. Store results in the specified variables:
- Fill nulls in
DelayandLengthwith0; - Apply
StringIndexertoAirline– store the result in a columnAIRLINE_IDX; - Apply
OneHotEncodertoAIRLINE_IDX– store the result in a columnAIRLINE_VEC; - Assemble
Length,Time, andAIRLINE_IDXinto a vector columnFEATURES_RAW; - Apply
StandardScalerwithwithMean=TrueandwithStd=TruetoFEATURES_RAW– store the result inFEATURES_SCALED; - Store the final DataFrame in
features_dfand count its rows infeatures_count.
Print features_count and show all rows of Airline, AIRLINE_VEC, FEATURES_SCALED.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 4
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione