Learn R Programming

DrugClust (version 0.2)

SeedSelection: SeedSelection

Description

Given the seeds, it creates the submatrix of the features where the rows are just the seeds drugs

Usage

SeedSelection(features, num_clusters, s)

Arguments

features
train matrix of features (in the case of k-folding is the matrix of features)
num_clusters
number of clusters desired
s
the list of seeds

Value

Seed subset of the feature matrix, where rows are the Seed drugs, and columns the relative features

Examples

Run this code
r <- 8
c <- 10
m0 <- matrix(0, r, c)
num_clusters=4
features<-apply(m0, c(1,2), function(x) sample(c(0,1),1))
s<-RandomSeedGenerator(num_clusters,nrow(features))
Seed<-SeedSelection(features,num_clusters,s)

Run the code above in your browser using DataLab