【Python】样本不均衡处理模块imblearn文档(待更新)

本文介绍了Python中用于处理样本不均衡问题的imblearn库,包括安装方法和参考资料链接,帮助读者理解如何使用该库来改善分类模型的性能。
摘要由CSDN通过智能技术生成

安装地址:https://github.com/scikit-learn-contrib/imbalanced-learn
参考:https://blog.csdn.net/kizgel/article/details/78553009#214-数学公式

Help on package imblearn:

NAME
    imblearn - Toolbox for imbalanced dataset in machine learning.

DESCRIPTION
    ``imbalanced-learn`` is a set of python methods to deal with imbalanced
    datset in machine learning and pattern recognition.
    
    Subpackages
    -----------
    combine
        Module which provides methods based on over-sampling and under-sampling.
    ensemble
        Module which provides methods generating an ensemble of
        under-sampled subsets.
    exceptions
        Module including custom warnings and error clases used across
        imbalanced-learn.
    keras
        Module which provides custom generator, layers for deep learning using
        keras.
    metrics
        Module which provides metrics to quantified the classification performance
        with imbalanced dataset.
    over_sampling
        Module which provides methods to under-sample a dataset.
    tensorflow
        Module which provides custom generator, layers for deep learning using
        tensorflow.
    under-sampling
        Module which provides methods to over-sample a dataset.
    utils
        Module including various utilities.
    pipeline
        Module which allowing to create pipeline with scikit-learn estimators.

PACKAGE CONTENTS
    _version
    base
    combine (package)
    datasets (package)
    ensemble (package)
    exceptions
    keras (package)
    metrics (package)
    over_sampling (package)
    pipeline
    tensorflow (package)
    tests (package)
    under_sampling (package)
    utils (package)

CLASSES
    imblearn.base.BaseSampler(imblearn.base.SamplerMixin)
        imblearn.base.FunctionSampler
    
    class FunctionSampler(BaseSampler)
     |  Construct a sampler from calling an arbitrary callable.
     |  
     |  Read more in the :ref:`User Guide <function_sampler>`.
     |  
     |  Parameters
     |  ----------
     |  func : callable or None,
     |      The callable to use for the transformation. This will be passed the
     |      same arguments as transform, with args and kwargs forwarded. If func is
     |      None, then func will be the identity function.
     |  
     |  accept_sparse : bool, optional (default=True)
     |      Whether sparse input are supported. By default, sparse inputs are
     |      supported.
     |  
     |  kw_args : dict, optional (default=None)
     |      The keyword argument expected by ``func``.
     |  
     |  Notes
     |  -----
     |  
     |  See
     |  :ref:`sphx_glr_auto_examples_plot_outlier_rejections.py`
     |  
     |  Examples
     |  --------
     |  >>> import numpy as np
     |  >>> from sklearn.datasets import make_classification
     |  >>> from imblearn import FunctionSampler
     |  >>> X, y = make_classification(n_classes=2, class_sep=2,
     |  
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值