/** * Returns an array with the options of the classifier. * * @return Array of options. */ public String[] getOptions(){ List<String> result = new ArrayList<>(); OptionUtils.add(result, "size", getSize()); OptionUtils.add(result, "threshold", getThreshold()); OptionUtils.add(result, super.getOptions()); return OptionUtils.toArray(result); }
/** * Returns an array with the options of the classifier. * * @return Array of options. */ public String[] getOptions(){ List<String> result = new ArrayList<>(); OptionUtils.add(result, "size", getSize()); OptionUtils.add(result, "threshold", getThreshold()); OptionUtils.add(result, super.getOptions()); return OptionUtils.toArray(result); }
@Override public Instances transformLabels(Instances D) throws Exception{ Instances features = this.extractPart(D, false); Instances labels = this.extractPart(D, true); BooleanMatrixDecomposition bmd = BooleanMatrixDecomposition.BEST_CONFIGURED(this.threshold); Tuple<Instances, Instances> res = bmd.decompose(labels, this.size); this.compressedMatrix = res._1; this.uppermatrix = res._2; Instances result= Instances.mergeInstances(compressedMatrix, features); result.setClassIndex(this.getSize()); return result; }
@Override public Instances transformLabels(Instances D) throws Exception{ Instances features = this.extractPart(D, false); Instances labels = this.extractPart(D, true); BooleanMatrixDecomposition bmd = BooleanMatrixDecomposition.BEST_CONFIGURED(this.threshold); Tuple<Instances, Instances> res = bmd.decompose(labels, this.size); this.compressedMatrix = res._1; this.uppermatrix = res._2; Instances result= Instances.mergeInstances(compressedMatrix, features); result.setClassIndex(this.getSize()); return result; }