Learn R Programming

DrugClust (version 0.2)

KMeansModel: KMeansModel

Description

Function finding the Bayesian Model given the KMeans clustering algorithm

Usage

KMeansModel(train, trainpharmat, num_clusters, cl)

Arguments

train
matrix of train features
trainpharmat
matrix of training of side_effects
num_clusters
number of clusters desired
cl
results of the KMeans model clustering function

Value

A Bayesian matrix of model for predictions, given the KMeans clustering

Examples

Run this code
#First call the KMeans function and obtain cl (list of clusters)
#train is the feature matrix of train
#trainpharmat is the side effect matrix of train
#A<-KMeansModel(train,trainpharmat,4,cl)

Run the code above in your browser using DataLab