/** * Get the result of evaluating the expression for continuous * optype. Is the same as calling getResult() when the optype * is continuous. * * @param incoming the incoming parameter values * mining schema * @return the result of evaluating the expression. * @throws Exception if the optype is not continuous. */ public String getResultCategorical(double[] incoming) throws Exception { if (m_opType == FieldMetaInfo.Optype.CONTINUOUS) { throw new IllegalArgumentException("[Apply] Can't return result as " + "categorical/ordinal because optype is continuous!"); } double result = getResult(incoming); return m_outputStructure.value((int)result); }
public void setFieldDefs(ArrayList<Attribute> fieldDefs) throws Exception { super.setFieldDefs(fieldDefs); updateDefsForArgumentsAndFunction(); }
} else if (name.equals("Apply")) { result = new Apply((Element)expression, opType, fieldDefs, transDict); } else if (name.equals("NormDiscrete")) { result = new NormDiscrete((Element)expression, opType, fieldDefs);
} else if (name.equals("Apply")) { result = new Apply((Element)expression, opType, fieldDefs, transDict); } else if (name.equals("NormDiscrete")) { result = new NormDiscrete((Element)expression, opType, fieldDefs);
public void setFieldDefs(ArrayList<Attribute> fieldDefs) throws Exception { super.setFieldDefs(fieldDefs); updateDefsForArgumentsAndFunction(); }
/** * Get the result of evaluating the expression for continuous * optype. Is the same as calling getResult() when the optype * is continuous. * * @param incoming the incoming parameter values * mining schema * @return the result of evaluating the expression. * @throws Exception if the optype is not continuous. */ public String getResultCategorical(double[] incoming) throws Exception { if (m_opType == FieldMetaInfo.Optype.CONTINUOUS) { throw new IllegalArgumentException("[Apply] Can't return result as " + "categorical/ordinal because optype is continuous!"); } double result = getResult(incoming); return m_outputStructure.value((int)result); }