File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,8 +338,6 @@ def fit_transform_dynamic(
338338 time_labels , self .time_bin_edges = self .bin_timestamps (
339339 timestamps , bins
340340 )
341- n_comp , n_vocab = self .components_ .shape
342- n_bins = len (self .time_bin_edges ) - 1
343341 if hasattr (self , "components_" ):
344342 doc_topic_matrix = label_binarize (
345343 self .labels_ , classes = self .classes_
@@ -348,7 +346,9 @@ def fit_transform_dynamic(
348346 doc_topic_matrix = self .fit_transform (
349347 raw_documents , embeddings = embeddings
350348 )
351- self .temporal_components = np .zeros (
349+ n_comp , n_vocab = self .components_ .shape
350+ n_bins = len (self .time_bin_edges ) - 1
351+ self .temporal_components_ = np .zeros (
352352 (n_bins , n_comp , n_vocab ), dtype = doc_topic_matrix .dtype
353353 )
354354 self .temporal_importance_ = np .zeros ((n_bins , n_comp ))
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ def fit_transform_dynamic(
182182 document_term_matrix = self .vectorizer .transform (raw_documents )
183183 n_comp , n_vocab = self .components_ .shape
184184 n_bins = len (self .time_bin_edges ) - 1
185- self .temporal_components = np .zeros (
185+ self .temporal_components_ = np .zeros (
186186 (n_bins , n_comp , n_vocab ), dtype = document_term_matrix .dtype
187187 )
188188 self .temporal_importance_ = np .zeros ((n_bins , n_comp ))
Original file line number Diff line number Diff line change @@ -248,7 +248,9 @@ def fit_transform_dynamic(
248248 keywords = self .extract_keywords (
249249 raw_documents , embeddings = embeddings
250250 )
251- time_labels , self .time_bin_edges = bin_timestamps (timestamps , bins )
251+ time_labels , self .time_bin_edges = self .bin_timestamps (
252+ timestamps , bins
253+ )
252254 doc_topic_matrix = self .model .fit_transform_dynamic (
253255 keywords , time_labels , self .time_bin_edges
254256 )
You can’t perform that action at this time.
0 commit comments