Bioinformatics GO Ontology, leave-one-out cross validation
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Richard Willey
2011년 4월 15일
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)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Bioinformatics Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!