h2o.kmeans(training_frame, x, model_id = NULL, validation_frame = NULL, nfolds = 0, keep_cross_validation_predictions = FALSE, keep_cross_validation_fold_assignment = FALSE, fold_assignment = c("AUTO", "Random", "Modulo", "Stratified"), fold_column = NULL, ignore_const_cols = TRUE, score_each_iteration = FALSE, k = 1, estimate_k = FALSE, user_points = NULL, max_iterations = 10, standardize = TRUE, seed = -1, init = c("Random", "PlusPlus", "Furthest", "User"), max_runtime_secs = 0, categorical_encoding = c("AUTO", "Enum", "OneHotInternal", "OneHotExplicit", "Binary", "Eigen"))character names of the predictors in the model.Logical. Whether to keep the predictions of the cross-validation models. Defaults to FALSE.Logical. Whether to keep the cross-validation fold assignment. Defaults to FALSE.Logical. Ignore constant columns. Defaults to TRUE.Logical. Whether to score during each iteration of model training. Defaults to FALSE.Logical. Whether to estimate the number of clusters (Logical. Standardize columns before computing distances Defaults to TRUE.h2o.cluster_sizes, h2o.totss, h2o.num_iterations,
h2o.betweenss, h2o.tot_withinss, h2o.withinss,
h2o.centersSTD, h2o.centers
library(h2o)
h2o.init()
prosPath <- system.file("extdata", "prostate.csv", package="h2o")
prostate.hex <- h2o.uploadFile(path = prosPath)
h2o.kmeans(training_frame = prostate.hex, k = 10, x = c("AGE", "RACE", "VOL", "GLEASON"))
Run the code above in your browser using DataLab