@@ -34,11 +34,11 @@ def initHook(settings, file_list, **kwargs):
34
34
settings .pool_size = sys .maxint
35
35
#Use a time seires of the past as feature.
36
36
#Dense_vector's expression form is [float,float,...,float]
37
- settings .slots = [dense_vector (TERM_NUM )]
37
+ settings .input_types = [dense_vector (TERM_NUM )]
38
38
#There are next FORECASTING_NUM fragments you need predict.
39
39
#Every predicted condition at time point has four states.
40
40
for i in range (FORECASTING_NUM ):
41
- settings .slots .append (integer_value (LABEL_VALUE_NUM ))
41
+ settings .input_types .append (integer_value (LABEL_VALUE_NUM ))
42
42
43
43
44
44
@provider (
@@ -57,7 +57,7 @@ def process(settings, file_name):
57
57
pre_spd = map (float , speeds [i - TERM_NUM :i ])
58
58
59
59
# Integer value need predicting, values start from 0, so every one minus 1.
60
- fol_spd = [i - 1 for i in speeds [i :i + FORECASTING_NUM ]]
60
+ fol_spd = [j - 1 for j in speeds [i :i + FORECASTING_NUM ]]
61
61
62
62
# Predicting label is missing, abandon the sample.
63
63
if - 1 in fol_spd :
@@ -67,7 +67,7 @@ def process(settings, file_name):
67
67
68
68
def predict_initHook (settings , file_list , ** kwargs ):
69
69
settings .pool_size = sys .maxint
70
- settings .slots = [dense_vector (TERM_NUM )]
70
+ settings .input_types = [dense_vector (TERM_NUM )]
71
71
72
72
73
73
@provider (init_hook = predict_initHook , should_shuffle = False )
0 commit comments