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;
 }
Esempio n. 2
0
 public void updateWeighted(DataTuple tuple, int idx) { // idx?
   m_RegStat.updateWeighted(tuple, tuple.getWeight());
   m_ClassStat.updateWeighted(tuple, tuple.getWeight());
   m_SumWeight += tuple.getWeight();
 }
Esempio n. 3
0
 public void updateWeighted(DataTuple tuple, int idx) {
   m_SumWeight += tuple.getWeight();
   m_Bits.setBit(idx);
   m_Modified = true;
 }