INNER CODE UNIT · Python

xs

ShixiangWang/sigminer · inst/py/nmf.py:71

  xs = range(1, len(V_tuple) * nrun + 1)
  v = list()
  with multiprocess.Pool(processes=cores) as p:
    v.append(
      p.starmap(
        NMF3, 
        zip(
          xs,
          list(itertools.chain.from_iterable(itertools.repeat(i, nrun) for i in V_tuple)),
          repeat(rank)
          )))
    
  return v
  
# if __name__ == "__main__":
#   V = np.array([[1, 2, 3], [4, 5, 6], [6, 7, 8]])
#   MultiNMF(V, 2, 2, 2)
#   V1 = np.array([[1, 2, 3], [4, 5, 6], [6, 7, 8]])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…