/** * Main method for testing this class. * * @param argv should contain arguments to the filter: use -h for help */ public static void main(String[] argv) { runFilter(new NonSparseToSparse(), argv); } }
if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); resetQueue(); m_NewBatch = false; tempInst.setDataset(getInputFormat()); push(newInstance, false); // No need to copy
NonSparseToSparse nonSparseToSparseInstance = new NonSparseToSparse(); nonSparseToSparseInstance.setInputFormat(dataSet); Instances sparseDataset = Filter.useFilter(dataSet, nonSparseToSparseInstance);
/** Creates an example NonSparseToSparse */ public Filter getFilter() { NonSparseToSparse f = new NonSparseToSparse(); return f; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if format cannot be processed */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); Instances instNew = instanceInfo; setOutputFormat(instNew); return true; }
if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); resetQueue(); m_NewBatch = false; tempInst.setDataset(getInputFormat()); push(newInstance, false); // No need to copy
/** Creates an example NonSparseToSparse */ public Filter getFilter() { NonSparseToSparse f = new NonSparseToSparse(); return f; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if format cannot be processed */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); Instances instNew = instanceInfo; setOutputFormat(instNew); return true; }
/** * Main method for testing this class. * * @param argv should contain arguments to the filter: use -h for help */ public static void main(String[] argv) { runFilter(new NonSparseToSparse(), argv); } }