public String[] getMetricNamesForRule() { String[] metricNames = new String[TAGS_SELECTION.length]; for (int i = 0; i < TAGS_SELECTION.length; i++) { metricNames[i] = TAGS_SELECTION[i].getReadable(); } return metricNames; }
public String[] getMetricNamesForRule() { String[] metricNames = new String[TAGS_SELECTION.length]; for (int i = 0; i < TAGS_SELECTION.length; i++) { metricNames[i] = TAGS_SELECTION[i].getReadable(); } return metricNames; }
/** * Gets a list of the names of the metrics output for each rule. This list * should be the same (in terms of the names and order thereof) as that * produced by AssociationRule.getMetricNamesForRule(). * * @return an array of the names of the metrics available for each rule * learned by this producer. */ @Override public String[] getRuleMetricNames() { String[] metricNames = new String[DefaultAssociationRule.TAGS_SELECTION.length]; for (int i = 0; i < DefaultAssociationRule.TAGS_SELECTION.length; i++) { metricNames[i] = DefaultAssociationRule.TAGS_SELECTION[i].getReadable(); } return metricNames; }
/** * Gets a list of the names of the metrics output for each rule. This list * should be the same (in terms of the names and order thereof) as that * produced by AssociationRule.getMetricNamesForRule(). * * @return an array of the names of the metrics available for each rule * learned by this producer. */ @Override public String[] getRuleMetricNames() { String[] metricNames = new String[DefaultAssociationRule.TAGS_SELECTION.length]; for (int i = 0; i < DefaultAssociationRule.TAGS_SELECTION.length; i++) { metricNames[i] = DefaultAssociationRule.TAGS_SELECTION[i].getReadable(); } return metricNames; }
/** * Gets a list of the names of the metrics output for each rule. This list * should be the same (in terms of the names and order thereof) as that * produced by AssociationRule.getMetricNamesForRule(). * * @return an array of the names of the metrics available for each rule * learned by this producer. */ @Override public String[] getRuleMetricNames() { String[] metricNames = new String[DefaultAssociationRule.TAGS_SELECTION.length]; for (int i = 0; i < DefaultAssociationRule.TAGS_SELECTION.length; i++) { metricNames[i] = DefaultAssociationRule.TAGS_SELECTION[i].getReadable(); } return metricNames; }
/** * Gets a list of the names of the metrics output for each rule. This list * should be the same (in terms of the names and order thereof) as that * produced by AssociationRule.getMetricNamesForRule(). * * @return an array of the names of the metrics available for each rule * learned by this producer. */ @Override public String[] getRuleMetricNames() { String[] metricNames = new String[DefaultAssociationRule.TAGS_SELECTION.length]; for (int i = 0; i < DefaultAssociationRule.TAGS_SELECTION.length; i++) { metricNames[i] = DefaultAssociationRule.TAGS_SELECTION[i].getReadable(); } return metricNames; }
public double[] getMetricValuesForRule() throws Exception { double[] values = new double[TAGS_SELECTION.length]; for (int i = 0; i < TAGS_SELECTION.length; i++) { values[i] = getNamedMetricValue(TAGS_SELECTION[i].getReadable()); } return values; }
public double[] getMetricValuesForRule() throws Exception { double[] values = new double[TAGS_SELECTION.length]; for (int i = 0; i < TAGS_SELECTION.length; i++) { values[i] = getNamedMetricValue(TAGS_SELECTION[i].getReadable()); } return values; }
public String getPrimaryMetricName() { return TAGS_SELECTION[m_metricType.ordinal()].getReadable(); }
public String getPrimaryMetricName() { return TAGS_SELECTION[m_metricType.ordinal()].getReadable(); }
/** * returns a string that can be used in the listOption methods to list all * the available options, i.e., "\t\tID = Text\n" for each option * * @param tags the tags to create the string for * @return a string explaining the tags */ public static String toOptionSynopsis(Tag[] tags) { String result; int i; result = ""; for (i = 0; i < tags.length; i++) { result += "\t\t" + tags[i].getIDStr() + " = " + tags[i].getReadable() + "\n"; } return result; }
/** * returns a string that can be used in the listOption methods to list all * the available options, i.e., "\t\tID = Text\n" for each option * * @param tags the tags to create the string for * @return a string explaining the tags */ public static String toOptionSynopsis(Tag[] tags) { String result; int i; result = ""; for (i = 0; i < tags.length; i++) { result += "\t\t" + tags[i].getIDStr() + " = " + tags[i].getReadable() + "\n"; } return result; }
/** * Creates a new <code>SelectedTag</code> instance. * * @param tagText the text of the selected tag (case-insensitive). * @param tags an array containing the possible valid Tags. * @throws IllegalArgumentException if the selected tag isn't in the array * of valid values. */ public SelectedTag(String tagText, Tag[] tags) { for (int i = 0; i < tags.length; i++) { if ( tags[i].getReadable().equalsIgnoreCase(tagText) || tags[i].getIDStr().equalsIgnoreCase(tagText) ) { m_Selected = i; m_Tags = tags; return; } } throw new IllegalArgumentException("Selected tag is not valid"); }
/** * Gets the current value as text. * * @return a value of type 'String' */ public String getAsText() { SelectedTag s = (SelectedTag)getValue(); return s.getSelectedTag().getReadable(); }
/** * Gets the current value as text. * * @return a value of type 'String' */ public String getAsText() { SelectedTag s = (SelectedTag)getValue(); return s.getSelectedTag().getReadable(); }
public double getNamedMetricValue(String metricName) throws Exception { DefaultAssociationRule.METRIC_TYPE requested = null; for (DefaultAssociationRule.METRIC_TYPE m : METRIC_TYPE.values()) { if (TAGS_SELECTION[m.ordinal()].getReadable().equals(metricName)) { requested = m; } } if (requested == null) { throw new Exception("[AssociationRule] Unknown metric: " + metricName); } return requested.compute(m_premiseSupport, m_consequenceSupport, m_totalSupport, m_totalTransactions); }
public double getNamedMetricValue(String metricName) throws Exception { DefaultAssociationRule.METRIC_TYPE requested = null; for (DefaultAssociationRule.METRIC_TYPE m : METRIC_TYPE.values()) { if (TAGS_SELECTION[m.ordinal()].getReadable().equals(metricName)) { requested = m; } } if (requested == null) { throw new Exception("[AssociationRule] Unknown metric: " + metricName); } return requested.compute(m_premiseSupport, m_consequenceSupport, m_totalSupport, m_totalTransactions); }
/** * Gets the list of tags that can be selected from. * * @return an array of string tags. */ public String[] getTags() { SelectedTag s = (SelectedTag)getValue(); Tag [] tags = s.getTags(); String [] result = new String [tags.length]; for (int i = 0; i < tags.length; i++) { result[i] = tags[i].getReadable(); } return result; }
/** * Gets the list of tags that can be selected from. * * @return an array of string tags. */ public String[] getTags() { SelectedTag s = (SelectedTag)getValue(); Tag [] tags = s.getTags(); String [] result = new String [tags.length]; for (int i = 0; i < tags.length; i++) { result[i] = tags[i].getReadable(); } return result; }
/** * returns a string representation of the classifier * * @return a string representation of the classifier */ @Override public String toString() { String result; result = this.getClass().getName() + "\n" + this.getClass().getName().replaceAll(".", "=") + "\n\n"; result += "# Components..........: " + m_Filter.getNumComponents() + "\n"; result += "Algorithm.............: " + m_Filter.getAlgorithm().getSelectedTag().getReadable() + "\n"; result += "Replace missing values: " + (m_Filter.getReplaceMissing() ? "yes" : "no") + "\n"; result += "Preprocessing.........: " + m_Filter.getPreprocessing().getSelectedTag().getReadable() + "\n"; return result; }