Examples of PMMLDocument


Examples of org.dmg.pmml31.PMMLDocument

        }
    }
   
    public PMMLDocument toObject()
    {
        PMMLDocument result = PMMLDocument.Factory.newInstance();
        PMML pmmlObject = result.addNewPMML();
        pmmlObject.setVersion("3.0");
        //head of PMML document
        pmmlObject.setHeader(mPMML.getHeader());
        //data dictionary
        DataField[] dataFields = mPMML.getDataDictionary().getDataFieldArray();
View Full Code Here

Examples of org.dmg.pmml31.PMMLDocument

       
        activity.process();
       
        List actual = output.getActualBlocks();
        assertEquals(1, actual.size());
        PMMLDocument pmml = (PMMLDocument)actual.get(0);
       
        NumericInfo info = pmml.getPMML().getMiningModelArray(0).getModelStats().getUnivariateStatsArray(0).getNumericInfo();
        assertEquals(0, Double.compare(10, info.getMinimum()));
        assertEquals(0, Double.compare(20, info.getMean()));
        assertEquals(0, Double.compare(30, info.getMaximum()));
       
       
View Full Code Here

Examples of org.dmg.pmml31.PMMLDocument

       
        activity.process();
       
        List actual = output.getActualBlocks();
        assertEquals(1, actual.size());
        PMMLDocument pmml = (PMMLDocument)actual.get(0);
       
        PMMLToXMLCharArraysActivity toXML = new PMMLToXMLCharArraysActivity();
        input = new MockInputPipe(pmml);
        toXML.addInput("pmml", input);
       
View Full Code Here

Examples of org.dmg.pmml31.PMMLDocument

        return getPmml();
    }           
   
    public PMMLDocument toPMMLDocument()
    {
        PMMLDocument result = PMMLDocument.Factory.newInstance();
        PMML pmmlObject = result.addNewPMML();
        pmmlObject.setVersion("3.0");
        // head of PMML document
        Header header = pmmlObject.addNewHeader();
        header.setCopyright("www.gridminer.org");
        Application application = header.addNewApplication();
View Full Code Here

Examples of org.dmg.pmml31.PMMLDocument

        throws ActivityProcessingException,
               ActivityTerminatedException,
               ActivityUserException
    {
        TupleListIterator tuples = (TupleListIterator)iterationData[0];
        PMMLDocument pmmlInput = (PMMLDocument) iterationData[1];
       
        ModelStatsInterval modelStats =
            new ModelStatsInterval(tuples, pmmlInput);
        modelStats.countStatistics();
        try
View Full Code Here

Examples of org.dmg.pmml31.PMMLDocument

    protected void processIteration(Object[] iterationData)
        throws ActivityProcessingException,
               ActivityTerminatedException,
               ActivityUserException
    {
        PMMLDocument pmml = (PMMLDocument)iterationData[0];
        try
        {
            mOutput.write(pmml.toString().toCharArray());
        }
        catch (PipeClosedException e)
        {
            iterativeStageComplete();
        }
View Full Code Here

Examples of org.dmg.pmml31.PMMLDocument

        TupleListIterator tupleList = (TupleListIterator) iterationData[0];
        ListIterator columnList = (ListIterator) iterationData[1];
        ListIterator methodsList = (ListIterator) iterationData[2];
        ListIterator causeList = (ListIterator) iterationData[3];
        ListIterator parameterList = (ListIterator) iterationData[4];
        PMMLDocument pmml = (PMMLDocument) iterationData[5];

        Integer column;
        while ((column = (Integer) columnList.nextValue()) != null)
        {
            String method = (String) methodsList.nextValue();
            String cause = (String) causeList.nextValue();
            Object[] parameters = (Object[]) parameterList.nextValue();

            if (method == null || cause == null || parameters == null)
            {
                throw new ActivityUserException(
                        new UnmatchedInputException(
                                new String[] {
                                        INPUT_COLUMNS,
                                        INPUT_METHODS,
                                        INPUT_CAUSE,
                                        INPUT_PARAMETERS },
                                new Object[] {
                                        column, method, cause, parameters }));
            }

            DPPMethodForColumn methodForColumn = loadMethod(
                    column.intValue(),
                    method,
                    cause,
                    parameters,
                    pmml.getPMML());
            mColumnMethods.put(column, methodForColumn);
        }

        if (methodsList.nextValue() != null
                || causeList.nextValue() != null
                || parameterList.nextValue() != null)
        {
            throw new ActivityUserException(
                    new UnmatchedInputException(
                            new String[] {
                                    INPUT_COLUMNS,
                                    INPUT_METHODS,
                                    INPUT_CAUSE,
                                    INPUT_PARAMETERS }));
        }

        TupleMetadata metadata =
            (TupleMetadata) tupleList.getMetadataWrapper().getMetadata();

        // load all intervals
        mInterval = DPPHelper.loadIntervals(metadata, pmml.getPMML());

        // write metadata to output
        writeBlock(tupleList.getMetadataWrapper());
        // now apply DPP methods to input tuples and write the results
        Tuple tuple;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.