% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_stat.R
\name{ml_corr}
\alias{ml_corr}
\title{Compute correlation matrix}
\usage{
ml_corr(x, columns = NULL, method = c("pearson", "spearman"))
}
\arguments{
\item{x}{A \code{tbl_spark}.}

\item{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
\code{ft_vector_assember()}).}

\item{method}{The method to use, either \code{"pearson"} or \code{"spearman"}.}
}
\value{
A correlation matrix organized as a data frame.
}
\description{
Compute correlation matrix
}
\examples{
\dontrun{
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")
}
}
