Description Usage Arguments Value Examples
Function for obtaining the Bayesian prediction scores using KSeeds clustering
1 | KSeedsScores(train, trainpharmat, num_clusters, Seed, s, clusters)
|
train |
train matrix of features |
trainpharmat |
train matrix of side effects |
num_clusters |
number of clusters desired |
Seed |
subset of the features matrix containing only the Seeds drugs |
s |
the seeds of the clusters |
clusters |
the list of clusters where the various drugs are |
A matrix containing prediction scores for each cluster
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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))
#Generate a sample side effects binary matrix
r1 <- 8
c1 <- 10
m1 <- matrix(0, r1, c1)
side_effects<-apply(m1, c(1,2), function(x) sample(c(0,1),1))
s<-RandomSeedGenerator(num_clusters,nrow(features))
Seed<-SeedSelection(features,num_clusters,s)
clusters<-KSeedsClusters (features,num_clusters,Seed,s)
A<-KSeedsScores(features,side_effects,num_clusters,Seed,s,clusters)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.