|
| 1 | +.. _developers-utils: |
| 2 | + |
| 3 | +======================== |
| 4 | +Utilities for Developers |
| 5 | +======================== |
| 6 | + |
| 7 | +This section describes some of the functions provided by `imblearn` to facilitate writing appropriate code when using (or tinkering with) `imblearn`. |
| 8 | + |
| 9 | +.. _developers-utils: |
| 10 | + |
| 11 | +======================== |
| 12 | +Utilities for Developers |
| 13 | +======================== |
| 14 | + |
| 15 | +Imbalanced-learn contains a number of utilities to help with development. These are |
| 16 | +located in :mod:`imblearn.utils`, and include tools in a number of categories. |
| 17 | +All the following functions and classes are in the module :mod:`imblearn.utils`. |
| 18 | + |
| 19 | +.. warning :: |
| 20 | + |
| 21 | + These utilities are meant to be used internally within the imbalanced-learn |
| 22 | + package. They are not guaranteed to be stable between versions of |
| 23 | + scikit-learn. Backports, in particular, will be removed as the scikit-learn |
| 24 | + dependencies evolve. |
| 25 | + |
| 26 | + |
| 27 | +.. currentmodule:: imblearn.utils |
| 28 | + |
| 29 | + |
| 30 | +Validation Tools |
| 31 | +================ |
| 32 | + |
| 33 | +These are tools used to check and validate input. When you write a function |
| 34 | +which accepts arrays, matrices, or sparse matrices as arguments, the following |
| 35 | +should be used when applicable. |
| 36 | + |
| 37 | +- :func:`check_neighbors_object`: Check the objects is consistent to be a NN. |
| 38 | +- :func:`check_target_type`: Check the target types to be conform to the current samplers. |
| 39 | +- :func:`check_ratio`: Checks ratio for consistent type and return a dictionary |
| 40 | + containing each targeted class with its corresponding number of pixel. |
| 41 | + |
| 42 | +Helper Functions |
| 43 | +================ |
| 44 | +These are tools to facilitate writing code for imbalance learn. |
| 45 | + |
| 46 | +- :func:`hash_X_y`: Compute hash of the input arrays. |
| 47 | +- :func:`deprecate_parameter`: Helper to deprecate a parameter by another one. |
0 commit comments