also re-order rank.py functions by moving specific types of label-quality scores to be last in file
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
The functions `_get_consensus_stats` and
`_get_annotator_label_quality_score` take an argument
`label_quality_score_kwargs`, a dictionary of keyword arguments to pass
to `get_label_quality_scores`. When passing a
`label_quality_score_kwargs` dictionary to these functions, using the
unpacking operator is incorrect: that would be an extra level of
unpacking. The _implementations_ of these functions will unpack the
`label_quality_score_kwargs` when calling `get_label_quality_scores`.
This patch fixes the issue and adds a basic regression test.
[skip ci]
The latest pandas-stubs (1.5.2.221124) changed the type of
`.apply(f, ...)` such that the function `f` must return either a
`Scalar` or a `Series`. This patch updates the functions to return a
`Series`. Note that this has minimal impact on runtime performance,
because by default, the pd.Series constructor does *not* copy the
underlying data.
[skip ci]
* error handling for rare classes
* change subtract to symmetric difference
* remove extra np.unique
* add warning for all instances of getting consensus labels
* error checking edits
* Add typing
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
* black formatting
* update typing - labels_multiannotator will always already be converted to pd.dataframe
* make pred_probs options in typing
* add =None
* docstring edits
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
* add basic docstring
* Changed to verbose
* Removed unessesary calculation out of get_labels_quality_m
* Update cleanlab/multiannotator.py
* comment for lost classes check so it can be grepped
* caution about setting verbose to false
* advise against verbose=false in docstring
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Ulyana <ulyana@cleanlab.ai>
* docstring formatting
* add tiebreak info
* add example link to tutorial
* add missing backticks
* minor docstring text edits
* clarify "task"
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
* header for multiannotator module
* header for outlier module
* header for token_classification.filter
* header for token_classification.rank
* header for token_classification.summary
* header for util
* header for latent_algebra
* header for label_quality_utils
* header for token_classification_utils
* header for huggingfacekerasclassifier
* add experimental modules' dependencies to readme
* calculate most likely class error from subset
* use verbose to control warning prints
* clip minimum to 1e-6 to prevent division by zero
* add docstring