Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG+1] Threshold for pairs learners (#168)
* add some tests for testing that different scores work using the scoring function * ENH: Add tests and basic threshold implementation * Add support for LSML and more generally quadruplets * Make CalibratedClassifierCV work (for preprocessor case) thanks to classes_ * Fix some tests and PEP8 errors * change the sign in decision function * Add docstring for threshold_ and classes_ in the base _PairsClassifier class * remove quadruplets from the test with scikit learn custom scorings * Remove argument y in quadruplets learners and lsml * FIX fix docstrings of decision functions * FIX the threshold by taking the opposite (to be adapted to the decision function) * Fix tests to have no y for quadruplets' estimator fit * Remove isin to be compatible with old numpy versions * Fix threshold so that it has a positive value and add small test * Fix threshold for itml * FEAT: Add calibrate_threshold and tests * MAINT: remove starred syntax for compatibility with older versions of python * Remove debugging prints and make tests for ITML pass, while waiting for #175 to be solved * FIX: from __future__ import division to pass tests for python 2.7 * Add some documentation for calibration * DOC: fix style * Address most comments from aurelien's reviews * Remove classes_ attribute and test for CalibratedClassifierCV * Rename make_args_inc_quadruplets into remove_y_quadruplets * TST: Fix remaining threshold into min_rate * Remove default_threshold and put calibrate_threshold instead * Use calibrate_threshold for ITML, and remove description * ENH: use calibrate_threshold by default and display its parameters from the fit method * Add a small test to test automatic calibration * Update documentation of the default threshold * Inverse sense for threshold comparison to be more intuitive * Address remaining review comments * MAINT: Rename threshold_params into calibration_params * TST: Add test for extreme cases * MAINT: rename threshold_params into calibration_params * MAINT: rename threshold_params into calibration_params * FIX: Make tests work, and add the right threshold (mean between lowest accepted value and highest rejected value), and max + 1 or min - 1 for extreme points * Go back to previous version of finding the threshold * Extract method for validating calibration parameters * Validate calibration params before fit * Address #168 (comment)
- Loading branch information