zoukankan      html  css  js  c++  java
  • weka源代码-总述

    分类:

    所有的分类器都继承自抽象类AbstractClassifier而AbstractClassifier继承自接口Classifier。集成关系如下图所示:


    而类Classifier中主要包含以下接口:

    public abstract void buildClassifier(Instances data) throws Exception;

    该方法主要用于根据样本数据data训练出分类器;

    public double classifyInstance(Instance instance) throws Exception;

    该方法是对样本instance进行分类并返回最有可能的类;

    public double[] distributionForInstance(Instance instance) throws Exception;

    对样本instance进行分类,如果分类成功则返回的数组值包含该类别,否则数组元素全为0;

    所有的classifier必须实现classifyInstance或distributionForInstance。

    聚类:

    所有的聚类算法都集成自AbstractClusterer,而AbstractClusterer继承自接口Clusterer,主要调用关系如下:

    Clusterer主要实现的接口如下:

    void buildClusterer(Instances data) throws Exception; 

    根据样本数据训练聚类算法;

    int clusterInstance(Instance instance) throws Exception;

    public double[] distributionForInstance(Instance instance) throws Exception;

    为实例归类;

    int numberOfClusters() throws Exception;

    返回聚类个数;

    同样所有的聚类算法都必须实现clusterInstance或distributionForInstance。

    规则挖掘:

    关联规则主要实现的算法有AprioriFPgrowth等,

    类关系如下:

    Associator中主要实现

    void buildAssociations(Instances data) throws Exception;

    该方法主要用于生成规则生成器。

  • 相关阅读:
    Markdown 画 UML 图(六)
    Markdown 高级技巧(五)
    Markdown 链接、图片、表格(四)
    16.3Sum Closet
    15.Three Sum
    11.Container With Most Water
    1.Two Sum
    优化学习笔记5
    优化学习笔记4
    优化学习笔记3
  • 原文地址:https://www.cnblogs.com/549294286/p/3417857.html
Copyright © 2011-2022 走看看