Description Usage Arguments Value Examples
Once the preliminary work is done using "GenoNet()", this function predicts labels for a set of variants given their epigenetic features.
1 | GenoNet.predict(X,GenoNet.fit)
|
X |
Features used for prediction. If pre-calculated parameters from FunDLA are being used, X must have 1016 columns corresponding to the 1016 epigenetic features in 127 tissues or cell types, with the same order. See the complete list of features (ordered) at http://www.funlda.com/genonet/help. |
GenoNet.fit |
Previously trained GenoNet model. |
Y.predict |
Predicted outcomes or equivalently labels (quantitative, between 0 and 1). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## GenoNet trains the model that will be used for prediction.
# Input: Y, X (covariates/features), pre-calculated parameters from unlabeled data
## GenoNet.predict predicts labels given a set of new features.
# Input: X (test data covariates/features), GenoNet.fit (fitted GenoNet model)
library(GenoNet)
#Load example data
data(GenoNet.example)
beta.FunLDA<-GenoNet.example$beta.FunLDA # pre-calculated parameters from unlabeled data
training.data<-GenoNet.example$training.data # example training data
test.data<-GenoNet.example$test.data # example test data
beta.unlabeled<-beta.FunLDA[,'E118'] # tissue E118, HepG2 Hepatocellular Carcinoma Cells
Y.training<-training.data[,4];Y.test<-test.data[,4]
X.training<-training.data[,-c(1:4)];X.test<-test.data[,-c(1:4)]
#fit GenoNet
GenoNet.fit<-GenoNet(Y.training,X.training,beta.unlabeled,nfolds=10)
Y.predict<-GenoNet.predict(X.test,GenoNet.fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.