Examples of UnmatchedActivityInputsException


Examples of uk.org.ogsadai.activity.UnmatchedActivityInputsException

        while ((expected = (Tuple)expectedInput.nextValue()) != null)
        {
            Tuple actual = (Tuple)actualInput.nextValue();
            if (actual == null)
            {
                throw new UnmatchedActivityInputsException(
                        new String[] {INPUT_EXPECTED, INPUT_PREDICTED},
                        new Object[] {expected, ControlBlock.NO_MORE_DATA});
            }
            // we're assuming there are no more than Integer.MAX_VALUE classes
            Object predicted = actual.getObject(0);
            Object exp = expected.getObject(0);
            Map<Object, Long> map = confusionMatrix.get(exp);
            actualValues.add(predicted);
            if (map == null)
            {
                Map<Object, Long> counts = new HashMap<Object, Long>();
                confusionMatrix.put(exp, counts);
                counts.put(predicted, 1L);
            }
            else
            {
                Long count = map.get(predicted);
                if (count == null)
                {
                    map.put(predicted, 1L);
                }
                else
                {
                    map.put(predicted, count+1);
                }
            }
        }
        Object obj = actualInput.nextValue();
        if (obj != null)
        {
            throw new UnmatchedActivityInputsException(
                    new String[] {INPUT_EXPECTED, INPUT_PREDICTED},
                    new Object[] {ControlBlock.NO_MORE_DATA, obj});
        }
       
        List<ColumnMetadata> columns = new ArrayList<ColumnMetadata>();
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.