@@ -0,0 +1,2848 @@
+package roart.service;%0A%0Aimport java.time.LocalDate;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport roart.common.config.ConfigConstants;%0Aimport roart.common.ml.TensorflowLSTMConfig;%0Aimport roart.common.pipeline.PipelineConstants;%0Aimport roart.common.util.TimeUtil;%0Aimport roart.component.ComponentPredictor;%0Aimport roart.component.model.PredictorParam;%0Aimport roart.iclij.model.MemoryItem;%0Aimport roart.util.ServiceUtil;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0A%0Apublic class PredictorService %7B%0A    private Logger log = LoggerFactory.getLogger(this.getClass());%0A%0A    public List%3CMemoryItem%3E doPredict(String market, Integer offset, String aDate, boolean doSave, boolean doPrint) throws Exception %7B%0A        ControlService srv = new ControlService();%0A        srv.getConfig();%0A        return doPredict(srv, market, offset, aDate, doSave, doPrint);%0A    %7D%0A%0A    public List%3CMemoryItem%3E doPredict(ControlService srv, String market, Integer offset, String aDate, boolean doSave, boolean doPrint) throws Exception %7B%0A        long time0 = System.currentTimeMillis();%0A        PredictorParam param = new PredictorParam();%0A        param.setMarket(market);%0A        param.setDoPrint(doPrint);%0A        param.setDoSave(doSave);%0A        srv.conf.setMarket(market);%0A        String lstmConf = srv.conf.getLSTMConfig();%0A        int futuredays = 0;%0A        try %7B %0A            TensorflowLSTMConfig lstm = new ObjectMapper().readValue(lstmConf, TensorflowLSTMConfig.class);%0A            futuredays = lstm.getHorizon();%0A        %7D catch (Exception e) %7B%0A            log.error(%22Exception%22, e);%0A            return new ArrayList%3C%3E();%0A        %7D%0A        param.setFuturedays(futuredays);%0A        param.setDates(srv, futuredays, offset, aDate);%0A        Map%3CString, Object%3E setValueMap = new HashMap%3C%3E();%0A        setValueMap.put(ConfigConstants.AGGREGATORSINDICATOR, Boolean.FALSE);%0A        setValueMap.put(ConfigConstants.AGGREGATORSINDICATOREXTRAS, %22%22);%0A        setValueMap.put(ConfigConstants.AGGREGATORSINDICATORRECOMMENDER, Boolean.FALSE);%0A        setValueMap.put(ConfigConstants.PREDICTORS, Boolean.TRUE);%0A        setValueMap.put(ConfigConstants.MACHINELEARNING, Boolean.TRUE);%0A        setValueMap.put(ConfigConstants.INDICATORSMACD, Boolean.FALSE);%0A        %0A        Map map = (Map) param.getCategoryResultMap(srv, PipelineConstants.LSTM, setValueMap);%0A        if (map == null) %7B%0A            return null;%0A        %7D%0A        param.setCategory(map);%0A        Map%3CString, List%3CDouble%3E%3E resultMap = (Map%3CString, List%3CDouble%3E%3E) map.get(PipelineConstants.RESULT);%0A        param.setResultMap(resultMap);%0A        param.getAndSetCategoryValueMap(srv);%0A        param.setUsedsec(time0);%0A        return new ComponentPredictor().calculatePredictor(param);%0A    %7D%0A%0A%7D%0A

Change config to JSON (I2).