Waikato / meka

Multi-label classifiers and evaluation procedures using the Weka machine learning framework.
http://waikato.github.io/meka/
GNU General Public License v3.0
200 stars 76 forks source link

A doubts about the IncrementalEvaluation class #59

Closed haokeliu closed 5 years ago

haokeliu commented 5 years ago

Hello, I am a beginner of Meka, I have questions about IncrementalEvaluation. In my understanding, whether it is the evaluateModelBatchWindow function or the evaluateModelPrequentialBasic function, the data stream is taken as part of the training set, and then each piece of data is used as the updateClassifier. For example, CCUpdateable only uses the classifier to predict, but how does it fit the drifting data stream? I didn't see the specific update of the classifier. Below is a partial code for CCUpdateable.

          `protected void update(Instance x) throws Exception {

        Instance x_ = (Instance)x.copy();
        x_.setDataset(null);

        // delete all except one (leaving a binary problem)
        // delete all the attributes (and track where our index ends up)
        int c_index = this.value;
        for(int i = excld.length-1; i >= 0; i--) {
            x_.deleteAttributeAt(excld[i]);
            if (excld[i] < this.index)
                c_index--; 
        }
        x_.setDataset(this._template);

        ((UpdateableClassifier)this.classifier).updateClassifier(x_);

        if (next != null)
            next.update(x);
    }`

I would be grateful if you have any suggestions.

jmread commented 5 years ago

Since CC is a meta method (containing a chain of base classifiers), it is the base classifiers which are updated. This can be seen in the line ((UpdateableClassifier)this.classifier).updateClassifier(x_); It depends totally on your choice of base classifier as to how this fitting is done.

haokeliu commented 5 years ago

由于CC是一种元方法(包含一系列基本分类器),因此它是更新的基本分类器。这可以在线上看出((UpdateableClassifier)this.classifier).updateClassifier(x_);它完全取决于你选择的基本分类器如何完成这种拟合。

Thank you for your reply, I will read the code in detail.