affectFuzzyIndiv: ~ Function: affectFuzzyIndiv ~

View source: R/kml.R

affectFuzzyIndivR Documentation

~ Function: affectFuzzyIndiv ~

Description

Given some longitudinal data (trajectories) and k cluster's centers, affectFuzzyIndiv compute the matrix of individual membership (according to the algorithm fuzzy k-means).

Usage

affectFuzzyIndiv(traj, clustersCenter, fuzzyfier=1.25)

Arguments

traj

[matrix]: longitudinal data. Each line is an individual, each column is a time measurement.

clustersCenter

[matrix]: cluster's centers. Each line is a cluster's center, each column is a time measurement.

fuzzyfier

[numeric]: value of the fuzzyfier used to compute individual's memberships.

Details

Given a matrix of clusters center clustersCenter (each line is a cluster center), the function affectFuzzyIndiv compute for each individual and each cluster a "membership".

affectFuzzyIndiv used with calculTrajFuzzyMean simulates one fuzzy k-means step.

Value

Matrix of the membership. Each line is an individual, column are for clusters.

Examples

#######################
### affectFuzzyIndiv

### Some LongitudinalData
traj <- gald()["traj"]

### 4 clusters centers
center <- traj[runif(4,1,nrow(traj)),]

### Affectation of each individual
affectFuzzyIndiv(traj,center)

kml documentation built on Oct. 30, 2024, 9:09 a.m.