-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added 10 new classifiers and regressors - Updated Documentation Signed-off-by: Arsh <[email protected]>
- Loading branch information
1 parent
17d4e44
commit cc00315
Showing
7 changed files
with
314 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,79 @@ | ||
from anai.utils.wrappers.classification_shell import ClassificationWrapper | ||
from sklearn.linear_model import (PoissonRegressor, GammaRegressor, LassoLarsIC, | ||
LassoLarsCV) | ||
from sklearn.linear_model import (GammaRegressor, LassoLarsCV, LassoLarsIC, | ||
OrthogonalMatchingPursuit, | ||
OrthogonalMatchingPursuitCV, | ||
PoissonRegressor, QuantileRegressor, | ||
RANSACRegressor, TheilSenRegressor, | ||
TweedieRegressor) | ||
|
||
|
||
class PoissonClassifier(ClassificationWrapper): | ||
def __init__(self,num_classes=2, **params): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = PoissonRegressor(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class GammaClassifier(ClassificationWrapper): | ||
def __init__(self,num_classes=2, **params): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = GammaRegressor(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class LassoLarsICClassifier(ClassificationWrapper): | ||
def __init__(self,num_classes=2, **params): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = LassoLarsIC(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class LassoLarsCVClassifier(ClassificationWrapper): | ||
def __init__(self,num_classes=2, **params): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = LassoLarsCV(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class TweedieClassifier(ClassificationWrapper): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = TweedieRegressor(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
# class GeneralizedLinearClassifier(ClassificationWrapper): | ||
# def __init__(self,num_classes=2, **params): | ||
# self.model = GeneralizedLinearRegressor(**params) | ||
# self.num_classes = num_classes - 1 | ||
|
||
|
||
class RANSACClassifier(ClassificationWrapper): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = RANSACRegressor(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class OrthogonalMatchingPursuitCVClassifier(ClassificationWrapper): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = OrthogonalMatchingPursuitCV(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class OrthogonalMatchingPursuitClassifier(ClassificationWrapper): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = OrthogonalMatchingPursuit(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
# class AFMClassifier(ClassificationWrapper): | ||
# def __init__(self,num_classes=2, **params): | ||
# self.model = ComponentwiseGradientBoostingSurvivalAnalysis(**params) | ||
# self.num_classes = num_classes - 1 | ||
|
||
|
||
class QuantileClassifier(ClassificationWrapper): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = QuantileRegressor(**params) | ||
self.num_classes = num_classes - 1 | ||
|
||
|
||
class TheilSenClassifier(ClassificationWrapper): | ||
def __init__(self, num_classes=2, **params): | ||
self.model = TheilSenRegressor(**params) | ||
self.num_classes = num_classes - 1 |
Oops, something went wrong.