Skip to content

Commit

Permalink
Rename optimize_core in Louvain
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonald committed Mar 20, 2024
1 parent aa0995d commit 86e58a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sknetwork/clustering/louvain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from scipy import sparse

from sknetwork.clustering.base import BaseClustering
from sknetwork.clustering.louvain_core import fit_core
from sknetwork.clustering.louvain_core import optimize_core
from sknetwork.clustering.postprocess import reindex_labels
from sknetwork.utils.check import check_random_state, get_probs
from sknetwork.utils.format import check_format, get_adjacency, directed2undirected
Expand Down Expand Up @@ -138,7 +138,7 @@ def _optimize(self, adjacency, probs_out, probs_in):
indices: np.ndarray = adjacency_.indices
data: np.ndarray = adjacency_.data.astype(np.float32)

return fit_core(self.resolution, self.tol, probs_out_, probs_in_, self_loops, data, indices, indptr)
return optimize_core(self.resolution, self.tol, probs_out_, probs_in_, self_loops, data, indices, indptr)

@staticmethod
def _aggregate(adjacency, probs_out, probs_in, membership):
Expand Down
2 changes: 1 addition & 1 deletion sknetwork/clustering/louvain_core.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ctypedef fused int_or_long:

@cython.boundscheck(False)
@cython.wraparound(False)
def fit_core(float resolution, float tol, float[:] ou_node_probs, float[:] in_node_probs, float[:] self_loops,
def optimize_core(float resolution, float tol, float[:] ou_node_probs, float[:] in_node_probs, float[:] self_loops,
float[:] data, int_or_long[:] indices, int_or_long[:] indptr): # pragma: no cover
"""Fit the clusters to the objective function.
Expand Down

0 comments on commit 86e58a2

Please sign in to comment.