SeedSelection

Share:

Description

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

Usage

1
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

1
2
3
4
5
6
7
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)