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

📄 miningmodel.java

📁 一个数据挖掘软件ALPHAMINERR的整个过程的JAVA版源代码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    public String getApplicationName()
    {
      return applicationName;
    }

    /**
     * Sets new application name.
     *
     * @param applicationName new name of application
     */
    public void setApplicationName(String applicationName)
    {
      this.applicationName = applicationName;
    }

    /**
     * Returns the application version.
     *
     * @return version of application
     */
    public String getApplicationVersion()
    {
      return applicationVersion;
    }

    /**
     * Sets new application version.
     *
     * @param applicationVersion new application version
     */
    public void setApplicationVersion(String applicationVersion)
    {
      this.applicationVersion = applicationVersion;
    }

    /**
     * Returns mining settings for creating this model.
     *
     * @return mining settings for creating this model
     */
    public MiningSettings getMiningSettings()
    {
        return miningSettings;
    }

    /**
     * Sets mining settings for creating this model.
     *
     * @param miningSettings mining settings for creating this model
     */
    public void setMiningSettings(MiningSettings miningSettings)
    {
        this.miningSettings = miningSettings;
    }

    /**
     * Returns application input specification of the model.
     *
     * @return application input specification of the model
     */
    public ApplicationInputSpecification getInputSpec()
    {
        return inputSpec;
    }

    /**
     * Sets application input specification of the model.
     *
     * @param inputSpec new application input specification of the model
     */
    public void setInputSpec(ApplicationInputSpecification inputSpec)
    {
        this.inputSpec = inputSpec;
    }

    /**
     * Returns mining transfomer of model.
     *
     * @return mining transformer of model
     */
    public MiningTransformer getMiningTransform()
    {
      return miningTransform;
    }

    /**
     * Sets new mining transformer of model.
     *
     * @param miningTransform new mining transformer of model
     */
    public void setMiningTransform(MiningTransformer miningTransform)
    {
      this.miningTransform = miningTransform;
    }

    /**
     * Returns array of mining model results obtained from applying the
     * model on some data.
     *
     * @return array of mining model results
     */
    public MiningModelResult[] getMiningResult()
    {
        return miningResult;
    }

    /**
     * Sets array of mining model results obtained from applying the
     * model on some data.
     *
     * @param miningResult new array of mining model results
     */
    public void setMiningResult(MiningModelResult[] miningResult)
    {
        this.miningResult = miningResult;
    }

    /**
     * Returns PMML file name of the model (if exists).
     *
     * @return file name of the model
     */
    public String getFileName()
    {
        return fileName;
    }

    /**
     * Sets PMML file name of the model.
     *
     * @param pmml new PMML file name of the model
     */
    public void setFileName(String pmml)
    {
        this.fileName = pmml;
    }

    // -----------------------------------------------------------------------
    //  Application of model to new data
    // -----------------------------------------------------------------------
    /**
     * Applies function of mining model to a mining vector. In general,
     * the meta data of the mining vector should be similar to the metaData
     * of this class. This ensures compatibility of training and
     * application data.
     *
     * Notice that from fundamental operator considerations it follows
     * that this method is general enough to cover nearly all types
     * of mining functions: classification, regression, clustering,
     * association rules, sequential. Only statistical analysis,
     * customer sequential, and time series prediction seem not
     * to be appropriate for this method.
     *
     * @param miningVector mining vector where the model should be applied
     * @return function value of the mining vector
     * @throws MiningException if there are some errors when model is applied
     */
    public abstract double applyModelFunction(MiningVector miningVector)
        throws MiningException;

    /**
     * General function of applying the mining model to some data.
     * Argument and result of this method must both be some data elements
     * which is ensured via the MiningMatrixElement interface.
     *
     * @param miningData mining data where the model should be applied
     * @return data resulting from the model application
     * @throws MiningException if there are some errors when model is applied
     */
    public abstract MiningMatrixElement applyModel(MiningMatrixElement miningData)
        throws MiningException;

    // -----------------------------------------------------------------------
    //  Methods of PMML handling
    // -----------------------------------------------------------------------
    /**
     * Write model to PMML document.
     *
     * @throws MiningException if can't write model to the pmml destination
     * @param writer writer for PMML access
     */
    public abstract void writePmml( Writer writer ) throws MiningException;

    /**
     * Read model from PMML document.
     *
     * @throws MiningException if can't read model from the pmml source
     * @param reader reader for PMML access
     */
    public abstract void readPmml( Reader reader ) throws MiningException;

    /**
     * Creates PMML object of model.
     *
     * @throws MiningException if can't create pmml presentation for mining model
     * @return PMML object of model
     */
    public abstract Object createPmmlObject() throws MiningException;

    /**
     * Reads PMML object of model.
     *
     * @throws MiningException if can't restore model from the pmml structure
     * @param pmmlObject PMML object of model
     */
    public abstract void parsePmmlObject( Object pmmlObject ) throws MiningException;

    // -----------------------------------------------------------------------
    //  Other export methods
    // -----------------------------------------------------------------------
    /**
     * Many models can export their result as MiningInputStream.
     * Examples are cluster models which deliver the cluster vectors
     * or association rules and sequence models which export their
     * rules in transactional format or decision trees converted
     * into rules. This method allows to use the model as input
     * to transformations, further mining algorithms or to run
     * selections on the result using MultidimensionalStream. <p>
     *
     * From a philosophical point of view it reflects that a data
     * mining algrithm is a transformation "from some data to some data".
     * It takes a mining input stream as input and delivers a mining
     * model which in turn returns a mining input stream, too.
     *
     * @return representation of model as mining input stream
     * @throws MiningException canno convert to mining input stream
     */
    public MiningInputStream toMiningInputStream() throws MiningException
    {
      throw new MiningException("not implemented");
    }

    /**
     * Write model to plain text.
     *
     * @throws MiningException if can't write model as plain text
     * @param writer writer for plain text
     */
    public abstract void writePlainText( Writer writer ) throws MiningException;

    /**
     * Returns HTML representation of model.
     *
     * @return HTML string of model
     */
    public abstract String toHtmlString();
}

⌨️ 快捷键说明

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