Created
September 6, 2020 11:06
-
-
Save jiahao87/f25938163e74dfc2aee3186bd59a3175 to your computer and use it in GitHub Desktop.
Vaex sample code for Iris data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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