Commit 43a60c9
SCML : Sparse Compositional Metric Learning (#278)
* scml first commit
* add scml to __init__.py
* fix in components calculation
* remove triplet generator, added in triplets PR
* change init&fit interface, faster compute & others
* added coments & docstrings, small code changes
* typos and added choice of gamma & output_iter
* some small improvements
* lda tail handling rollback
* performance improvement by precomputing rand_ints
* small fix in components computation
* flake8 fix
* SCML_global fit fix & other small changes
* Proper use of init vars and unsup bases generation
* triplet dataset format & remove_y for triplets
* adaptation with dataset format
* remove labels for triplets and quadruplets
* remove labels
* remove labels & old fit random_state asignation
* compliant with older numpy versions
* small typo and fix order
* fix n_basis check
* initialize_basis_supervised and some refactoring
* proper n_basis handling
* scml specific tests
* remove small mistake
* test user input basis
* Changed names and messages and some refactoring
* triplets in features form passed to _fit
* change indeces handlig and edge case fix
* name change and typos
* improve test_components_is_2D
* Replace triplet_diffs option by better aproach
* some comments, docstring and refactoring
* fix bad triplet set
* flake8 fix
* SCML doc first draft
* find neighbors for every class only once
* improve some docstring and warnings
* add sklearn compat test
* changes to doc
* fix and improve tests
* use components_from_metric
* change TestSCML to object and parametrize tests
* fix test_iris
* use model._authorized_basis and other fixes
* verbose test
* revert sum_where
* small n_basis warning instead of error
* add test iris on triplet_diffs
* test lda & triplet_diffs
* improved messages
* remove quadruplets and triplets from pipeline test
* test big n_features
* Correct output iters
* output_iter on supervised and improved verbose
* flake8 fix
* bases generation test comments
* change big_n_basis_lda error msg
* test generated n_basis and basis shape
* add mini batch optimization
* correct iter convention
* eliminate n_samples = 1000
* batch grad refactored
* adagrad adaptive learning
* int input checks and tests
* flake8 fix
* no double division and smaller triplets arrays
* minor grammar fixes
* minor formatting tweaks
Co-authored-by: CJ Carey <perimosocordiae@gmail.com>1 parent c15f1c3 commit 43a60c9
File tree
10 files changed
+1080
-174
lines changed- doc
- metric_learn
- test
10 files changed
+1080
-174
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
703 | 760 | | |
704 | 761 | | |
705 | 762 | | |
| |||
829 | 886 | | |
830 | 887 | | |
831 | 888 | | |
832 | | - | |
| 889 | + | |
833 | 890 | | |
834 | 891 | | |
835 | 892 | | |
836 | 893 | | |
837 | | - | |
838 | | - | |
| 894 | + | |
| 895 | + | |
839 | 896 | | |
840 | 897 | | |
841 | 898 | | |
| |||
845 | 902 | | |
846 | 903 | | |
847 | 904 | | |
848 | | - | |
849 | | - | |
| 905 | + | |
| 906 | + | |
850 | 907 | | |
851 | 908 | | |
852 | 909 | | |
| |||
858 | 915 | | |
859 | 916 | | |
860 | 917 | | |
861 | | - | |
862 | | - | |
863 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
864 | 921 | | |
865 | 922 | | |
866 | 923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| 20 | + | |
0 commit comments