def __init__(self, learn, df, model_name: str, fields: list=(), coef: float=1.0, is_sorted: bool=True, use_log=False, use_int=False, cache_path=None, is_use_cache=True, is_continue=False, no_precalc=False):
    super().__init__(learn, df)
    self.use_log = use_log
    self.use_int = use_int
    self.coef = coef
    self.is_sorted = is_sorted
    if ((fields is None) or (len(fields) == 0)):
        self.fields = self._get_all_columns()
    else:
        self.fields = listify(fields)
    self.part_dep_df = None
    self.cache_path = ifnone(cache_path, (learn.path / 'cache'))
    self.save_name = f'{model_name}_part_dep'
    self.is_use_cache = is_use_cache
    self.is_continue = is_continue
    self.dep_var = self._get_dep_var()
    self.is_biclassification = (True if (learn.dls.c == 2) else False)
    if (no_precalc == False):
        self._load_or_calculate()
def __init__(self, learn, df, model_name: str, fields: list=(), coef: float=1.0, is_sorted: bool=True, use_log=False, use_int=False, cache_path=None, is_use_cache=True, is_continue=False, no_precalc=False):
    super().__init__(learn, df)
    self.use_log = use_log
    self.use_int = use_int
    self.coef = coef
    self.is_sorted = is_sorted
    if ((fields is None) or (len(fields) == 0)):
        self.fields = self._get_all_columns()
    else:
        self.fields = listify(fields)
    self.part_dep_df = None
    self.cache_path = ifnone(cache_path, (learn.path / 'cache'))
    self.save_name = f'{model_name}_part_dep'
    self.is_use_cache = is_use_cache
    self.is_continue = is_continue
    self.dep_var = self._get_dep_var()
    self.is_biclassification = (True if (learn.dls.c == 2) else False)
    if (no_precalc == False):
        self._load_or_calculate()