@SuppressWarnings("unchecked") private void initialise() { Object[] dataStructures = maxentModel.getDataStructures(); outcomeNames = (String[]) dataStructures[2]; TreeSet<String> outcomeSet = new TreeSet<String>(); for (String outcome : outcomeNames) outcomeSet.add(outcome); outcomeList.addAll(outcomeSet); this.predicateTable = (IndexHashTable<String>) dataStructures[1]; predicates = new String[predicateTable.size()]; predicateTable.toArray(predicates); modelParameters = (Context[]) dataStructures[0]; }
public GISModelWriter(AbstractModel model) { Object[] data = model.getDataStructures(); PARAMS = (Context[]) data[0]; IndexHashTable<String> pmap = (IndexHashTable<String>) data[1]; OUTCOME_LABELS = (String[]) data[2]; CORRECTION_CONSTANT = (Integer) data[3]; CORRECTION_PARAM = (Double) data[4]; PRED_LABELS = new String[pmap.size()]; pmap.toArray(PRED_LABELS); }
public GISModelWriter(AbstractModel model) { Object[] data = model.getDataStructures(); PARAMS = (Context[]) data[0]; IndexHashTable<String> pmap = (IndexHashTable<String>) data[1]; OUTCOME_LABELS = (String[]) data[2]; CORRECTION_CONSTANT = (Integer) data[3]; CORRECTION_PARAM = (Double) data[4]; PRED_LABELS = new String[pmap.size()]; pmap.toArray(PRED_LABELS); }
public PerceptronModelWriter (AbstractModel model) { Object[] data = model.getDataStructures(); this.numOutcomes = model.getNumOutcomes(); PARAMS = (Context[]) data[0]; IndexHashTable<String> pmap = (IndexHashTable<String>) data[1]; OUTCOME_LABELS = (String[])data[2]; PRED_LABELS = new String[pmap.size()]; pmap.toArray(PRED_LABELS); }
public PerceptronModelWriter (AbstractModel model) { Object[] data = model.getDataStructures(); this.numOutcomes = model.getNumOutcomes(); PARAMS = (Context[]) data[0]; IndexHashTable<String> pmap = (IndexHashTable<String>) data[1]; OUTCOME_LABELS = (String[])data[2]; PRED_LABELS = new String[pmap.size()]; pmap.toArray(PRED_LABELS); }
return false; String[] pmapArray = new String[pmap.size()]; pmap.toArray(pmapArray); for (int i = 0; i < this.pmap.size(); i++) { if (i != objModel.pmap.get(pmapArray[i]))
return false; String[] pmapArray = new String[pmap.size()]; pmap.toArray(pmapArray); for (int i = 0; i < this.pmap.size(); i++) { if (i != objModel.pmap.get(pmapArray[i]))
pmap.toArray(predNames); writeInt(predNames.length); for (int i = 0; i < predNames.length; i++)
pmap.toArray(predNames); writeInt(predNames.length); for (int i = 0; i < predNames.length; i++)