Skip to content

Instantly share code, notes, and snippets.

View vene's full-sized avatar
🏴
ahoy

Vlad Niculae vene

🏴
ahoy
View GitHub Profile
@vene
vene / keybase.md
Last active February 12, 2019 19:25

Keybase proof

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:

@vene
vene / siegel.py
Last active August 29, 2015 14:09
# Author: Vlad Niculae <vlad@vene.ro>
# License: 2-clause BSD
"""2D implementation of the robust Siegel Repeated Median slope estimator
This estimator tolerates corruption of up to 50% of the input points in either
the X or the Y dimension.
Vectorized implementation, and a naive implementation for sanity-check.
"""
@vene
vene / socket.io.js
Last active March 8, 2019 09:27
socketio-client 0.9.16 fork
/*! 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:
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.
""" 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
"""
# -*- coding: utf8 -*-
"""Convex factorization machines
Implements the solver by: Mathieu Blondel, Akinori Fujino, Naonori Ueda.
"Convex factorization machines". Proc. of ECML-PKDD 2015
http://www.mblondel.org/publications/mblondel-ecmlpkdd2015.pdf
"""
# Author: Vlad Niculae <vlad@vene.ro>
# License: Simplified BSD
@vene
vene / lrbilinear.py
Last active May 30, 2016 18:11
low-rank bilinear regression using theano
# low-rank bilinear regression using theano (supports sparse inputs)
# predicts f(x_left, x_right) = x_left' UV' x_right
# Reference:
# Generalised Bilinear Regression
# K. Ruben Gabriel
# Source: Biometrika, Vol. 85, No. 3 (Sep., 1998), pp. 689-700
# Stable URL: http://www.jstor.org/stable/2337396
# Author: Vlad Niculae <vlad@vene.ro>
@vene
vene / coordinate_descent.ipynb
Created June 30, 2016 15:27
simple cd solver for l2-regularized linear models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vene
vene / sparsemax_loss_theano.ipynb
Created July 8, 2016 20:53
sparsemax loss for Theano
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vene
vene / AttentiveGRU.ipynb
Last active July 21, 2016 00:42
Attentive GRU for classification of text dyads
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.