From 6a282e69fd55f8c725d09ea354bf515c1415fa08 Mon Sep 17 00:00:00 2001 From: Narges Rezaie Date: Tue, 13 Aug 2024 16:30:29 -0700 Subject: [PATCH] Update train.py --- Topyfic/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Topyfic/train.py b/Topyfic/train.py index 9f92be0..b90d413 100644 --- a/Topyfic/train.py +++ b/Topyfic/train.py @@ -61,7 +61,7 @@ def combine_LDA_models(self, data, single_trains=[]): """ for i in range(len(single_trains)): gene_weights = pd.DataFrame(np.transpose(single_trains[i].top_models[0].model.components_), - columns=[f'Topic{i + 1}_R{self.random_state_range[i]}' for i in range(self.k)], + columns=[f'Topic{j + 1}_R{self.random_state_range[i]}' for j in range(self.k)], index=data.var.index.tolist()) TopModel_lda_model = TopModel(name=f"{self.name}_{self.random_state_range[i]}", N=gene_weights.shape[1],