Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Append 'Base' to Classification{Decider, ProgressiveLearner} class names #191

Merged
merged 3 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions proglearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def is_fitted(self):
pass


class ClassificationDecider(BaseDecider):
class BaseClassificationDecider(BaseDecider):
"""
A class for a decider which inherits from the base decider
but adds the functionality of estimating posteriors.
Expand Down Expand Up @@ -219,7 +219,7 @@ def predict(self, X, task_id):
pass


class ClassificationProgressiveLearner(BaseProgressiveLearner):
class BaseClassificationProgressiveLearner(BaseProgressiveLearner):
"""
A class for a progressive learner which inherits from the base progressive learner
but adds the functionality of estimating posteriors for a given task_id.
Expand Down
4 changes: 2 additions & 2 deletions proglearn/deciders.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'''
import numpy as np

from .base import ClassificationDecider
from .base import BaseClassificationDecider

from sklearn.neighbors import KNeighborsRegressor
from sklearn.linear_model import Ridge
Expand All @@ -18,7 +18,7 @@
from sklearn.utils.multiclass import type_of_target


class SimpleArgmaxAverage(ClassificationDecider):
class SimpleArgmaxAverage(BaseClassificationDecider):
"""
Doc string here.
"""
Expand Down
6 changes: 3 additions & 3 deletions proglearn/progressive_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Corresponding Email: levinewill@icloud.com
'''
import numpy as np
from .base import ClassificationDecider, ClassificationProgressiveLearner
from .base import BaseClassificationDecider, BaseClassificationProgressiveLearner

class ProgressiveLearner(ClassificationProgressiveLearner):
class ProgressiveLearner(BaseClassificationProgressiveLearner):
"""
A class for progressive learning in the classification setting.

Expand Down Expand Up @@ -667,7 +667,7 @@ def predict(self, X, task_id, transformer_ids=None):

def predict_proba(self, X, task_id, transformer_ids=None):
decider = self.task_id_to_decider[task_id]
if isinstance(decider, ClassificationDecider):
if isinstance(decider, BaseClassificationDecider):
return self.task_id_to_decider[task_id].predict_proba(
X, transformer_ids=transformer_ids
)
Expand Down