GithubHelp home page GithubHelp logo

deprecated-pyannote-algorithms's People

Contributors

hbredin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deprecated-pyannote-algorithms's Issues

not compatible with networkx 2.x module

Description

pyannote-algorithms requires networkx version 1.x Current is 2.x but due to API changes are they not compatible.

Steps/Code to Reproduce

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:

  • clusters = topological_sort(g, nbunch=clusters, reverse=True)
  • clusters = list(reversed(list(topological_sort(g.subgraph(clusters)))))

Expected Results

Actual Results

Versions

pyannote.algorithms==0.7.3
pyannote.core==1.3.1
pyannote.parser==0.7.1
pyannote.video==1.5.1

Error when mapping an empty annotation

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

Error when mapping an empty annotation

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.