-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interpretable detector and deep kernels detector (#306)
* Refactor pt GaussianRBF and introduce DeepKernel * NME functionality Docstrings etc to follow. * Fix tensorflow implementation * Update GaussianRBF and DeepKernel to init sigma correctly * Typo * Minor refactor to nme implementations * Minor correction * Fix kernels to remain compatible with other uses * Upload temp nme example scripts * Add todo for kernel initialisation * Allow model to continue training across test batches * Remove nme stuff * Minor bug fix * Allow ClassifierDrift to return model * Minor bug fix * Update trainer and ClfDrift to print ma and allow reg term * Implementation of a spot-the-diff drift detector * Remove temp NME scripts * Remove all references of compile_kwargs * Remove exponentiation of clf coefficients * Allow initialisation of diffs to be specified * Batch computation of kernel matrices * Fix batchwise kernel mat computation * Further fixes to batch comp of kernel matrices * Implementation of learnt kernel detector * Update ClfDrift.predict() docstring * Update STDDetector to handle lists. Also docstrings * retrain_from_scratch arg bux fix * Change clf example nb to gen learned nb * Add reg_loss_fn to trainer docstring * Some type hints * Remove dead line * Sub n=len(x) for readability * Transfer x_cur, x_ref to device after preprocess_fn * Simmilarity -> similarity in about 100 places * Update type hint to Union[np.ndarray, list] * Make clear in STDDrift docstring diff is featurewise * Remove the #TODO about GRBF init * Learnt -> learned everywhere * Minor bug fix * Indentation bug fix * Update STDDetector to handle List[Any]' * Spot-the-diff drift example notebook * Minor changes to clf/lk example notebook * Bug fix around dead kwargs * Add kwargs to STDDetector meta dict * Bug fix around meta * Tests for STDDetector and LKDetector * Type hints * Init optimizer inside trainer * STDDiff notebook typos * Docs method notebook for learned kernel detectror * Docs methods notebook for spot-the-diff detector * Some renaming and resourcing * Credit Jitkrittum * Correct typo * Nblink for stddrift example notebook * For GaussianRBF cast second input to dtype of first * Kernel tests * Deep kernel docstrings * Fix batched kernel matrix and test it * Update how batch_compute_kernel_matrix is used * Sort STD notebooks and Jitkrittum credit * Fix typos * Catch some edge cases when using multiple folds * Doc stuff * Minor changes to docs * n_folds bug fix * Coffs -> coeffs * Satisfy mypy * Satisfy flake8 * update to .gitignore * Minor typos * Ignore future annotations! * More future annotations stuff * Another go at future annotations * Remove future annotations
- Loading branch information
Showing
41 changed files
with
3,839 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,3 +115,6 @@ venv.bak/ | |
# mypy | ||
.mypy_cache/ | ||
|
||
# temp scripts for debugging | ||
examples/temp_* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.