Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merge branch 'ilof-pietro' of https://github.com/pietro-tanure/river into ilof-pietro * Update ilof_notebook.ipynb * Modify name IncrementalLOF in __init__ file of anomaly module * Refactor code after precommit run * Remove window_score in score_one function of Incremental LOF (since score_one already assumes that one sample is taken into account at a certain time point). * Remove learn_many and refactor Docstring test * Remove import pandas since unused. * �Refactor * Change output of `score_one` to only return one single number, not list (to comply with the implementation of other incremental anomaly detection algorithms) * Refactor Docstring test * Refactor from IncrementalLOF to LocalOutlierFactor * Refactor * Refactor X_batch to x_batch to align with PEP8. * Verbose re-wording. * Refactor X_score to x_scores * Remove type of returned output in DocString * Make check_equal static method and refactor related variable names according to PEP8 * Refactor capital X variable to x_list to represent the stored list of observations. * Refactor code with black * Remove description for unnecessary variables. * Re-wording for variable description. * Refactor. * Add learn_many to learn multiple instances at a time and update Docstring test to take into account the newly implemented function. * Remove description of unnecessary variables. * Spelling correction. * Modify variable names by removing capital letters to align with PEP8. * Refactor calc_local_reach_dist and cal_lof and change these functions to static methods. * Change expand_objects to static method * Refactor. * Change define_sets to static method. * Change calc_reach_dist_newpoints to static method. * Change calc_reach_dist_otherpoints to static method and refactor. * Refactor. * Refactor calc_reach_dist_new_points * Refactor calc_reach_dist_other_points. * Remove import * Refactor and add description in docstring regarding expected performance of ILOF. * Refactor. * Remove one unnecessary variable of calc_reach_dist_other_points. * Modify docstring description of the algorithm * Add comments to justify the returning results of score_one function. * Add tests for the newly implemented iLOF algorithm. * Remove iLOF notebook (since the content has been covered by the test file within the same module). --------- Co-authored-by: Hoang-Anh Ngo <[email protected]>
- Loading branch information