0
Can anyone explain to me what the code below performs?
cluster <- ml_kmeans(variaveis_clusters_tratado, CODCLI ~ ., k = 5)
clusters <- ml_predict(cluster, variaveis_clusters_tratado)
0
Can anyone explain to me what the code below performs?
cluster <- ml_kmeans(variaveis_clusters_tratado, CODCLI ~ ., k = 5)
clusters <- ml_predict(cluster, variaveis_clusters_tratado)
0
The line cluster <- ml_kmeans(variaveis_clusters_tratado, CODCLI ~ ., k = 5)
creates a K-MEANS template with the dataset data variaveis_clusters_tratado
, following the formula CODCLI ~ .
, with 5 clusters, that is, k=5
.
The line clusters <- ml_predict(cluster, variaveis_clusters_tratado)
tries to predict the values of variaveis_clusters_tratado
using the model that was created in the first line, that is, the clusters
.
At the same time that it does this, this line superimposes on the memory of the R the model created. That is, it uses the template and then replaces it with the result of the prediction, which will probably be a dataframe.
Browser other questions tagged r clusterization
You are not signed in. Login or sign up in order to post.
thanks for the help!!!
– eloarl