|
@@ -1,8 +1,6 @@
|
|
|
package com.tzld.piaoquan.ad.engine.service.predict.container;
|
|
|
|
|
|
import com.tdunning.math.stats.Centroid;
|
|
|
-import com.tdunning.math.stats.MergingDigest;
|
|
|
-import com.tzld.piaoquan.ad.engine.service.predict.model.threshold.ScoreV2ThresholdPredictModel;
|
|
|
import com.tzld.piaoquan.ad.engine.service.predict.model.threshold.ThresholdPredictModel;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -17,12 +15,11 @@ import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.Executors;
|
|
|
import java.util.concurrent.ScheduledExecutorService;
|
|
|
-import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
@Component
|
|
|
public class ThresholdModelContainer {
|
|
|
|
|
|
- private final static Logger log = LoggerFactory.getLogger(ScoreV2ThresholdPredictModel.class);
|
|
|
+ private final static Logger log = LoggerFactory.getLogger(ThresholdModelContainer.class);
|
|
|
|
|
|
@Autowired
|
|
|
private ApplicationContext applicationContext;
|
|
@@ -30,7 +27,7 @@ public class ThresholdModelContainer {
|
|
|
private double position;
|
|
|
|
|
|
public static Map<String,ThresholdPredictModel> modelMap=new HashMap<>();
|
|
|
-
|
|
|
+
|
|
|
|
|
|
private static final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
|
|
@PostConstruct
|
|
@@ -39,22 +36,7 @@ public class ThresholdModelContainer {
|
|
|
beanMap.forEach((s,model)->{
|
|
|
modelMap.put(model.getName(), model);
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public static ThresholdPredictModel getThresholdPredictModel(String modelName){
|
|
@@ -65,44 +47,5 @@ public class ThresholdModelContainer {
|
|
|
return modelMap.get("basic");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|