ensign.query_decomp.query_decomp

query_decomp(factors, labels, modes_to_search, query_label)[source]
Compute all components containing the query label in the given mode.

Up to k components are printed where <query label> has a non-zero score.

Parameters
factorslist of lists of ndarrays

Each item in the top-level list should contain the factor matrices of one tensor. Each set of factor matrices is a list of ndarrays.

labelslist of lists of strings

Each item in the top-level list should contain the labels of one tensor. Each set of labels is a list of lists of strings.

modes_to_searchlist of list of ints

Each sublist should contain the mode indices to be searched for the tensor at that index in the outermost list.

query_labelstr

Query label with which to query the decomposition.

Returns
resultlist of pandas DataFrames

DataFrames are in the same order as the input arguments. DataFrames have columns ‘Score’, ‘Mode’, and ‘Component’. Score is the non-zero value of the query-label. Component is the corresponding component in mode Mode.