public static DataTuple predict(ClusModel model, DataTuple test) throws ClusException { ClusSchema schema = test.getSchema(); schema.attachModel(model); DataTuple prediction = new DataTuple(schema); ClusStatistic stat = model.predictWeighted(test); stat.predictTuple(prediction); return prediction; }
public void updateWeighted(DataTuple tuple, int idx) { // idx? m_RegStat.updateWeighted(tuple, tuple.getWeight()); m_ClassStat.updateWeighted(tuple, tuple.getWeight()); m_SumWeight += tuple.getWeight(); }
public void updateWeighted(DataTuple tuple, int idx) { m_SumWeight += tuple.getWeight(); m_Bits.setBit(idx); m_Modified = true; }