Skip to content

Commit

Permalink
change the default membership decay to linear
Browse files Browse the repository at this point in the history
  • Loading branch information
balins committed Aug 30, 2024
1 parent 89cc9bc commit c73e6e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fsvm/_fuzzy_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FuzzySVC(ClassifierMixin, BaseEstimator):
median, which minimizes the sum of L1 distances.
membership_decay : {'exponential', 'linear'} or callable, \
default='exponential'
default='linear'
Method to compute the decay function for membership as in [1]_.
If a callable is passed, it should take the output of `distance_metric`
method and return the final membership degree in the interval [0, 1].
Expand Down Expand Up @@ -229,7 +229,7 @@ class FuzzySVC(ClassifierMixin, BaseEstimator):
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])
"""

Expand All @@ -253,7 +253,7 @@ def __init__(
*,
distance_metric="centroid",
centroid_metric="euclidean",
membership_decay="exponential",
membership_decay="linear",
beta=0.1,
balanced=True,
C=1.0,
Expand Down
2 changes: 1 addition & 1 deletion fsvm/tests/test_fuzzy_svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_smoke_test(data):

# Check the default values
assert clf.distance_metric == "centroid"
assert clf.membership_decay == "exponential"
assert clf.membership_decay == "linear"
assert clf.beta == 0.1
assert clf.balanced is True

Expand Down

0 comments on commit c73e6e7

Please sign in to comment.