The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Using SVM with features from external tool"
svm_friend
Member Posts: 3 Contributor I
I wrote some code that generates my feature vectors I want to use for training an SVM.
So far I have been using LibSVM and my feature format is like this:
<class> .=. +1 | -1 | 0
<feature> .=. integer
<value> .=. real
<line> .=. <class> <feature>:<value> <feature>:<value> ... <feature>:<value>
Example:
1 1:0.11764705882352941 2:0.25
1 1:0.11764705882352941 2:0.25
What I want to do is:
Load my feature file
Do some cross validation by generating different models and evaluate on the remaining data and finally create some ROC and Prec/Recall-Charts..
Is that possible? Does RM recognize the format?
So far I have been using LibSVM and my feature format is like this:
<class> .=. +1 | -1 | 0
<feature> .=. integer
<value> .=. real
<line> .=. <class> <feature>:<value> <feature>:<value> ... <feature>:<value>
Example:
1 1:0.11764705882352941 2:0.25
1 1:0.11764705882352941 2:0.25
What I want to do is:
Load my feature file
Do some cross validation by generating different models and evaluate on the remaining data and finally create some ROC and Prec/Recall-Charts..
Is that possible? Does RM recognize the format?
Tagged:
0
Answers
usually the data format just contains all values blank seperated, one example per line.
But since RapidMiner uses regular expressions to split the values, we could use the regular expression "\s+[0-9]*:" to use the blank, feature names and the : as seperator.
This is only possible, if your formate is not sparse, does not leave out some features or rearrangs in different lines them!
Use this as regular expression in the ExampleSource ConfigurationWizard.
For the rest of the processes, take a look on the samples shipped with rapidMiner.
Greetings,
 Sebastian
1 6:0.0 7:0.875
1 4:1.0 6:0.8333333333333334 7:0.6956521739130435
1 4:1.0 6:0.625 7:0.7368421052631579
1 4:1.0 6:0.3333333333333333 7:0.11764705882352941
1 6:0.6 7:0.875
1 6:0.0 7:0.8333333333333334
1 2:0.9166666666666666 4:0.0 6:0.5 7:0.6666666666666666
Is it possible to store those values in a csv file and pass that to the Rapidminer like
#Class; F1; F2; F3; F4;
1; 1; ; 2; ;
1; 1; 1; ; 1;4
I would just leave the space blank between the seperators?
yes, it is possible to have missing values in csv files when you load them into RapidMiner.
Regards,
Tobias