"using SVM with WVT"

IngoRMIngoRM Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University ProfessorPosts:1,751RM Founder
edited May 2019 inHelp
Original message posted on SourceForge forum athttp://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 textList = new LinkedList();

//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));


问题是我没能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 textList = new LinkedList();

//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 InorRegisterto comment.