Skip to content

Commit 1200f7a

Browse files
committed
export pyflowsom
1 parent e13e1d2 commit 1200f7a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/flowsom/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
from .consensus_cluster import ConsensusCluster # isort:skip
66
from .flowsom_estimator import FlowSOMEstimator # isort:skip
77
from .batch_flowsom_estimator import BatchFlowSOMEstimator # isort:skip
8+
from .pyFlowSOM_som_estimator import PyFlowSOM_SOMEstimator # isort:skip
9+
from .pyflowsom_estimator import PyFlowSOMEstimator # isort:skip

src/flowsom/models/pyFlowSOM_som_estimator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import numpy as np
2-
from pyFlowSOM import map_data_to_nodes, som
32
from sklearn.utils.validation import check_is_fitted
43

54
from . import BaseClusterEstimator
@@ -54,6 +53,8 @@ def fit(
5453
according to importance
5554
:type importance: np.array
5655
"""
56+
from pyFlowSOM import map_data_to_nodes, som
57+
5758
alpha = self.alpha
5859
X = X.astype("double")
5960

@@ -77,7 +78,10 @@ def fit(
7778

7879
def predict(self, X, y=None):
7980
"""Predict labels using the model."""
81+
from pyFlowSOM import map_data_to_nodes
82+
8083
check_is_fitted(self)
84+
8185
X = X.astype("double")
8286
clusters, dists = map_data_to_nodes(self.codes, X)
8387
self.labels_ = clusters.astype(int) - 1

0 commit comments

Comments
 (0)