classify.py 文件源码

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

项目:fingerprint-securedrop 作者: freedomofpress 项目源码 文件源码
def __init__(self, model_timestamp, world, model_type, 
                 hyperparameters, feature_scaling=True,
                 n_cores=multiprocessing.cpu_count(), k=10):
        """
        Args:
            model [string]: machine learning algorithm to be used
            parameters [dict]: hyperparameter set to be used for the
                               machine learning algorithm
            k [int]: number of k-folds
            world [dict]: world type (open- or closed- world)
                          and parameters if necessary
        """

        self.model_timestamp = model_timestamp
        self.hyperparameters = hyperparameters
        self.model_type = model_type
        self.world_type = world["type"]
        self.frac_obs = world["observed_fraction"]
        self.n_cores = n_cores
        self.k = k
        self.feature_scaling = feature_scaling
        self.db = database.ModelStorage()
        self.train_class_balance = 'DEFAULT'
        self.base_rate = 'DEFAULT'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号