mirror of https://github.com/explosion/spaCy.git
* Add comment about zipf reweighting
This commit is contained in:
parent
4d37b66c55
commit
0eec1d12af
|
@ -47,6 +47,9 @@ cdef class Model:
|
|||
@cython.cdivision
|
||||
@cython.boundscheck(False)
|
||||
cdef int regularize(self, Feature* feats, int n, int a=3) except -1:
|
||||
# Use the Zipfian corruptions technique from here:
|
||||
# http://www.aclweb.org/anthology/N13-1077
|
||||
# This seems good for 0.1 - 0.3 % on OOD data.
|
||||
cdef int i
|
||||
cdef long[:] zipfs = numpy.random.zipf(a, n)
|
||||
for i in range(n):
|
||||
|
|
Loading…
Reference in New Issue