Beispiel #1
0
 def get(self, tkr,yrs):
   features0_s = fl.request.args.get('features', 'pct_lag1,slope3,dow')
   features_s = pgdb.check_features(features0_s)
   hl_s       = fl.request.args.get('hl', '2')      # default 2
   neurons_s  = fl.request.args.get('neurons', '4') # default 4
   hl_i       = int(hl_s)
   neurons_i  = int(neurons_s)
   out_df = kerastkr.learn_predict_kerasnn_tkr(tkr, yrs, features_s, hl_i, neurons_i)
   out_d  = get_out_d(out_df)
   return {'predictions': out_d}
Beispiel #2
0
 def get(self, tkr,yrs,features):
   features_s = pgdb.check_features(features)
   out_df = kerastkr.learn_predict_keraslinear_tkr(tkr, yrs, features_s)
   out_d  = get_out_d(out_df)
   return {'predictions': out_d}
Beispiel #3
0
 def get(self, tkr,yrs,yr,features):
   features_s = pgdb.check_features(features)
   out_df = sktkr.learn_predict_sklinear_yr(tkr, yrs, yr, features_s)
   out_d  = get_out_d(out_df)
   return {'predictions': out_d}