I hereby claim:
- I am vene on github.
- I am vladn (https://keybase.io/vladn) on keybase.
- I have a public key ASDuOJyHfNOqEqi3_3T0noSsAbKFt2dTowwoihXfRoguwAo
To claim this, I am signing this object:
import numpy as np | |
from sklearn.metrics import precision_recall_curve, average_precision_score | |
def naive_interpolated_precision(y_true, y_scores): | |
precisions, recalls, _ = precision_recall_curve(y_true, y_scores) | |
interp_precisions = [] | |
# the final point | |
precisions = precisions[:-1] |
DYNET_PATH ?= /home/vlad/code/dynet | |
EIGEN_PATH ?= /home/vlad/code/eigen | |
CC = g++ | |
DEBUG = -g | |
INCLUDES = -I$(DYNET_PATH) -I$(EIGEN_PATH) | |
LIBS = -L$(DYNET_PATH)/build-cuda/dynet/ | |
CFLAGS = -O3 -Wall -Wno-sign-compare -Wno-int-in-bool-context -c -fmessage-length=0 $(INCLUDES) -DEIGEN_FAST_MATH -fPIC -fno-finite-math-only -Wno-missing-braces -std=c++11 -funroll-loops | |
LFLAGS = $(LIBS) -ldynet |
""" Poisson-loss Factorization Machines with Numba | |
Follows the vanilla FM model from: | |
Steffen Rendle (2012): Factorization Machines with libFM. | |
In: ACM Trans. Intell. Syst. Technol., 3(3), May. | |
http://doi.acm.org/10.1145/2168752.2168771 | |
See also: https://github.com/coreylynch/pyFM | |
""" |
from collections import Counter | |
import numpy as np | |
from sklearn.metrics import euclidean_distances | |
from pyemd import emd as pyemd | |
def word_movers_distance(a, b, embeddings): | |
"""Word Mover's Distance. | |
A measure of text similarity: earth mover's distance in embedding metric space. |
import numpy as np | |
from sklearn.datasets import load_iris | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.utils import shuffle | |
# get shuffled iris data | |
X, y = load_iris(return_X_y=True) | |
X, y = shuffle(X, y, random_state=0) |
I hereby claim:
To claim this, I am signing this object:
/*! Socket.IO.js build:0.9.16, development. Copyright(c) 2011 LearnBoost <dev@learnboost.com> MIT Licensed */ | |
/* Modifications by Vlad Niculae <vlad@vene.ro> | |
Available at https://gist.github.com/vene/c0657d854ae74a4511d2 | |
Forked from https://raw.githubusercontent.com/Automattic/socket.io-client/ \ | |
0.9.16/dist/socket.io.js | |
Changes: |