Username Remember Me?
Password   forgot password?
   
   
How to get tset set results? 
Posted: 20 March 2009 07:51 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  2
Joined  2009-03-19

Dear PRTools team:
I am a beginner of PRTool.After I get a mapping (eg.W=ldc(A)) on dataset A,I put a
testset D on it by testc(D*W), but I can only get the classfication error.I mean I want to get the label list of D which deal with by mapping W.
Can you understand my meaning? Because my English is poor. If you cannot understand, I can write it again.
Thanks a lot!
I am eager to your reply!

[ Edited: 23 March 2009 07:14 AM by pavel]
Profile
 
 
Posted: 20 March 2009 08:12 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  236
Joined  2008-04-26

Dear rensheng911,

your question is perfectly clear. You can use the labeld command to get classifier decisions. Here is the example:

lets first train our classifier
>> a=gendatb
Banana Set
100 by 2 dataset with 2 classes[50  50]
>> w=ldc(a)
Bayes-Normal-12 to 2 trained  mapping   --> normal_map

now we come up with a test set
>> ts=gendatb
Banana Set
100 by 2 dataset with 2 classes[50  50]

to get an error estimateapply the testc:
>> 
error=ts*w*testc
error 
=
    
0.1500

to get decisions, use the labeld command:
>> 
dec=ts*w*labeld;

dec now contains a decision for each sample in ts
>> dec(1:10,:)
ans =
     
1
     2
     2
     1
     2
     1
     2
     1
     1
     1

both testc and labeld work on the "soft" output of the trained classifier 
which is a datasetIn each feature (column), it contains similarity (confidence
with respect to one class:
>> 
out=ts*w
Banana Set
100 by 2 dataset with 2 classes[50  50]
>> +out(1:10,:)
ans =
    
0.0075    0.0003
    0.0009    0.0079
    0.0013    0.0064
    0.0047    0.0001
    0.0006    0.0074
    0.0019    0.0001
    0.0002    0.0090
    0.0025    0.0000
    0.0049    0.0001
    0.0025    0.0001

Hope it helps,

Pavel

Profile
 
 
Posted: 23 March 2009 02:17 AM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  2
Joined  2009-03-19

Dear Pavel,
Thank you for help.With your help I solved the problem.Thanks again!

Profile