Name Last Update Last Commit     85e3e7c918f – update model history
File_dir Data Loading commit data... Ajax_loader_tree
File_dir graphics Loading commit data... Ajax_loader_tree
File_dir src Loading commit data... Ajax_loader_tree
File_txt .gitignore Loading commit data... Ajax_loader_tree
File_txt LICENSE Loading commit data... Ajax_loader_tree
File_txt README.md Loading commit data... Ajax_loader_tree
README.md

C2LM

Source Code of paper Metric Learning as Convex Combinations of Local Models with Generalization Guarantees.

Implemented in Python 3.

Dependencies

Learning scripts

To learn local Mahalanobis distances on color patches, run

python src/color_lg_metric_learning.py

or for help

python src/color_lg_metric_learning.py -h

To learn c2lm Mahalanobis on color patches, run

python src/color_c2lm_learning.py

or for help

python src/color_c2lm_learning.py -h

To learn local bilinear similarities on a word embedding, run

python src/word_lg_metric_learning.py

or for help

python src/word_lg_metric_learning.py -h

To learn c2lm bilinear forms on a word embedding, run

python src/word_c2lm_learning.py

or for help

python src/word_c2lm_learning.py -h

Graphics API for Color Distance Visualization

To visualize a comparison of theoretical bounds, run

cd graphics/bounds/
python bound_script.py 

To visualize the level sets of a point in a plane of space, run

cd graphics/contours/
python pic_generator.py

To visualize the found influences of clusters w.r.t. a selected pair of regions in the RGB space, run

cd graphics/clusters/
python view_clusters.py

and click on the centroids.

Usefull Links

If you'd rather use another word embedding than the one provided in Data/hpca/, check out http://github.com/rlebret/hpca or http://deeplearning4j.org/word2vec