-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP - Rough scaffolding for feature extractor and classifier.
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from sklearn.ensemble import RandomForestClassifier | ||
|
||
from resspect.classifiers import ResspectClassifier | ||
|
||
class LaissRandomForest(ResspectClassifier): | ||
"""LAISS-specific version of the sklearn RandomForestClassifier.""" | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
self.n_estimators = self.kwargs.pop('n_estimators', 100) | ||
self.classifier = RandomForestClassifier(n_estimators=self.n_estimators, **self.kwargs) |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import numpy as np | ||
|
||
from resspect.feature_extractors import LightCurve | ||
|
||
class LaissFeatureExtractor(LightCurve): | ||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
|
||
def fit(self, band:str = None) -> np.ndarray: | ||
pass | ||
|
||
def fit_all(self) -> np.ndarray: | ||
pass |