微调
This commit is contained in:
@@ -42,7 +42,6 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
@@ -88,8 +87,8 @@ public class DetectionServiceImpl {
|
|||||||
private static final Integer INHARMONIC_FLAG = 1;
|
private static final Integer INHARMONIC_FLAG = 1;
|
||||||
private static final Integer HARMONIC_FLAG = 2;
|
private static final Integer HARMONIC_FLAG = 2;
|
||||||
|
|
||||||
@Value("${error.removeCount:14}")
|
// @Value("${error.removeCount:14}")
|
||||||
private Integer removeErrorValueCount;
|
// private Integer removeErrorValueCount;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -2583,7 +2582,7 @@ public class DetectionServiceImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Integer> idxErrorValueList = DetectionUtil.sort(errorValueList, false);
|
List<Integer> idxErrorValueList = DetectionUtil.sort(errorValueList, false);
|
||||||
int removeCount = idxErrorValueList.size() > removeErrorValueCount ? removeErrorValueCount : idxErrorValueList.size() / 5;
|
int removeCount = idxErrorValueList.size() > 20 ? (idxErrorValueList.size() / 20) * 7 : (idxErrorValueList.size() / 5) * 3;
|
||||||
List<Double> newArray = DetectionUtil.getNewArray(value, idxErrorValueList.subList(removeCount, idxErrorValueList.size()));
|
List<Double> newArray = DetectionUtil.getNewArray(value, idxErrorValueList.subList(removeCount, idxErrorValueList.size()));
|
||||||
value.clear();
|
value.clear();
|
||||||
value.addAll(newArray);
|
value.addAll(newArray);
|
||||||
|
|||||||
Reference in New Issue
Block a user