mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
made some adjustments to the windestimation from maneuvers training code
This commit is contained in:
@@ -9,6 +9,6 @@
|
||||
<classpathentry kind="lib" path="/com.sap.sailing.windestimation/lib/smile-math-1.5.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jcommon-1.0.23.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jfreechart-1.0.19.jar"/>
|
||||
<classpathentry kind="lib" path="lib/trove-3.0.3.jar"/>
|
||||
<classpathentry kind="lib" path="lib/trove-3.0.3.jar" sourcepath="/home/uhl/data/java/trove4j-3.0.3-sources.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/model/SimpleModelsTrainingPart1.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
|
||||
<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
|
||||
</mapAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.sap.sailing.windestimation.model.SimpleModelsTrainingPart1"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="com.sap.sailing.windestimation.lab"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="${SAPSAILING_BEARER_TOKEN} 80 20 ../com.sap.sailing.windestimation.test/resources/trained_wind_estimation_models"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.windestimation.lab"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms16G -Xmx16G -Dmongo.dbName=windEstimation -Dmongo.port=10202"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms16G -Xmx16G -Dmongo.uri="mongodb://localhost/windestimation?uuidRepresentation=javaLegacy&retryWrites=true""/>
|
||||
</launchConfiguration>
|
||||
|
||||
+3
-7
@@ -114,18 +114,14 @@ public class SimpleModelsTrainingPart1 {
|
||||
awaitThreadPoolCompletion();
|
||||
// The following code would open pop-up windows that display charts of original TWD regressions before cleansing:
|
||||
final boolean showCharts = args.length > 4 && Boolean.valueOf(args[4]);
|
||||
if (showCharts) {
|
||||
AggregatedDurationDimensionPlot.main(args);
|
||||
AggregatedDistanceDimensionPlot.main(args);
|
||||
}
|
||||
enforceMonotonicZeroMeanSigmaGrowth(AggregatedSingleDimensionType.DURATION);
|
||||
enforceMonotonicZeroMeanSigmaGrowth(AggregatedSingleDimensionType.DISTANCE);
|
||||
// The following code would open pop-up windows that display charts of original and "cleansed" TWD regressions:
|
||||
if (showCharts) {
|
||||
AggregatedDurationDimensionPlot.main(args);
|
||||
showInfoAboutIntervalAdjustments(DurationBasedTwdTransitionRegressorModelContext.class, DurationValueRange.class);
|
||||
AggregatedDistanceDimensionPlot.main(args);
|
||||
showInfoAboutIntervalAdjustments(DistanceBasedTwdTransitionRegressorModelContext.class, DistanceValueRange.class);
|
||||
} else {
|
||||
enforceMonotonicZeroMeanSigmaGrowth(AggregatedSingleDimensionType.DURATION);
|
||||
enforceMonotonicZeroMeanSigmaGrowth(AggregatedSingleDimensionType.DISTANCE);
|
||||
}
|
||||
DurationBasedTwdTransitionStdRegressorTrainer.train(modelStore);
|
||||
DistanceBasedTwdTransitionStdRegressorTrainer.train(modelStore);
|
||||
|
||||
+12
@@ -52,6 +52,8 @@ import com.sap.sailing.windestimation.data.RaceWithEstimationData;
|
||||
import com.sap.sailing.windestimation.data.WindQuality;
|
||||
import com.sap.sailing.windestimation.data.transformer.CompleteManeuverCurveWithEstimationDataToManeuverForEstimationTransformer;
|
||||
import com.sap.sailing.windestimation.model.exception.ModelPersistenceException;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DistanceBasedTwdTransitionRegressorModelContext.DistanceValueRange;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DurationBasedTwdTransitionRegressorModelContext.DurationValueRange;
|
||||
import com.sap.sailing.windestimation.model.store.ClassPathReadOnlyModelStoreImpl;
|
||||
import com.sap.sailing.windestimation.preprocessing.RaceElementsFilteringPreprocessingPipelineImpl;
|
||||
import com.sap.sailing.windestimation.windinference.DummyBasedTwsCalculatorImpl;
|
||||
@@ -74,6 +76,16 @@ public class IncrementalMstHmmWindEstimationForTrackedRaceTest extends OnlineTra
|
||||
|
||||
private static final double PERCENT_QUANTILE = 0.8;
|
||||
|
||||
/**
|
||||
* These model file names must match up with the boundaries defined in the {@link DistanceValueRange} and {@link DurationValueRange}
|
||||
* enumeration types. The files themselves are obtained by executing the training runs, particularly the launch configurations
|
||||
* {@code AggregatedDurationBasedTwdTransitionImporter} and {@code AggregatedDistanceBasedTwdTransitionImporter} which, when provided
|
||||
* with the argument {@code ../com.sap.sailing.windestimation.test/resources/trained_wind_estimation_models} will store the serialized
|
||||
* versions of the wind regressor models there, using the boundaries as defined in the two enumeration types.<p>
|
||||
*
|
||||
* Failing to update these files and their names after making changes to either of the enumeration types will lead to exceptions
|
||||
* during test runs.
|
||||
*/
|
||||
public static final String[] modelFilesNames = {
|
||||
"SERIALIZATION.modelForDistanceBasedTwdDeltaStdRegressor.IncrementalSingleDimensionPolynomialRegressor.DistanceBasedTwdTransitionRegressorFrom0.0To10.0.clf",
|
||||
"SERIALIZATION.modelForDistanceBasedTwdDeltaStdRegressor.IncrementalSingleDimensionPolynomialRegressor.DistanceBasedTwdTransitionRegressorFrom10.0To912.0.clf",
|
||||
|
||||
-1
@@ -99,5 +99,4 @@ public class DistanceAndDurationAwareWindTransitionProbabilitiesCalculator
|
||||
/ transitionProbabilitySum;
|
||||
return new Pair<>(intersectedWindRangeUntilCurrentNode, normalizedTransitionProbabilityUntilCurrentNode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-3
@@ -37,7 +37,11 @@ public final class DistanceBasedTwdTransitionRegressorModelContext
|
||||
* Input value intervals with corresponding model configurations for the distance dimension which is treated in
|
||||
* meters. For each enum element, a separate model will be trained with polynomial degree and bias as specified by
|
||||
* the enum element. Feel free to add/delete/modify enum elements as it is desired. The model training and discovery
|
||||
* will still work. However, make sure that the specified intervals do not include holes between its transitions.
|
||||
* will still work. However, make sure that the specified intervals do not include holes between its transitions.<p>
|
||||
*
|
||||
* Should you make changes here, also keep in mind that test cases and their test resources contains model files
|
||||
* that must match these ranges. See {@code IncrementalMstHmmWindEstimationForTrackedRaceTest.modelFilesNames} for
|
||||
* details.
|
||||
*
|
||||
* @author Vladislav Chumak (D069712)
|
||||
*
|
||||
@@ -77,7 +81,5 @@ public final class DistanceBasedTwdTransitionRegressorModelContext
|
||||
public SupportedDimensionValueRange getSupportedDimensionValueRange() {
|
||||
return supportedDimensionValueRange;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user