pyannote / deprecated-pyannote-algorithms Goto Github PK
View Code? Open in Web Editor NEW[deprecated] Various algorithms used all over pyannote ecosystem
License: MIT License
[deprecated] Various algorithms used all over pyannote ecosystem
License: MIT License
pyannote-algorithms requires networkx version 1.x Current is 2.x but due to API changes are they not compatible.
pip list
to show the networkx version
To make it compatible with the networkx 2.x API I suggest the following changes to pyannote-algorithms/pyannote/algorithms/clustering/hac/history.py:
pyannote.algorithms==0.7.3
pyannote.core==1.3.1
pyannote.parser==0.7.1
pyannote.video==1.5.1
from pyannote.algorithms.tagging.mapping import HungarianMapper
from pyannote.core import Annotation, Segment
mapper = HungarianMapper()
r = Annotation(); r[Segment(0, 10)] = 'A'
h = Annotation();
mapper(r, h)
ValueError Traceback (most recent call last)
in ()
----> 1 mapper(r, h)
/people/poignant/.virtualenv/img_proc/lib/python2.7/site-packages/pyannote/algorithms/tagging/mapping.pyc in call(self, A, B)
94 N = max(nCols, nRows)
95 C = np.zeros((N, N))
---> 96 C[:nCols, :nRows] = (np.max(matrix.df.values) - matrix.df.values).T
97
98 mapping = {}
/people/poignant/.virtualenv/img_proc/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in amax(a, axis, out, keepdims)
2138 else:
2139 return _methods._amax(a, axis=axis,
-> 2140 out=out, keepdims=keepdims)
2141
2142 def amin(a, axis=None, out=None, keepdims=False):
/people/poignant/.virtualenv/img_proc/lib/python2.7/site-packages/numpy/core/_methods.pyc in _amax(a, axis, out, keepdims)
24 # small reductions
25 def _amax(a, axis=None, out=None, keepdims=False):
---> 26 return umr_maximum(a, axis, None, out, keepdims)
27
28 def _amin(a, axis=None, out=None, keepdims=False):
ValueError: zero-size array to reduction operation maximum which has no identity
from pyannote.algorithms.tagging.mapping import HungarianMapper
from pyannote.core import Annotation, Segment
mapper = HungarianMapper()
r = Annotation(); r[Segment(0, 10)] = 'A'
h = Annotation();
mapper(r, h)
ValueError Traceback (most recent call last)
in ()
----> 1 mapper(r, h)
/people/poignant/.virtualenv/img_proc/lib/python2.7/site-packages/pyannote/algorithms/tagging/mapping.pyc in call(self, A, B)
94 N = max(nCols, nRows)
95 C = np.zeros((N, N))
---> 96 C[:nCols, :nRows] = (np.max(matrix.df.values) - matrix.df.values).T
97
98 mapping = {}
/people/poignant/.virtualenv/img_proc/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in amax(a, axis, out, keepdims)
2138 else:
2139 return _methods._amax(a, axis=axis,
-> 2140 out=out, keepdims=keepdims)
2141
2142 def amin(a, axis=None, out=None, keepdims=False):
/people/poignant/.virtualenv/img_proc/lib/python2.7/site-packages/numpy/core/_methods.pyc in _amax(a, axis, out, keepdims)
24 # small reductions
25 def _amax(a, axis=None, out=None, keepdims=False):
---> 26 return umr_maximum(a, axis, None, out, keepdims)
27
28 def _amin(a, axis=None, out=None, keepdims=False):
ValueError: zero-size array to reduction operation maximum which has no identity
Store internal .similarity
matrix in a ValueSortedDict
This should make the call to .argmax
much faster...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.