Bioinformatics GO Ontology, leave-one-out cross validation

1 visualización (últimos 30 días)
Chet Seligman
Chet Seligman el 15 de Abr. de 2011
I need to do gene enrichment analysis using GO ontology followed by Leave-one-out cross validation. Can anyone point me to example code for this purpose?
Chet

Respuestas (1)

Richard Willey
Richard Willey el 15 de Abr. de 2011
Here's a simple example that shows how to do leave one out cross validation using the cvpartition and crossval commands in Statistics Toolbox
% Load the Fisher Iris set, because every examples MUST
% include the Fisher Iris set
load fisheriris;
y = species;
% Uses cvpartition to create an object
c = cvpartition(y,'leaveout');
% Create an anonymous function to peform calssification
fun = @(xT,yT,xt,yt)(sum(~strcmp(yt,classify(xt,xT,yT))))
% Apply cross validation
rate = sum(crossval(fun,meas,y,'partition',c))/sum(c.TestSize)

Categorías

Más información sobre Bioinformatics Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by