File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
fink_science/ztf/anomaly_detection Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ def anomaly_score(lc_features, model=None):
129129 --------
130130 >>> from fink_utils.spark.utils import concat_col
131131 >>> from pyspark.sql import functions as F
132+ >>> from pyspark.sql.functions import isnan, col
132133 >>> from fink_science.ztf.ad_features.processor import extract_features_ad
133134
134135 >>> df = spark.read.load(ztf_alert_sample)
@@ -148,9 +149,9 @@ def anomaly_score(lc_features, model=None):
148149 ... df = df.withColumn(f'anomaly_score{model}', anomaly_score("lc_features", F.lit(model)))
149150
150151 >>> df.filter(df["anomaly_score"] < -0.013).count()
151- 282
152+ 320
152153
153- >>> df.filter(df[ "anomaly_score"] == 0 ).count() < 200
154+ >>> df.filter(isnan(col( "anomaly_score")) ).count() < 200
154155 True
155156
156157 # Check the robustness of the code when i-band is present
You can’t perform that action at this time.
0 commit comments