/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ public Enumeration listOptions() { Vector newVector; String desc; SelectedTag tag; int i; newVector = new Vector(); desc = ""; for (i = 0; i < TAGS_TYPE.length; i++) { tag = new SelectedTag(TAGS_TYPE[i].getID(), TAGS_TYPE); desc += "\t" + tag.getSelectedTag().getIDStr() + " = " + tag.getSelectedTag().getReadable() + "\n"; } newVector.addElement( new Option( "\tThe type of attribute to create:\n" + desc + "\t(default: " + new SelectedTag(Attribute.NUMERIC, TAGS_TYPE) + ")", "T", 1, "-T " + Tag.toOptionList(TAGS_TYPE))); newVector.addElement( new Option( "\tSpecify where to insert the column. First and last\n" + "\tare valid indexes.(default: last)", "C", 1, "-C <index>")); newVector.addElement( new Option( "\tName of the new attribute.\n" + "\t(default: 'Unnamed')", "N", 1, "-N <name>")); newVector.addElement( new Option( "\tCreate nominal attribute with given labels\n" + "\t(default: numeric attribute)", "L", 1, "-L <label1,label2,...>")); newVector.addElement( new Option( "\tThe format of the date values (see ISO-8601)\n" + "\t(default: yyyy-MM-dd'T'HH:mm:ss)", "F", 1, "-F <format>")); return newVector.elements(); }
/** * Sets the sort type to be used. * * @param type the type of sorting */ public void setSortType(SelectedTag type) { if (type.getTags() == TAGS_SORTTYPE) { m_SortType = type.getSelectedTag().getID(); if (m_SortType == SORT_CASESENSITIVE) m_Comparator = new CaseSensitiveComparator(); else if (m_SortType == SORT_CASEINSENSITIVE) m_Comparator = new CaseInsensitiveComparator(); else throw new IllegalStateException("Unhandled sort type '" + type + "'!"); } }
/** * Set the Functional Tree type. * * @param c Value corresponding to tree type. */ public void setModelType(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_MODEL) { int c = newMethod.getSelectedTag().getID(); if (c == 0 || c == 1 || c == 2) { m_modelType = c; } else { throw new IllegalArgumentException( "Wrong model type, -F value should be: 0, for FT, 1, " + "for FTLeaves, and 2, for FTInner "); } } }
/** * Gets an enumeration describing the available options. * * @return an enumeration of all the available options. */ public Enumeration listOptions() { Vector result; Enumeration enm; String param; SelectedTag tag; int i; result = new Vector(); enm = super.listOptions(); while (enm.hasMoreElements()) result.addElement(enm.nextElement()); param = ""; for (i = 0; i < TAGS_ALGORITHM.length; i++) { if (i > 0) param += "|"; tag = new SelectedTag(TAGS_ALGORITHM[i].getID(), TAGS_ALGORITHM); param += tag.getSelectedTag().getReadable(); } result.addElement( new Option( "\tThe algorithm to use.\n" + "\t(default: HAAR)", "A", 1, "-A <" + param + ">")); param = ""; for (i = 0; i < TAGS_PADDING.length; i++) { if (i > 0) param += "|"; tag = new SelectedTag(TAGS_PADDING[i].getID(), TAGS_PADDING); param += tag.getSelectedTag().getReadable(); } result.addElement( new Option("\tThe padding to use.\n" + "\t(default: ZERO)", "P", 1, "-P <" + param + ">")); result.addElement( new Option( "\tThe filter to use as preprocessing step (classname and options).\n" + "\t(default: MultiFilter with ReplaceMissingValues and Normalize)", "F", 1, "-F <filter specification>")); if (getFilter() instanceof OptionHandler) { result.addElement( new Option( "", "", 0, "\nOptions specific to filter " + getFilter().getClass().getName() + " ('-F'):")); enm = ((OptionHandler) getFilter()).listOptions(); while (enm.hasMoreElements()) result.addElement(enm.nextElement()); } return result.elements(); }
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */ public Enumeration listOptions() { Vector result; Enumeration en; String desc; int i; SelectedTag tag; result = new Vector(); en = super.listOptions(); while (en.hasMoreElements()) result.addElement(en.nextElement()); result.addElement( new Option( "\tSpecify list of string attributes to convert to words.\n" + "\t(default: select all relational attributes)", "R", 1, "-R <index1,index2-index4,...>")); result.addElement(new Option("\tInverts the matching sense of the selection.", "V", 0, "-V")); desc = ""; for (i = 0; i < TAGS_SORTTYPE.length; i++) { tag = new SelectedTag(TAGS_SORTTYPE[i].getID(), TAGS_SORTTYPE); desc += "\t" + tag.getSelectedTag().getIDStr() + " = " + tag.getSelectedTag().getReadable() + "\n"; } result.addElement( new Option( "\tDetermines the type of sorting:\n" + desc + "\t(default: " + new SelectedTag(SORT_CASESENSITIVE, TAGS_SORTTYPE) + ")", "S", 1, "-S " + Tag.toOptionList(TAGS_SORTTYPE))); return result.elements(); }
/** * set quality measure to be used in searching for networks. * * @param newScoreType the new score type */ public void setScoreType(SelectedTag newScoreType) { if (newScoreType.getTags() == TAGS_SCORE_TYPE) { m_nScoreType = newScoreType.getSelectedTag().getID(); } }
/** * Sets the type of attribute to generate. * * @param value the attribute type */ public void setAttributeType(SelectedTag value) { if (value.getTags() == TAGS_TYPE) { m_AttributeType = value.getSelectedTag().getID(); } }
/** * Set the search direction * * @param d the direction of the search */ public void setDirection(SelectedTag d) { if (d.getTags() == TAGS_SELECTION) { m_searchDirection = d.getSelectedTag().getID(); } }
/** * Set the type * * @param t the Linear Forward Selection type */ public void setType(SelectedTag t) { if (t.getTags() == TAGS_TYPE) { m_linearSelectionType = t.getSelectedTag().getID(); } }
public void setDistanceWeighting(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_WEIGHTING) { classifier.setInverseWeighting(newMethod.getSelectedTag().getID() == 0 ? false : true); } }
/** * Sets how the training data will be transformed. Should be one of FILTER_NORMALIZE, * FILTER_STANDARDIZE, FILTER_NONE. * * @param newType the new filtering mode */ public void setFilterType(SelectedTag newType) { if (newType.getTags() == TAGS_FILTER) { m_filterType = newType.getSelectedTag().getID(); } }
/** * Set the search direction * * @param d the direction of the search */ public void setForwardSelectionMethod(SelectedTag d) { if (d.getTags() == TAGS_SEARCH_METHOD) { m_forwardSearchMethod = d.getSelectedTag().getID(); } }
/** * Sets the type of algorithm to use * * @param value the algorithm type */ public void setAlgorithm(SelectedTag value) { if (value.getTags() == TAGS_ALGORITHM) { m_Algorithm = value.getSelectedTag().getID(); } }
/** * Sets the type of Padding to use * * @param value the Padding type */ public void setPadding(SelectedTag value) { if (value.getTags() == TAGS_PADDING) { m_Padding = value.getSelectedTag().getID(); } }
public void setNormalization(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_NORM) { classifier.setNormalizing(newMethod.getSelectedTag().getID() == 0 ? false : true); } }
public void setMetric(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_DISTANCE) { classifier.setMetric(newMethod.getSelectedTag().getID()); } }
/** * Sets the method used to select attributes for use in the linear regression. * * @param method the attribute selection method to use. */ public void setAttributeSelectionMethod(SelectedTag method) { if (method.getTags() == TAGS_SELECTION) { m_AttributeSelection = method.getSelectedTag().getID(); } }
/** * Sets the source location of the cost matrix. Values other than MATRIX_ON_DEMAND or * MATRIX_SUPPLIED will be ignored. * * @param newMethod the cost matrix location method. */ public void setCostMatrixSource(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_MATRIX_SOURCE) { m_MatrixSource = newMethod.getSelectedTag().getID(); } }
/** * Sets the performance evaluation measure to use for selecting attributes for the decision table * * @param newMethod the new performance evaluation metric to use */ public void setEvaluationMeasure(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_EVALUATION) { m_evaluationMeasure = newMethod.getSelectedTag().getID(); } }
/** * Sets how the models are compared. * * @param value the comparison type. */ public void setComparisonType(SelectedTag value) { if (value.getTags() == CollectiveInstances.COMPARE_TAGS) m_ComparisonType = value.getSelectedTag().getID(); }
/** * Sets how the classifiers are evaluated. * * @param tag the evaluation type. */ public void setEvaluationType(SelectedTag tag) { if (tag.getTags() == CollectiveInstances.EVAL_TAGS) m_EvaluationType = tag.getSelectedTag().getID(); }
/** * Sets the method to use for handling missing values. Values other than M_NORMAL, M_AVERAGE, * M_MAXDIFF and M_DELETE will be ignored. * * @param newMode the method to use for handling missing values. */ public void setMissingMode(SelectedTag newMode) { if (newMode.getTags() == TAGS_MISSING) { m_MissingMode = newMode.getSelectedTag().getID(); } }
/** * Sets the distance weighting method used. Values other than WEIGHT_NONE, WEIGHT_INVERSE, or * WEIGHT_SIMILARITY will be ignored. * * @param newMethod the distance weighting method to use */ public void setDistanceWeighting(SelectedTag newMethod) { if (newMethod.getTags() == TAGS_WEIGHTING) { m_DistanceWeighting = newMethod.getSelectedTag().getID(); } }