ml_corr | R Documentation |
Compute correlation matrix
ml_corr(x, columns = NULL, method = c("pearson", "spearman"))
x |
A |
columns |
The names of the columns to calculate correlations of. If only one
column is specified, it must be a vector column (for example, assembled using
|
method |
The method to use, either |
A correlation matrix organized as a data frame.
## Not run:
sc <- spark_connect(master = "local")
iris_tbl <- sdf_copy_to(sc, iris, name = "iris_tbl", overwrite = TRUE)
features <- c("Petal_Width", "Petal_Length", "Sepal_Length", "Sepal_Width")
ml_corr(iris_tbl, columns = features, method = "pearson")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.