if (FALSE) {
sc <- spark_connect(master = "local")
iris_tbl <- sdf_copy_to(sc, iris, name = "iris_tbl", overwrite = TRUE)
features <- c("Sepal_Length", "Sepal_Width", "Petal_Length", "Petal_Width")
iris_tbl %>%
ft_vector_assembler(
input_col = features,
output_col = "features_temp"
) %>%
ft_min_max_scaler(
input_col = "features_temp",
output_col = "features"
)
}
Run the code above in your browser using DataLab