🎉 🎉. RAPIDMINER 9.8 IS OUT!!! 🎉 🎉

RapidMiner 9.8 continues to innovate in data science collaboration, connectivity and governance

CLICK HERE TO DOWNLOAD

"using SVM with WVT"

IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,750  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.