Skip to content

Commit

Permalink
优化pca降维的参数
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhenbin-genomics-cn committed Mar 29, 2024
1 parent 7e0e532 commit 0e56f46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stereo/algorithm/time_series_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def gene_spatial_feature(self, w_size=20):
X = normalization.normalize_total(X, target_sum=1e4)
X = np.log1p(X)
X = scale.scale(X, zero_center=True, max_value=None)
X_pca = dim_reduce.pca(X, 50)['x_pca']
X_pca = dim_reduce.pca(X, min(50 , X.shape[1] -1))['x_pca']

self.stereo_exp_data.tl.result['spatial_feature'] = X_pca
self.stereo_exp_data.genes_matrix['spatial_feature'] = X_pca
Expand Down

0 comments on commit 0e56f46

Please sign in to comment.