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 WVT"

IngoRMIngoRM Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder
edited May 2019 in Help
Original message posted on SourceForge forum at http://sourceforge.net/forum/forum.php?thread_id=2041847&;forum_id=390413

Hi all,

As part of my thesis, I need to use SVM in order to classify some document vectors. In order to do that, I'm using the Word Vector Tool (WVT) extension.

When I used RapidMiner in the past it was only for clustering, so all I had to do was put all my documents in a single directory and then use the following code:

List<Object[]> textList = new LinkedList<Object[]>();

//adding the directory
textList.add(new Object[] {"test_set","D:/programming/eclipse/Thesis/datasets/documents"});

Operator wvtoolOperator = OperatorService.createOperator("WVTool"); 
wvtoolOperator.setListParameter("texts", textList);


Now, however, I need to set different values for two groups of documents. So I tried to use the following code:

WVTFileInputList list = new WVTFileInputList(2);
list.addEntry(new WVTDocumentInfo("D:/programming/eclipse/Thesis/datasets/confidential", "txt","", "english", 0));
list.addEntry(new WVTDocumentInfo("D:/programming/eclipse/Thesis/datasets/unconfidential", "txt","", "english", 1));


The problem is I wasn't able to find out how get this list into the wvtoolOperator object.

Help will be very much appreciated.

Gil


Answer by Ingo Mierswa:

Hello,

just use

List<Object[]> textList = new LinkedList<Object[]>(); 

//adding the directory 
textList.add(new Object[] {"confidential","D:/programming/eclipse/Thesis/datasets/confidential"}); 
textList.add(new Object[] {"unconfidenctial","D:/programming/eclipse/Thesis/datasets/unconfidential"}); 

Operator wvtoolOperator = OperatorService.createOperator("WVTool"); 
wvtoolOperator.setListParameter("texts", textList); 


Cheers,
Ingo
Tagged:
Sign In or Register to comment.