📄 ensembleselectionlibrarymodel.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_10) on Fri Jan 26 16:34:45 NZDT 2007 --><TITLE>EnsembleSelectionLibraryModel</TITLE><META NAME="keywords" CONTENT="weka.classifiers.meta.ensembleSelection.EnsembleSelectionLibraryModel class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="EnsembleSelectionLibraryModel";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/" target="_blank"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibrary.html" title="class in weka.classifiers.meta.ensembleSelection"><B>PREV CLASS</B></A> <A HREF="../../../../weka/classifiers/meta/ensembleSelection/ModelBag.html" title="class in weka.classifiers.meta.ensembleSelection"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html" target="_top"><B>FRAMES</B></A> <A HREF="EnsembleSelectionLibraryModel.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.classifiers.meta.ensembleSelection</FONT><BR>Class EnsembleSelectionLibraryModel</H2><PRE>java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../weka/classifiers/EnsembleLibraryModel.html" title="class in weka.classifiers">weka.classifiers.EnsembleLibraryModel</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>weka.classifiers.meta.ensembleSelection.EnsembleSelectionLibraryModel</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><HR><DL><DT><PRE>public class <B>EnsembleSelectionLibraryModel</B><DT>extends <A HREF="../../../../weka/classifiers/EnsembleLibraryModel.html" title="class in weka.classifiers">EnsembleLibraryModel</A><DT>implements java.io.Serializable</DL></PRE><P>This class represents a library model that is used for EnsembleSelection. At this level the concept of cross validation is abstracted away. This class keeps track of the performance statistics and bookkeeping information for its "model type" accross all the CV folds. By "model type", I mean the combination of both the Classifier type (e.g. J48), and its set of parameters (e.g. -C 0.5 -X 1 -Y 5). So for example, if you are using 5 fold cross validaiton, this model will keep an array of classifiers[] of length 5 and will keep track of their performances accordingly. This class also has methods to deal with serializing all of this information into the .elm file that will represent this model. <p/> Also it is worth mentioning that another important function of this class is to track all of the dataset information that was used to create this model. This is because we want to protect users from doing foreseeably bad things. e.g., trying to build an ensemble for a dataset with models that were trained on the wrong partitioning of the dataset. This could lead to artificially high performance due to the fact that instances used for the test set to gauge performance could have accidentally been used to train the base classifiers. So in a nutshell, we are preventing people from unintentionally "cheating" by enforcing that the seed, #folds, validation ration, and the checksum of the Instances.toString() method ALL match exactly. Otherwise we throw an exception.<P><P><DL><DT><B>Version:</B></DT> <DD>$Revision: 1.1 $</DD><DT><B>Author:</B></DT> <DD>Robert Jung (mrbobjung@gmail.com)</DD><DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#weka.classifiers.meta.ensembleSelection.EnsembleSelectionLibraryModel">Serialized Form</A></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#FILE_EXTENSION">FILE_EXTENSION</A></B></CODE><BR> The default file extension for ensemble library models</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#m_Debug">m_Debug</A></B></CODE><BR> The debug flag as propagated from the main EnsembleSelection class.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#EnsembleSelectionLibraryModel()">EnsembleSelectionLibraryModel</A></B>()</CODE><BR> Default Constructor</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#EnsembleSelectionLibraryModel(weka.classifiers.Classifier)">EnsembleSelectionLibraryModel</A></B>(<A HREF="../../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A> classifier)</CODE><BR> Basic Constructor</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#EnsembleSelectionLibraryModel(weka.classifiers.Classifier, int, java.lang.String, double, int)">EnsembleSelectionLibraryModel</A></B>(<A HREF="../../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A> classifier, int seed, java.lang.String checksum, double validationRatio, int folds)</CODE><BR> Constructor for LibaryModel</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#createModel(weka.core.Instances[], weka.core.Instances[], java.lang.String, int)">createModel</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>[] data, <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>[] hillclimbData, java.lang.String dataDirectoryName, int algorithm)</CODE><BR> Creates the model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getAveragePrediction(weka.core.Instance)">getAveragePrediction</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</CODE><BR> Returns the average of the prediction of the models across all folds.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getChecksum()">getChecksum</A></B>()</CODE><BR> get the checksum</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getFileName(java.lang.String)">getFileName</A></B>(java.lang.String stringRepresentation)</CODE><BR> The purpose of this method is to get an appropriate file name for a model based on its string representation of a model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getFoldPrediction(weka.core.Instance, int)">getFoldPrediction</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance, int fold)</CODE><BR> Returns prediction of the classifier for the specified fold.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getFolds()">getFolds</A></B>()</CODE><BR> get the number of folds</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getModels()">getModels</A></B>()</CODE><BR> Returs the array of classifiers</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getSeed()">getSeed</A></B>()</CODE><BR> Get the seed</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getStringChecksum(java.lang.String)">getStringChecksum</A></B>(java.lang.String string)</CODE><BR> Gets a checksum for the string defining this classifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double[][]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getValidationPredictions()">getValidationPredictions</A></B>()</CODE><BR> getter for validation predictions</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#getValidationRatio()">getValidationRatio</A></B>()</CODE><BR> get validationRatio</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html" title="class in weka.classifiers.meta.ensembleSelection">EnsembleSelectionLibraryModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#loadModel(java.lang.String)">loadModel</A></B>(java.lang.String modelFilePath)</CODE><BR> loads the specified model</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#rehydrateModel(java.lang.String)">rehydrateModel</A></B>(java.lang.String workingDirectory)</CODE><BR> The purpose of this method is to "rehydrate" the classifier object fot this library model from the filesystem.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#releaseModel()">releaseModel</A></B>()</CODE><BR> Releases the model from memory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html#saveModel(java.lang.String, weka.classifiers.meta.ensembleSelection.EnsembleSelectionLibraryModel)">saveModel</A></B>(java.lang.String directory, <A HREF="../../../../weka/classifiers/meta/ensembleSelection/EnsembleSelectionLibraryModel.html" title="class in weka.classifiers.meta.ensembleSelection">EnsembleSelectionLibraryModel</A> model)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -