⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 evaluation.html

📁 数据挖掘的最常用工具。由于开源
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="Evaluation(weka.core.Instances)"><!-- --></A><H3>Evaluation</H3><PRE>public <B>Evaluation</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;data)           throws java.lang.Exception</PRE><DL><DD>Initializes all the counters for the evaluation.  Use <code>useNoPriors()</code> if the dataset is the test set and you can't initialize with the priors from the training set via  <code>setPriors(Instances)</code>.<P><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - set of training instances, to get some header                         information and prior class distribution information<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the class is not defined<DT><B>See Also:</B><DD><A HREF="../../weka/classifiers/Evaluation.html#useNoPriors()"><CODE>useNoPriors()</CODE></A>, <A HREF="../../weka/classifiers/Evaluation.html#setPriors(weka.core.Instances)"><CODE>setPriors(Instances)</CODE></A></DL></DL><HR><A NAME="Evaluation(weka.core.Instances, weka.classifiers.CostMatrix)"><!-- --></A><H3>Evaluation</H3><PRE>public <B>Evaluation</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;data,                  <A HREF="../../weka/classifiers/CostMatrix.html" title="class in weka.classifiers">CostMatrix</A>&nbsp;costMatrix)           throws java.lang.Exception</PRE><DL><DD>Initializes all the counters for the evaluation and also takes a cost matrix as parameter. Use <code>useNoPriors()</code> if the dataset is the test set and you can't initialize with the priors from the training set via  <code>setPriors(Instances)</code>.<P><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - set of training instances, to get some header                         information and prior class distribution information<DD><CODE>costMatrix</CODE> - the cost matrix---if null, default costs will be used<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if cost matrix is not compatible with                         data, the class is not defined or the class is numeric<DT><B>See Also:</B><DD><A HREF="../../weka/classifiers/Evaluation.html#useNoPriors()"><CODE>useNoPriors()</CODE></A>, <A HREF="../../weka/classifiers/Evaluation.html#setPriors(weka.core.Instances)"><CODE>setPriors(Instances)</CODE></A></DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="areaUnderROC(int)"><!-- --></A><H3>areaUnderROC</H3><PRE>public double <B>areaUnderROC</B>(int&nbsp;classIndex)</PRE><DL><DD>Returns the area under ROC for those predictions that have been collected in the evaluateClassifier(Classifier, Instances) method. Returns  Instance.missingValue() if the area is not available.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>classIndex</CODE> - the index of the class to consider as "positive"<DT><B>Returns:</B><DD>the area under the ROC curve or not a number</DL></DD></DL><HR><A NAME="confusionMatrix()"><!-- --></A><H3>confusionMatrix</H3><PRE>public double[][] <B>confusionMatrix</B>()</PRE><DL><DD>Returns a copy of the confusion matrix.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a copy of the confusion matrix as a two-dimensional array</DL></DD></DL><HR><A NAME="crossValidateModel(weka.classifiers.Classifier, weka.core.Instances, int, java.util.Random, java.lang.Object...)"><!-- --></A><H3>crossValidateModel</H3><PRE>public void <B>crossValidateModel</B>(<A HREF="../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A>&nbsp;classifier,                               <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;data,                               int&nbsp;numFolds,                               java.util.Random&nbsp;random,                               java.lang.Object...&nbsp;forPredictionsPrinting)                        throws java.lang.Exception</PRE><DL><DD>Performs a (stratified if class is nominal) cross-validation  for a classifier on a set of instances. Now performs a deep copy of the classifier before each call to  buildClassifier() (just in case the classifier is not initialized properly).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>classifier</CODE> - the classifier with any options set.<DD><CODE>data</CODE> - the data on which the cross-validation is to be  performed<DD><CODE>numFolds</CODE> - the number of folds for the cross-validation<DD><CODE>random</CODE> - random number generator for randomization<DD><CODE>forPredictionsString</CODE> - varargs parameter that, if supplied, is expected to hold a StringBuffer to print predictions to,  a Range of attributes to output and a Boolean (true if the distribution is to be printed)<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if a classifier could not be generated  successfully or the class is not defined</DL></DD></DL><HR><A NAME="crossValidateModel(java.lang.String, weka.core.Instances, int, java.lang.String[], java.util.Random)"><!-- --></A><H3>crossValidateModel</H3><PRE>public void <B>crossValidateModel</B>(java.lang.String&nbsp;classifierString,                               <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;data,                               int&nbsp;numFolds,                               java.lang.String[]&nbsp;options,                               java.util.Random&nbsp;random)                        throws java.lang.Exception</PRE><DL><DD>Performs a (stratified if class is nominal) cross-validation  for a classifier on a set of instances.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>classifierString</CODE> - a string naming the class of the classifier<DD><CODE>data</CODE> - the data on which the cross-validation is to be  performed<DD><CODE>numFolds</CODE> - the number of folds for the cross-validation<DD><CODE>options</CODE> - the options to the classifier. Any options<DD><CODE>random</CODE> - the random number generator for randomizing the data accepted by the classifier will be removed from this array.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if a classifier could not be generated  successfully or the class is not defined</DL></DD></DL><HR><A NAME="evaluateModel(java.lang.String, java.lang.String[])"><!-- --></A><H3>evaluateModel</H3><PRE>public static java.lang.String <B>evaluateModel</B>(java.lang.String&nbsp;classifierString,                                             java.lang.String[]&nbsp;options)                                      throws java.lang.Exception</PRE><DL><DD>Evaluates a classifier with the options given in an array of strings. <p/> Valid options are: <p/> -t filename <br/> Name of the file with the training data. (required) <p/> -T filename <br/> Name of the file with the test data. If missing a cross-validation  is performed. <p/> -c index <br/> Index of the class attribute (1, 2, ...; default: last). <p/> -x number <br/> The number of folds for the cross-validation (default: 10). <p/> -no-cv <br/> No cross validation.  If no test file is provided, no evaluation is done. <p/>  -split-percentage percentage <br/> Sets the percentage for the train/test set split, e.g., 66. <p/>  -preserve-order <br/> Preserves the order in the percentage split instead of randomizing the data first with the seed value ('-s'). <p/> -s seed <br/> Random number seed for the cross-validation and percentage split (default: 1). <p/> -m filename <br/> The name of a file containing a cost matrix. <p/> -l filename <br/> Loads classifier from the given file. In case the filename ends with ".xml" the options are loaded from XML. <p/> -d filename <br/> Saves classifier built from the training data into the given file. In case  the filename ends with ".xml" the options are saved XML, not the model. <p/> -v <br/> Outputs no statistics for the training data. <p/> -o <br/> Outputs statistics only, not the classifier. <p/>  -i <br/> Outputs detailed information-retrieval statistics per class. <p/> -k <br/> Outputs information-theoretic statistics. <p/> -p range <br/> Outputs predictions for test instances (or the train instances if no test instances provided  and -no-cv is used), along with the attributes in the specified range (and   nothing else). Use '-p 0' if no attributes are desired. <p/> -distribution <br/> Outputs the distribution instead of only the prediction in conjunction with the '-p' option (only nominal classes). <p/> -r <br/> Outputs cumulative margin distribution (and nothing else). <p/> -g <br/>  Only for classifiers that implement "Graphable." Outputs the graph representation of the classifier (and nothing else). <p/> -xml filename | xml-string <br/> Retrieves the options from the XML-data instead of the command line. <p/>  -threshold-file file <br/> The file to save the threshold data to. The format is determined by the extensions, e.g., '.arff' for ARFF format or '.csv' for CSV. <p/>          -threshold-label label <br/> The class label to determine the threshold data for (default is the first label) <p/><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>classifierString</CODE> - class of machine learning classifier as a string<DD><CODE>options</CODE> - the array of string containing the options<DT><B>Returns:</B><DD>a string describing the results<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if model could not be evaluated successfully</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE><DL><DD>A test method for this class. Just extracts the first command line argument as a classifier class name and calls evaluateModel.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>args</CODE> - an array of command line arguments, the first of which must be the class name of a classifier.</DL></DD></DL><HR><A NAME="evaluateModel(weka.classifiers.Classifier, java.lang.String[])"><!-- --></A><H3>evaluateModel</H3><PRE>public static java.lang.String <B>evaluateModel</B>(<A HREF="../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A>&nbsp;classifier,                                             java.lang.String[]&nbsp;options)                                      throws java.lang.Exception</PRE><DL><DD>Evaluates a classifier with the options given in an array of strings. <p/> Valid options are: <p/> -t name of training file <br/> Name of the file with the training data. (required) <p/> -T name of test file <br/> Name of the file with the test data. If missing a cross-validation  is performed. <p/> -c class index <br/>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -