提交 | 用户 | 时间
|
7fd198
|
1 |
package com.iailab.module.model.mdk.sample; |
潘 |
2 |
|
|
3 |
import com.iailab.module.model.mdk.common.enums.TypeA; |
|
4 |
import org.springframework.beans.factory.annotation.Autowired; |
|
5 |
import org.springframework.stereotype.Component; |
|
6 |
|
|
7 |
/** |
|
8 |
* 样本工厂 |
|
9 |
*/ |
|
10 |
@Component |
|
11 |
public class SampleFactory { |
|
12 |
|
|
13 |
@Autowired |
|
14 |
private PredictSampleInfoConstructor predictSampleInfoConstructor; |
|
15 |
|
|
16 |
@Autowired |
|
17 |
private PredictSampleDataConstructor predictSampleDataConstructor; |
|
18 |
|
|
19 |
/** |
|
20 |
* add by zfc 2020.12.15 重写createSampleInfo方法:不区分算法类型直接返回预测时间序列类型 |
|
21 |
* |
|
22 |
* @param typeA |
|
23 |
* @param modelId |
|
24 |
* @return |
|
25 |
*/ |
|
26 |
public SampleInfoConstructor createSampleInfo(String typeA, String modelId){ |
|
27 |
PredictSampleInfoConstructor sampleInfoConstructor = null; |
|
28 |
if (typeA.compareTo(TypeA.Predict.name()) == 0) { |
|
29 |
sampleInfoConstructor = predictSampleInfoConstructor; |
054fb9
|
30 |
} else if (typeA.compareTo(TypeA.Schedule.name()) == 0) { |
潘 |
31 |
sampleInfoConstructor = predictSampleInfoConstructor; |
7fd198
|
32 |
} |
潘 |
33 |
return sampleInfoConstructor; |
|
34 |
} |
|
35 |
|
|
36 |
public SampleDataConstructor createSampelData(String typeA) { |
|
37 |
SampleDataConstructor sampleDataConstructor = null; |
|
38 |
if (typeA.compareTo(TypeA.Predict.name()) == 0) { |
|
39 |
sampleDataConstructor = predictSampleDataConstructor; |
054fb9
|
40 |
} else if (typeA.compareTo(TypeA.Schedule.name()) == 0) { |
潘 |
41 |
sampleDataConstructor = predictSampleDataConstructor; |
7fd198
|
42 |
} |
潘 |
43 |
return sampleDataConstructor; |
|
44 |
} |
|
45 |
} |