splines_kmeans: Performs splines clustering using K-means

Description Usage Arguments Details Value Examples

Description

Performs splines clustering using K-means

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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
)

Arguments

object

An object of class Moanin, an object containing all related information for time course data and the splines model that will be used (if applicable). See create_moanin_model for more details.

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 seed in KMeans_rcpp. If NULL (default), set to .Random.seed[1].

fit_splines

boolean, optional, default: TRUE Whether to fit splines or not.

rescale

boolean, optional, default: TRUE Whether to rescale the data or not.

Details

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.

Value

A list in the format returned by KMeans_rcpp, with the following elements added or changed:

Examples

1
2
3
4
5
data(exampleData)
# Use the default options
moanin <- create_moanin_model(data=testData, meta=testMeta)
out <- splines_kmeans( moanin,n_clusters=5)
table(out$clusters)

NelleV/moanin documentation built on July 28, 2021, 7:34 p.m.