Skip to content

Instantly share code, notes, and snippets.

@jiahao87
Created September 6, 2020 11:06
Show Gist options
  • Save jiahao87/f25938163e74dfc2aee3186bd59a3175 to your computer and use it in GitHub Desktop.
Save jiahao87/f25938163e74dfc2aee3186bd59a3175 to your computer and use it in GitHub Desktop.
Vaex sample code for Iris data
import vaex
import vaex.ml
# load iris data
df = vaex.ml.datasets.load_iris()
# perform train test split
df_train, df_test = df.ml.train_test_split(test_size=0.2)
# apply standardization transformation
features = ['sepal_length', 'sepal_width', 'petal_length', 'petal_width']
std_scale = vaex.ml.StandardScaler(features=features)
df_train = std_scale.fit_transform(df_train)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment