splines_kmeans {moanin} | R Documentation |
Performs splines clustering using K-means
## S4 method for signature 'Moanin' splines_kmeans( object, n_clusters = 10, init = "kmeans++", n_init = 10, max_iter = 300, random_seed = .Random.seed[1], fit_splines = TRUE, rescale = TRUE )
object |
An object of class |
n_clusters |
int optional, default: 10 |
init |
["kmeans++", "random", "optimal_init"] |
n_init |
int, optional, default: 10 Number of initialization to perform. |
max_iter |
int, optional, default: 300 Maximum number of iteration to perform |
random_seed |
int, optional, default: NULL.
Passed to argument |
fit_splines |
boolean, optional, default: TRUE Whether to fit splines or not. |
rescale |
boolean, optional, default: TRUE Whether to rescale the data or not. |
If Moanin
object's slot has log_transform=TRUE, then the data will be transformed by the function log(x+1) before applying splines and clustering.
A list in the format returned by KMeans_rcpp
,
with the following elements added or changed:
centroids
The centroids are rescaled so that they range from
0-1
fit_splines
Logical, the value of fit_splines
given to the
function
rescale
The value of rescale
given to the function
data(exampleData) # Use the default options moanin <- create_moanin_model(data=testData, meta=testMeta) out <- splines_kmeans( moanin,n_clusters=5) table(out$clusters)