diff --git a/.gitignore b/.gitignore index 0e59b03..afa1394 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/* dist/* spectralcluster.egg-info/* .coverage +.DS_Store diff --git a/README.md b/README.md index ab21392..70a2a82 100644 --- a/README.md +++ b/README.md @@ -91,13 +91,14 @@ You can specify your refinment operations like this: ``` from spectralcluster import RefinementOptions +from spectralcluster import ThresholdType from spectralcluster import ICASSP2018_REFINEMENT_SEQUENCE refinement_options = RefinementOptions( gaussian_blur_sigma=1, p_percentile=0.95, thresholding_soft_multiplier=0.01, - thresholding_with_row_max=True, + thresholding_type=ThresholdType.RowMax, refinement_sequence=ICASSP2018_REFINEMENT_SEQUENCE) ``` @@ -116,8 +117,8 @@ In the new version of this library, we support different types of Laplacian matr * None Laplacian (affinity matrix): `W` * Unnormalized Laplacian: `L = D - W` -* Graph cut Laplacian: `L' = D^{-1/2} L D^{-1/2}` -* Random walk Laplacian: `L' = D^{-1} L` +* Graph cut Laplacian: `L' = D^{-1/2} * L * D^{-1/2}` +* Random walk Laplacian: `L' = D^{-1} * L` You can specify the Laplacian matrix type with the `laplacian_type` argument of the `SpectralClusterer` class. diff --git a/docs/configs.html b/docs/configs.html index a1ac4ec..9baf2bd 100644 --- a/docs/configs.html +++ b/docs/configs.html @@ -34,6 +34,8 @@
spectralcluster.configs
spectralcluster.configs
spectralcluster
spectralcluster.refinement
spectralcluster.refinement
spectralcluster.refinement
spectralcluster.refinement
spectralcluster.refinement
spectralcluster.refinement
spectralcluster.refinement
spectralcluster.refinement
class RefinementOptions
-(gaussian_blur_sigma=1, p_percentile=0.95, thresholding_soft_multiplier=0.01, thresholding_with_row_max=True, thresholding_with_binarization=False, thresholding_preserve_diagonal=False, symmetrize_type=SymmetrizeType.Max, refinement_sequence=None)
+(gaussian_blur_sigma=1, p_percentile=0.95, thresholding_soft_multiplier=0.01, thresholding_type=ThresholdType.RowMax, thresholding_with_binarization=False, thresholding_preserve_diagonal=False, symmetrize_type=SymmetrizeType.Max, refinement_sequence=None)
Refinement options for the affinity matrix.
@@ -586,9 +598,8 @@thresholding_soft_multiplier
thresholding_with_row_max
thresholding_type
thresholding_with_binarization
class RowWiseThreshold
-(p_percentile=0.95, thresholding_soft_multiplier=0.01, thresholding_with_row_max=False, thresholding_with_binarization=False, thresholding_preserve_diagonal=False)
+(p_percentile=0.95, thresholding_soft_multiplier=0.01, thresholding_type=ThresholdType.RowMax, thresholding_with_binarization=False, thresholding_preserve_diagonal=False)
Apply row wise thresholding.
+class ThresholdType
+(value, names=None, *, module=None, qualname=None, type=None, start=1)
+
Different types of thresholding.
class ThresholdType(enum.Enum):
+ """Different types of thresholding."""
+ # We clear values that are smaller than row_max*p_percentile
+ RowMax = 1
+
+ # We clear (p_percentile*100)% smallest values of the entire row
+ Percentile = 2
+var Percentile
var RowMax
Max
+ThresholdType
Percentile
RowMax