|
On Jan 22, 2:36 pm, "kash " <aakaash...@gmail.com> wrote:
> "Lucio Cetto" wrote in message <fopp17$81...@fred.mathworks.com>...
> > Lourdes:
>
> > crossvalind does not call classify.m, (the example in the
> > help does), but you can use crossvalind to do a 10-fold
> > cross validation with any other classifier:
>
> > indices = crossvalind('Kfold',true_classes,10);
> > cp = classperf(true_classes);
> > for i = 1:10
> > test = (indices == i); train = ~test;
> > class_membership = yourclassifier(...
> > data(train,:),true_classes(train,:));
> > selected_class = max(class_membership,[],2);
> > classperf(cp,selected_class,test)
> > end
>
> > Does this help you?, please feel free to e-mail me with
> > further questions.
>
> > Lucio Cetto
>
> > "Lourdes Pelayo" <lope...@yahoo.com> wrote in message
> > <fonn01$fm...@fred.mathworks.com>...
> > > I want to know how can I use the crossvalind file included
> > > in the Bioinformatics toolbox.
> > > I have my dataset that was classified with a different
> > > algorithm, I just to validate my results with 10-fold
> > cross
> > > validation and/or leave-one-out.
>
> > > I have 5 classes and my algorithm returns the degree of
> > > membership for each instance. Therefore, the input data to
> > > the 10-fold cross validation are N instances and 5
> > classes
> > > (not features but degrees of membership since data have
> > been
> > > already classified).
>
> > > The crossvalind.m file calls classify.m (stats toolbox). I
> > > can modify the classify code to get the confusion matrix,
> > > but when I enter the data, I get this error message: The
> > > pooled covariance matrix of TRAINING must be positive
> > definite.
>
> > > What should I do?
>
> > > thanks
>
> > > Lourdes
>
> hi to alll even i am performing 5 fold cross validation ,i am new to it ,please can anyone help,i am performing accurate cancer classification,have taken 100 genes
> 1 to 100,now i want to perform 5 FOLD CROS VALIDATION ,i nees ti calculate accuracy,error ,mistakes for each combination of genes,thats is,
>
> 1,2
> 1,3
> 1,4
> '
> '
> '
> 1,100
> 2,3
> ;
> ;
> ;
> 2,100
> ;
> ;
> ;
> ;
> 100,99- Hide quoted text -
>
> - Show quoted text -
The number of gene combinations is N0 = 9,900.
If the target output is cancer or no cancer, it can be represented in
1-D
with a unipolar binary target {1,0}.
The target matrix will have dimension size(t) = [ 1 N0 ]
If each gene is characterized by an I dimensional vector, the input
matrix will have the dimension size(p) = [ I N0 ].
If you are using a neural network, I recommend PATTERNNET
If you are not using a neural network, you will probably have to
transpose
these matrices.
Let N0 = N0c+N0n (N0c = No. in the cancer class, etc). If N0c << N0n,
then it
might be wise to duplicate or simulate some of N0c class vectors so
that
Nc = Nn = N0n and N0 is inceased to N = Nc+Nn = N0+N0n-N0c = 2*N0n.
Now that you have your input and target matrices, see the cross-
validation documentation and demos.
Hope this helps.
Greg
|