ipft (version 0.2.2)

ipfCluster: Creates clusters using the specified method

Description

This function creates clusters using the the specified method and assigns a cluster id to each cluster

Usage

ipfCluster(data, method = "k-means", k = NULL, ...)

Arguments

data
a data frame
method
the method to use to clusterize the data. Implemented methods are: 'k-means' for k-means algorithm. Requires parameter k. 'AP' for affinity propagation algorithm.
k
parameter k
...
additional parameters for apcluster and apclusterK

Value

A list with: clusters -> a numeric vector with the ids of the clusters centers -> a data frame with the centers of the clusters

Examples

Run this code

    clusters <- ipfCluster(head(ipftrain, 20)[, 169:170], k = 4)

    clusters <- ipfCluster(head(ipftrain[, grep('^wap', names(ipftrain))], 20),
    method = 'AP')$clusters

Run the code above in your browser using DataCamp Workspace