scestimator.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:PredictiveServer 作者: KeyboardNerd 项目源码 文件源码
def fit(self, X, y):
        X, y = check_X_y(X, y)
        self.classes_ = unique_labels(y)
        self.X_ = DynamicBayesianClassifier._first_col(X)
        self.y_ = y
        self.size_ = self.X_.size
        for i in range(self.X_.size):
            if y[i] not in self.dbayesmode_major_.keys():
                self.dbayesmode_major_[y[i]] = scalgoutil.DBayesMode(y[i])
            self.dbayesmode_major_[y[i]].update(self.X_[i])
            self.update_priors()
        return self
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号