Skip to content

Commit

Permalink
Filling in details in the elasticc feature extractor.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewoldag committed Nov 19, 2024
1 parent 53f7504 commit 128605e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
33 changes: 29 additions & 4 deletions src/laiss_resspect_classifier/elasticc2_laiss_feature_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,37 @@
class Elasticc2LaissFeatureExtractor(LaissFeatureExtractor):

other_feature_names = [
#! todo
'hostgal_snsep',
'hostgal_ellipticity',
'hostgal_sqradius',
'hostgal_mag_u',
'hostgal_mag_g',
'hostgal_mag_r',
'hostgal_mag_i',
'hostgal_mag_z',
'hostgal_mag_y',
'hostgal_magerr_u',
'hostgal_magerr_g',
'hostgal_magerr_r',
'hostgal_magerr_i',
'hostgal_magerr_z',
'hostgal_magerr_y',
# 'g-r',
# 'r-i',
'i-z',
# 'z-y',
# 'g-rErr',
# 'r-iErr',
'i-zErr',
# 'z-yErr',
'7DCD',
]

id_column_name = None
label_column_name = None
non_anomaly_classes = [] # i.e. "Normal", "Ia", ...
yet_more_feature_names = []

id_column = "object_id"
label_column = "sntype"
non_anomaly_classes = ["Normal"] # i.e. "Normal", "Ia", ...

def __init__(self, **kwargs):
super().__init__(**kwargs)
Expand Down
2 changes: 2 additions & 0 deletions src/laiss_resspect_classifier/laiss_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ class LaissRandomForest(ResspectClassifier):
def __init__(self, **kwargs):
super().__init__(**kwargs)

# could specify default values for the RandomForestClassifier here

self.n_estimators = self.kwargs.pop('n_estimators', 100)
self.classifier = RandomForestClassifier(n_estimators=self.n_estimators, **self.kwargs)
2 changes: 1 addition & 1 deletion src/laiss_resspect_classifier/laiss_feature_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class LaissFeatureExtractor(LightCurve):
]

id_column = "ztf_object_id"
label_column = "ideal_label" #! Better variable name?
label_column = "ideal_label"
non_anomaly_classes = ["Normal", "AGN"]

def __init__(self, **kwargs):
Expand Down

0 comments on commit 128605e

Please sign in to comment.