* unify softmax implementations
* Refine mypy type hint in _set_fine_search_range function
- Update type hint for `min_entropy_ind` from built-in `int` to `np.intp`.
- This refinement addresses a type compatibility warning.
- `np.intp` is the integer type used by numpy for indexing and can differ in size from the built-in Python `int` depending on the platform (32-bit vs 64-bit).
- Mypy highlighted this type hint discrepancy.
* add unit tests for softmax
---------
Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
* Handling missing type & docs in cleanlab/token_classification_utils.py 🏷️
- Added typehints for the cleanlabs/token_classification_utils.py file for mypy strict mode
- Fixed corresponding docstrings refers #587
* Handling missing type & docs in cleanlab/multilabel_classification.py 🏷️
- Fixing all errors for mypy strict for the file
* docs(internal): fix "number of new classes" variable in docstring
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
* 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>
* docs: 📝 add usage example for get_sentence
Also remove types in docstrings.
* docs: 📝 add usage examples for filter_sentence
* docs: 📝 add page for internal.token_classification_utils
* docs: 📝 remove name of return variable
auto-tagging won't work correctly for the return value if it's not a tuple
* 📝 add pages for modules in cleanlab.token_classification
* fix indentation
* 📝 add token classification api to toctree
* 🎨 format docstrings
* 📝 add usage examples
* update example comment
* 📝 add usage examples
* 📝 add return variable name in docstring
* 📝 remove some hard-coded params types in rank module
Keep more complex parameters hard-coded for now. E.g. "enum"-like parameters.
* 🎨 remove indentation of parameters in docstrings
* 🎨 fix indentation
* colored docstring typo + formatting
* typo: occurence
* probs_merged docstring typo + formatting
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
* Added base structure outline for get_ood_scores()
Added base test for get_ood_scores()
* Added warning for illogical param combo
* Addressed PR comments
* Added better unit tests
* TODO: test for correctly identifying OOD example
* Moved logic from get_ood_scores to _subtract_confident_thresholds
* TODO: Is this a cleaner way of doing this? Minimal code repeat but strange change to _subtract function
* Addressed type issue
* Switched logic for getting confident thresholds
* Fixing typecheck issues wiht labels parameter being None
* Simplified helper function. Testing type
* Fixed mypy static typing issue
* Mypy typecheck logic test
* removed uncessesary imports in util file
* typechecker debugging (add assert)
* Fixed type logic and removed confident_thresholds=None return
* Added extra arg in helper func to end of func
* Added zero-index checking for label param
* Added ood examples to outlier score notebook
* Added skeleton file structure for implementing outliers
* Make adjust_pred_probs=True by default not false
* Added base Outlier class functionality
TODO:
* test_outlier.py
* Added logic tests for function
* Updated get_ood_scores to always return confident_thresholds
* Even if none were calculated (then return is None)
* Added warning for fit that doesn't calculate confident_thresholds
* Moved get_outlier_scores and get_ood_scores to outlier.py
* Changed param dicts to dicts
* Added docstring to outlier.py
* Added proper return types
* Fixed mypy typing issues
* Switched outliers -> features; ood -> predictions naming conv
* Switched docstring to stem from fit and score functions
* Changed return of helper functions
* Fixed tutorials notebook to use OutOfDistribution class
* Moved imports to top of file
* Added option for different knn objects, addressed pr comments
* Switched params arg to init only
* Addressed PR comment for notebook, cleared notebook
* Fixed PR comments, wording.
* Testing relative links on build
* Changed ood_pred_probs scores to reflect 0 = most ood 1 = least
* Added MLP for detection outliers with pred_probs
* Fixed typos
* Added MLP Import
* Improved warning when fit call unnecessary
* Changed referenced to params dict in warnings/errors
* Added bagging+MLP classifier into notebook
* Reverted tutorial wording
* OOD tutorial improvements
* cleanup OOD documentation
* adopting->using
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>