| feature_matrix | R Documentation |
Convert a tabular dataset to a matrix, one-hot encoding factors, if present.
feature_matrix(x)
x |
tabular data: Input data to convert to a feature matrix. |
This is a convenience function that uses features(), preprocess(), as.matrix().
Matrix with features. Factors are one-hot encoded, if present.
EDG
# reorder columns so that we have a categorical feature
x <- set_outcome(iris, "Sepal.Length")
feature_matrix(x) |> head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.