Skip to content

Commit

Permalink
WIP - Rough scaffolding for feature extractor and classifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewoldag committed Oct 31, 2024
1 parent 5501825 commit 37c3ae2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ classifiers = [
dynamic = ["version"]
requires-python = ">=3.9"
dependencies = [
"resspect",
"scikit_learn",
]

[project.urls]
Expand Down
12 changes: 12 additions & 0 deletions src/laiss_resspect_classifier/laiss_classifier.py
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)
13 changes: 13 additions & 0 deletions src/laiss_resspect_classifier/laiss_feature_extractor.py
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

0 comments on commit 37c3ae2

Please sign in to comment.