Integration of RapidMiner in Java application

前端 未结 3 851
北荒
北荒 2021-01-03 04:00

I have a text classification process in RapidMiner. It reads the test data from specified excel ssheet and does the classification. I have also a small Java application whic

3条回答
  •  抹茶落季
    2021-01-03 04:58

    Try this:

    private SimpleExampleSet ReadExcel( File processXMLFile_, File excelFile_ ) throws IOException, XMLException, OperatorException
    {
        IOContainer outParameters   = null;
        Process     readExcel       = new Process( processXMLFile_ );
        IOObject    inObject        = new SimpleFileObject( excelFile_ );
        IOContainer inParameters    = new IOContainer( inObject );
    
        outParameters   = readExcel.run( inParameters );
    
        SimpleExampleSet    result  = (SimpleExampleSet) outParameters.getElementAt( 0 );
    
        return result;
    
    }
    

    Sorry, I cannot post image with RapidMiner script if you need, I can send it to email.

提交回复
热议问题