@@ -25,7 +25,7 @@ def initialize_components(number_of_components, number_of_signals, grid_vector):
2525 raise ValueError (f"Number of components = { number_of_components } . Number_of_components must be >= 1." )
2626 components = list ()
2727 for component in range (number_of_components ):
28- component = ComponentSignal (grid_vector ,number_of_signals ,component )
28+ component = ComponentSignal (grid_vector , number_of_signals , component )
2929 components .append (component )
3030 return tuple (components )
3131
@@ -54,6 +54,27 @@ def lift_data(data_input, lift=1):
5454 return data_input + np .abs (np .min (data_input ) * lift )
5555
5656
57+ def construct_stretching_matrix (components , number_of_components , number_of_signals ):
58+ """Constructs the stretching factor matrix
59+
60+ Parameters
61+ ----------
62+ components: tuple of ComponentSignal objects
63+ The tuple containing the component signals in ComponentSignal objects.
64+ number_of_components: int
65+ The number of component signals in the NMF decomposition
66+ number_of_signals: int
67+ The number of signals in the data provided by the user.
68+
69+ Returns
70+ -------
71+ 2d array
72+ The matrix containing the stretching factors for the component signals for each of the signals in the raw data.
73+ Has dimensions `component_signal` x `number_of_signals`
74+
75+ """
76+
77+
5778def initialize_arrays (number_of_components , number_of_moments , signal_length ):
5879 """Generates the initial guesses for the weight, stretching, and component matrices
5980
0 commit comments