public static void main(String args[]) { ProblemTransformationMethod.evaluation(new CDT(), args); }
/** * Description to display in the GUI. * * @return the description */ @Override public String globalInfo() { return "A Conditional Dependency Trellis. Like CDN, but with a trellis structure (like CT) rather than a fully connected network." + "For more information see:\n" + getTechnicalInformation().toString(); }
@Override public void setOptions(String[] options) throws Exception { setWidth(OptionUtils.parse(options, 'H', -1)); setDensity(OptionUtils.parse(options, 'L', 1)); setDependencyMetric(OptionUtils.parse(options, 'X', "None")); super.setOptions(options); }
@Override public String [] getOptions() { List<String> result = new ArrayList<>(); OptionUtils.add(result, 'H', getWidth()); OptionUtils.add(result, 'L', getDensity()); OptionUtils.add(result, 'X', getDependencyMetric()); OptionUtils.add(result, super.getOptions()); return OptionUtils.toArray(result); }
@Override public Enumeration listOptions() { Vector result = new Vector(); result.addElement(new Option("\t"+widthTipText(), "H", 1, "-H <value>")); result.addElement(new Option("\t"+densityTipText(), "L", 1, "-L <value>")); result.addElement(new Option("\t"+dependencyMetricTipText(), "X", 1, "-X <value>")); OptionUtils.add(result, super.listOptions()); return OptionUtils.toEnumeration(result); }
@Override public void buildClassifier(Instances D) throws Exception { testCapabilities(D); m_R = new Random(getSeed()); int width = m_Width; if (getDebug()) System.out.println("Make Trellis of width "+m_Width); int indices[] = A.make_sequence(L); A.shuffle(indices, new Random(getSeed())); trel = new Trellis(indices, width, m_Density); if (getDebug()) System.out.println("==>\n"+trel.toString()); if (getDebug()) System.out.println("Build Trellis"); if (getDebug()) System.out.println("nodes: "+Arrays.toString(trel.indices)); if (getDebug()) { System.out.println("Build Node h_"+jv+"] : P(y_"+jv+" | x_[1:d], y_"+Arrays.toString(trel.getNeighbours(j))+")");
@Override public String [] getOptions() { List<String> result = new ArrayList<>(); OptionUtils.add(result, 'H', getWidth()); OptionUtils.add(result, 'L', getDensity()); OptionUtils.add(result, 'X', getDependencyMetric()); OptionUtils.add(result, super.getOptions()); return OptionUtils.toArray(result); }
@Override public Enumeration listOptions() { Vector result = new Vector(); result.addElement(new Option("\t"+widthTipText(), "H", 1, "-H <value>")); result.addElement(new Option("\t"+densityTipText(), "L", 1, "-L <value>")); result.addElement(new Option("\t"+dependencyMetricTipText(), "X", 1, "-X <value>")); OptionUtils.add(result, super.listOptions()); return OptionUtils.toEnumeration(result); }
@Override public void buildClassifier(Instances D) throws Exception { testCapabilities(D); m_R = new Random(getSeed()); int width = m_Width; if (getDebug()) System.out.println("Make Trellis of width "+m_Width); int indices[] = A.make_sequence(L); A.shuffle(indices, new Random(getSeed())); trel = new Trellis(indices, width, m_Density); if (getDebug()) System.out.println("==>\n"+trel.toString()); if (getDebug()) System.out.println("Build Trellis"); if (getDebug()) System.out.println("nodes: "+Arrays.toString(trel.indices)); if (getDebug()) { System.out.println("Build Node h_"+jv+"] : P(y_"+jv+" | x_[1:d], y_"+Arrays.toString(trel.getNeighbours(j))+")");
@Override public void setOptions(String[] options) throws Exception { setWidth(OptionUtils.parse(options, 'H', -1)); setDensity(OptionUtils.parse(options, 'L', 1)); setDependencyMetric(OptionUtils.parse(options, 'X', "None")); super.setOptions(options); }
/** * Description to display in the GUI. * * @return the description */ @Override public String globalInfo() { return "A Conditional Dependency Trellis. Like CDN, but with a trellis structure (like CT) rather than a fully connected network." + "For more information see:\n" + getTechnicalInformation().toString(); }
public static void main(String args[]) { ProblemTransformationMethod.evaluation(new CDT(), args); }