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
#include <iostream> | |
#include <random> | |
#include <chrono> | |
#include <x86intrin.h> | |
#include <cassert> | |
// Runtime evaluation for squared Eucliden distance functions | |
// - fvec_L2_sqr_ref: naive reference impl from Faiss | |
// - fvec_L2_sqr_sse: SSE impl from Faiss | |
// - fvec_L2_sqr_avx: AVX impl from Faiss |
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
{"lastUpload":"2020-04-29T08:23:10.533Z","extensionVersion":"v3.4.3"} |
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
""" | |
Implementation of 'Maximum Likelihood Estimation of Intrinsic Dimension' by Elizaveta Levina and Peter J. Bickel | |
how to use | |
---------- | |
The goal is to estimate intrinsic dimensionality of data, the estimation of dimensionality is scale dependent | |
(depending on how much you zoom into the data distribution you can find different dimesionality), so they | |
propose to average it over different scales, the interval of the scales [k1, k2] are the only parameters of the algorithm. |
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
import time | |
import argparse | |
import faiss | |
import numpy as np | |
from utils import load_vecs, save_vecs | |
parser = argparse.ArgumentParser(description="Build KNN Graph using GPU") | |
parser.add_argument('dataset', type=str, help='Dataset') | |
parser.add_argument('k', type=int, nargs='+', help='K') |
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
sudo find /etc/apt/sources.list.d/ -type f -name "*.list" -exec sed -i.bak -r 's#deb(-src)?\s*http(s)?://ppa.launchpad.net#deb\1 http\2://launchpad.proxy.ustclug.org#ig' {} \; |