Learn R Programming

kml (version 2.1.2)

affectFuzzyIndiv: ~ 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.

Value

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

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.

Examples

Run this code
#######################
### affectFuzzyIndiv

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

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

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

Run the code above in your browser using DataLab