-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstep04_time_series_features.py
43 lines (36 loc) · 1.66 KB
/
step04_time_series_features.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from features.f3xx_tsfresh import *
from features.f40x_astropy import *
import common
import config
debug = config.TRAINING_ONLY
output = config.FEATURE_SAVE_DIR
cv_only = config.TRAINING_ONLY
meta = common.load_metadata()
lc = common.load_lightcurve()
pb = common.load_passband_metadata()
input = Input(meta, pb, lc)
f400_lombscargle(input=input, debug=debug, target_dir=output)
del lc['detected']
del lc['flux_err']
lc['passband'] = lc['passband'].astype(np.uint8)
gc.collect()
lc['id_passband'] = lc['object_id'] * 10 + lc['passband']
input = Input(meta, pb, lc)
f300_num_peaks(input=input, debug=debug, target_dir=output)
f301_quantile2(input=input, debug=debug, target_dir=output)
f302_quantile8(input=input, debug=debug, target_dir=output)
f303_c3(input=input, debug=debug, target_dir=output)
f304_autocorr1(input=input, debug=debug, target_dir=output)
f305_autocorr2(input=input, debug=debug, target_dir=output)
f306_autocorr3(input=input, debug=debug, target_dir=output)
f307_autocorr4(input=input, debug=debug, target_dir=output)
f308_autocorr5(input=input, debug=debug, target_dir=output)
f309_autocorr_mean(input=input, debug=debug, target_dir=output)
f310_autocorr_median(input=input, debug=debug, target_dir=output)
f311_autocorr_var(input=input, debug=debug, target_dir=output)
f321_partial_autocorr_lag10(input=input, debug=debug, target_dir=output)
f330_number_cwt_peaks(input=input, debug=debug, target_dir=output)
f340_number_crossing_m(input=input, debug=debug, target_dir=output)
f350_linear_trend(input=input, debug=debug, target_dir=output)
f361_fft_coefficient(input=input, debug=debug, target_dir=output)
f370_fft_aggregated(input=input, debug=debug, target_dir=output)