INNER CODE UNIT · Python

aib

lzz19980125/awesome-time-series-segmentation-papers · DASSA-master/dassa.py:14

def aib(data_dir, MinW, N_mdl, CalcMode, _dir, matlab_path):
    matlab_function = "AIB('" + _dir + "', '" + data_dir + "', '" + str(MinW) + "', '" + str(N_mdl) + "', '" + \
                      str(CalcMode) + "')"
    subprocess.call([matlab_path, "-nosplash", "-nodisplay", "-r", matlab_function])


def toposort(graph):
    print('toposort...')
    """http://code.activestate.com/recipes/578272-topological-sort/

    Dependencies are expressed as a dictionary whose keys are items
and whose values are a set of dependent items. Output is a list of
sets in topological order. The first set consists of items with no
dependences, each subsequent set consists of items that depend upon
items in the preceeding sets.

>>> print '\\n'.join(repr(sorted(x)) for x in toposort2({
...     2: set([11]),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…