mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 22:48:34 +00:00
Bugfixes and improvements of simple models training
This commit is contained in:
+3
-3
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/model/SimpleModelsTraining.java"/>
|
||||
<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>
|
||||
<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.SimpleModelsTraining"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.sap.sailing.windestimation.model.SimpleModelsTrainingPart1"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.windestimation.lab"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx16G"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms16G -Xmx16G"/>
|
||||
</launchConfiguration>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/model/SimpleModelsTrainingPart2.java"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="1"/>
|
||||
</listAttribute>
|
||||
<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.SimpleModelsTrainingPart2"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.windestimation.lab"/>
|
||||
</launchConfiguration>
|
||||
+8
-2
@@ -9,12 +9,18 @@ import com.sap.sailing.windestimation.data.persistence.twdtransition.SingleDimen
|
||||
public class AggregatedDistanceBasedAbsTwdTransitionImporter {
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DISTANCE);
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = createPersistenceManagerAndEnsureIndex();
|
||||
SingleDimensionTwdTransitionAggregationImporter importer = new SingleDimensionTwdTransitionAggregationImporter(
|
||||
singleDimensionBasedTwdTransitionPersistenceManager, AggregatedSingleDimensionType.DISTANCE_ABS,
|
||||
new AnnealingNextThresholdCalculator(10, 1.5));
|
||||
importer.runAggregation();
|
||||
}
|
||||
|
||||
public static SingleDimensionBasedTwdTransitionPersistenceManager createPersistenceManagerAndEnsureIndex()
|
||||
throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DISTANCE);
|
||||
return singleDimensionBasedTwdTransitionPersistenceManager;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -9,12 +9,18 @@ import com.sap.sailing.windestimation.data.persistence.twdtransition.SingleDimen
|
||||
public class AggregatedDistanceBasedTwdTransitionImporter {
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DISTANCE);
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = createPersistenceManagerAndEnsureIndex();
|
||||
SingleDimensionTwdTransitionAggregationImporter importer = new SingleDimensionTwdTransitionAggregationImporter(
|
||||
singleDimensionBasedTwdTransitionPersistenceManager, AggregatedSingleDimensionType.DISTANCE,
|
||||
new AnnealingNextThresholdCalculator(10, 1.5));
|
||||
importer.runAggregation();
|
||||
}
|
||||
|
||||
public static SingleDimensionBasedTwdTransitionPersistenceManager createPersistenceManagerAndEnsureIndex()
|
||||
throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DISTANCE);
|
||||
return singleDimensionBasedTwdTransitionPersistenceManager;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -9,12 +9,18 @@ import com.sap.sailing.windestimation.data.persistence.twdtransition.SingleDimen
|
||||
public class AggregatedDurationBasedAbsTwdTransitionImporter {
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DURATION);
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = createPersistenceManagerAndEnsureIndex();
|
||||
SingleDimensionTwdTransitionAggregationImporter importer = new SingleDimensionTwdTransitionAggregationImporter(
|
||||
singleDimensionBasedTwdTransitionPersistenceManager, AggregatedSingleDimensionType.DURATION_ABS,
|
||||
DurationBasedTwdTransitionImporter.getThresholdCalculator());
|
||||
importer.runAggregation();
|
||||
}
|
||||
|
||||
public static SingleDimensionBasedTwdTransitionPersistenceManager createPersistenceManagerAndEnsureIndex()
|
||||
throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DURATION);
|
||||
return singleDimensionBasedTwdTransitionPersistenceManager;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -9,12 +9,18 @@ import com.sap.sailing.windestimation.data.persistence.twdtransition.SingleDimen
|
||||
public class AggregatedDurationBasedTwdTransitionImporter {
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DURATION);
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = createPersistenceManagerAndEnsureIndex();
|
||||
SingleDimensionTwdTransitionAggregationImporter importer = new SingleDimensionTwdTransitionAggregationImporter(
|
||||
singleDimensionBasedTwdTransitionPersistenceManager, AggregatedSingleDimensionType.DURATION,
|
||||
DurationBasedTwdTransitionImporter.getThresholdCalculator());
|
||||
importer.runAggregation();
|
||||
}
|
||||
|
||||
public static SingleDimensionBasedTwdTransitionPersistenceManager createPersistenceManagerAndEnsureIndex()
|
||||
throws UnknownHostException {
|
||||
SingleDimensionBasedTwdTransitionPersistenceManager singleDimensionBasedTwdTransitionPersistenceManager = new SingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
SingleDimensionType.DURATION);
|
||||
return singleDimensionBasedTwdTransitionPersistenceManager;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-4
@@ -36,7 +36,8 @@ public class DistanceBasedTwdTransitionImporter {
|
||||
.getIterator(); iterator.hasNext();) {
|
||||
long percent = windSourceNumber * 100 / numberOfWindSources;
|
||||
WindSourceWithFixes windSource = iterator.next();
|
||||
LoggingUtil.logInfo("Processing " + windSourceNumber++ + "/" + numberOfWindSources + " (" + percent + "%)");
|
||||
LoggingUtil.logInfo("Processing wind source " + windSourceNumber++ + "/" + numberOfWindSources + " ("
|
||||
+ percent + "%) for distance dimension");
|
||||
List<SingleDimensionBasedTwdTransition> entries = new ArrayList<>();
|
||||
List<WindSourceWithFixes> otherWindSources = new ArrayList<>();
|
||||
for (PersistedElementsIterator<WindSourceWithFixes> otherWindSourcesIterator = windSourcesPersistenceManager
|
||||
@@ -109,16 +110,17 @@ public class DistanceBasedTwdTransitionImporter {
|
||||
} while (currentFix != null && currentOtherFix != null);
|
||||
}
|
||||
if (entries.isEmpty()) {
|
||||
LoggingUtil.logInfo("No TWD transitions to import");
|
||||
LoggingUtil.logInfo("No distance based TWD transitions to import");
|
||||
} else {
|
||||
distanceBasedTwdTransitionPersistenceManager.add(entries);
|
||||
int totalEntries = entries.size();
|
||||
totalValuesCount += totalEntries;
|
||||
LoggingUtil.logInfo(totalEntries + " TWD transitions imported, " + totalValuesCount + " in total");
|
||||
LoggingUtil.logInfo(
|
||||
totalEntries + " distance based TWD transitions imported, " + totalValuesCount + " in total");
|
||||
}
|
||||
}
|
||||
LoggingUtil.logInfo("###################\r\nDistance based TWD transitions Import finished");
|
||||
LoggingUtil.logInfo("Totally " + totalValuesCount + " TWD transitions imported");
|
||||
LoggingUtil.logInfo("Totally " + totalValuesCount + " distance based TWD transitions imported");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+6
-5
@@ -32,7 +32,8 @@ public class DurationBasedTwdTransitionImporter {
|
||||
.getIterator(); iterator.hasNext();) {
|
||||
long percent = windSourceNumber * 100 / numberOfWindSources;
|
||||
WindSourceWithFixes windSource = iterator.next();
|
||||
LoggingUtil.logInfo("Processing " + windSourceNumber++ + "/" + numberOfWindSources + " (" + percent + "%)");
|
||||
LoggingUtil.logInfo("Processing wind source " + windSourceNumber++ + "/" + numberOfWindSources + " ("
|
||||
+ percent + "%) for duration dimension");
|
||||
TimePoint timePointOfLastConsideredWindFix = null;
|
||||
List<SingleDimensionBasedTwdTransition> entries = new ArrayList<>();
|
||||
int windFixIndex = 0;
|
||||
@@ -58,17 +59,17 @@ public class DurationBasedTwdTransitionImporter {
|
||||
}
|
||||
}
|
||||
if (entries.isEmpty()) {
|
||||
LoggingUtil.logInfo("No TWD transitions to import");
|
||||
LoggingUtil.logInfo("No duration based TWD transitions to import");
|
||||
} else {
|
||||
durationBasedTwdTransitionPersistenceManager.add(entries);
|
||||
int totalEntries = entries.size();
|
||||
totalValuesCount += totalEntries;
|
||||
LoggingUtil
|
||||
.logInfo(totalEntries + " TWD transition entries imported, " + totalValuesCount + " in total");
|
||||
LoggingUtil.logInfo(totalEntries + " duration based TWD transition entries imported, "
|
||||
+ totalValuesCount + " in total");
|
||||
}
|
||||
}
|
||||
LoggingUtil.logInfo("###################\r\nDuration based TWD transitions Import finished");
|
||||
LoggingUtil.logInfo("Totally " + totalValuesCount + " TWD transitions imported");
|
||||
LoggingUtil.logInfo("Totally " + totalValuesCount + " duration based TWD transitions imported");
|
||||
}
|
||||
|
||||
public static NextThresholdCalculator getThresholdCalculator() {
|
||||
|
||||
+8
-5
@@ -35,7 +35,7 @@ public class SingleDimensionTwdTransitionAggregationImporter {
|
||||
public void runAggregation() throws UnknownHostException {
|
||||
long totalValuesCount = 0;
|
||||
List<AggregatedSingleDimensionBasedTwdTransition> aggregates = new ArrayList<>();
|
||||
LoggingUtil.logInfo("Aggregating persisted entries");
|
||||
LoggingUtil.logInfo("Aggregating persisted entries for dimension " + dimensionType);
|
||||
TDoubleList entries = new TDoubleArrayList();
|
||||
double currentBucketThreshold = thresholdCalculator.getInitialThresholdValue();
|
||||
double nextBucketThreshold = thresholdCalculator.getNextThresholdValue(currentBucketThreshold);
|
||||
@@ -61,7 +61,8 @@ public class SingleDimensionTwdTransitionAggregationImporter {
|
||||
}
|
||||
entries.add(twdChange);
|
||||
if (entries.size() % 10000 == 0) {
|
||||
LoggingUtil.logInfo((entries.size() + totalValuesCount) + " Entries aggregated");
|
||||
LoggingUtil.logInfo(
|
||||
(entries.size() + totalValuesCount) + " Entries aggregated for dimension " + dimensionType);
|
||||
}
|
||||
}
|
||||
if (entries.size() >= MIN_NUMBER_OF_VALUES_PER_BUCKET) {
|
||||
@@ -69,14 +70,16 @@ public class SingleDimensionTwdTransitionAggregationImporter {
|
||||
aggregates.add(aggregate);
|
||||
totalValuesCount += entries.size();
|
||||
}
|
||||
LoggingUtil.logInfo("Persisting " + aggregates.size() + " aggregates");
|
||||
LoggingUtil.logInfo("Persisting " + aggregates.size() + " aggregates for dimension " + dimensionType);
|
||||
AggregatedSingleDimensionBasedTwdTransitionPersistenceManager aggregatedDurationBasedTwdTransitionPersistenceManager = new AggregatedSingleDimensionBasedTwdTransitionPersistenceManager(
|
||||
dimensionType);
|
||||
aggregatedDurationBasedTwdTransitionPersistenceManager.dropCollection();
|
||||
aggregatedDurationBasedTwdTransitionPersistenceManager.add(aggregates);
|
||||
LoggingUtil.logInfo("###################\r\n" + dimensionType + " based TWD transitions Import finished");
|
||||
LoggingUtil.logInfo("Totally " + totalValuesCount + " TWD transitions imported");
|
||||
LoggingUtil.logInfo("Totally " + aggregates.size() + " TWD transition aggregates imported");
|
||||
LoggingUtil.logInfo(
|
||||
"Totally " + totalValuesCount + " " + dimensionType + " based TWD transitions have been processed");
|
||||
LoggingUtil.logInfo(
|
||||
"Totally " + aggregates.size() + " TWD transition aggregates imported for dimension " + dimensionType);
|
||||
}
|
||||
|
||||
private double getFinalBucketThreshold(double currentBucketThreshold, double nextBucketThreshold) {
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ public class RaceWithWindSourcesPersistenceManager extends AbstractPersistenceMa
|
||||
|
||||
public RaceWithWindSourcesPersistenceManager() throws UnknownHostException {
|
||||
Document indexes = new Document(RaceWindJsonSerializer.START_TIME_POINT, 1);
|
||||
indexes.put(RaceWindJsonSerializer.END_TIME_POINT, 1);
|
||||
getCollection().createIndex(indexes);
|
||||
indexes.put(RaceWindJsonSerializer.END_TIME_POINT, -1);
|
||||
getDb().getCollection(getWindSourcesCollectionName()).createIndex(indexes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class WindSourcesPersistenceManager extends AbstractPersistenceManager<Wi
|
||||
|
||||
public WindSourcesPersistenceManager() throws UnknownHostException {
|
||||
BasicDBObject indexes = new BasicDBObject(RaceWindJsonSerializer.START_TIME_POINT, 1);
|
||||
indexes.put(RaceWindJsonSerializer.END_TIME_POINT, 1);
|
||||
indexes.put(RaceWindJsonSerializer.END_TIME_POINT, -1);
|
||||
getCollection().createIndex(indexes);
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -223,6 +223,7 @@ public class SingleDimensionAggregatesPlottingFrame extends JFrame {
|
||||
}
|
||||
|
||||
public void awaitWindowClosed() throws InterruptedException {
|
||||
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
|
||||
windowClosedLatch.await();
|
||||
}
|
||||
|
||||
|
||||
+19
-20
@@ -22,10 +22,8 @@ import com.sap.sailing.windestimation.model.classifier.maneuver.ManeuverClassifi
|
||||
import com.sap.sailing.windestimation.model.classifier.maneuver.PersistedManeuverClassifiersScorePrinter;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DistanceBasedTwdTransitionRegressorModelContext;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DistanceBasedTwdTransitionRegressorModelContext.DistanceValueRange;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DistanceBasedTwdTransitionStdRegressorTrainer;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DurationBasedTwdTransitionRegressorModelContext;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DurationBasedTwdTransitionRegressorModelContext.DurationValueRange;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DurationBasedTwdTransitionStdRegressorTrainer;
|
||||
import com.sap.sailing.windestimation.util.LoggingUtil;
|
||||
|
||||
/**
|
||||
@@ -33,7 +31,7 @@ import com.sap.sailing.windestimation.util.LoggingUtil;
|
||||
* @author Vladislav Chumak (D069712)
|
||||
*
|
||||
*/
|
||||
public class SimpleModelsTraining {
|
||||
public class SimpleModelsTrainingPart1 {
|
||||
|
||||
private static final int NUMBER_OF_THREADS = 3;
|
||||
private static ExecutorService executorService;
|
||||
@@ -51,12 +49,17 @@ public class SimpleModelsTraining {
|
||||
});
|
||||
executeInThreadPool(() -> {
|
||||
DurationBasedTwdTransitionImporter.main(args);
|
||||
Thread.sleep(1000);
|
||||
AggregatedDurationBasedTwdTransitionImporter.main(args);
|
||||
});
|
||||
executeInThreadPool(() -> {
|
||||
DistanceBasedTwdTransitionImporter.main(args);
|
||||
Thread.sleep(1000);
|
||||
});
|
||||
awaitThreadPoolCompletion();
|
||||
AggregatedDurationBasedTwdTransitionImporter.createPersistenceManagerAndEnsureIndex();
|
||||
AggregatedDistanceBasedTwdTransitionImporter.createPersistenceManagerAndEnsureIndex();
|
||||
executeInThreadPool(() -> {
|
||||
AggregatedDurationBasedTwdTransitionImporter.main(args);
|
||||
});
|
||||
executeInThreadPool(() -> {
|
||||
AggregatedDistanceBasedTwdTransitionImporter.main(args);
|
||||
});
|
||||
awaitThreadPoolCompletion();
|
||||
@@ -74,18 +77,14 @@ public class SimpleModelsTraining {
|
||||
} while (JOptionPane.YES_OPTION != askDataCleaningFinished(AggregatedSingleDimensionType.DISTANCE));
|
||||
showInfoAboutIntervalAdjustments(DistanceBasedTwdTransitionRegressorModelContext.class,
|
||||
DistanceValueRange.class);
|
||||
DurationBasedTwdTransitionStdRegressorTrainer.main(args);
|
||||
DistanceBasedTwdTransitionStdRegressorTrainer.main(args);
|
||||
Thread.sleep(1000);
|
||||
ExportedModelsGenerator.main(args);
|
||||
LoggingUtil.logInfo("Model training finished. You can upload the generated file to a server instance.");
|
||||
}
|
||||
|
||||
private static int askDataCleaningFinished(AggregatedSingleDimensionType dimension) {
|
||||
Object[] options = { "Continue with model training", "Restart Graphical Tool" };
|
||||
int res = JOptionPane.showOptionDialog(null,
|
||||
"Have you finished the data cleaning for " + dimension + " dimension?", "Continue with model training?",
|
||||
JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);
|
||||
"Have you finished the data cleansing for the " + dimension + " dimension?",
|
||||
"Continue with model training?", JOptionPane.DEFAULT_OPTION, JOptionPane.INFORMATION_MESSAGE, null,
|
||||
options, options[0]);
|
||||
switch (res) {
|
||||
case 0:
|
||||
return JOptionPane.YES_OPTION;
|
||||
@@ -96,22 +95,22 @@ public class SimpleModelsTraining {
|
||||
}
|
||||
|
||||
private static void showInfoAboutDataCleaning(AggregatedSingleDimensionType dimension) {
|
||||
JOptionPane.showMessageDialog(null, "Now, clean the data for " + dimension
|
||||
+ " dimension. Remove instances from MongoDB collection \"" + dimension.getCollectioName()
|
||||
+ "\" which do not make sense. E.g. values which are represented by a small number of supporting instances (see histogram), values which cause implausible zig zag sections within zero-mean standard deviation curve and etc. Close the graphical tool, when you are done to resume the model training.");
|
||||
JOptionPane.showMessageDialog(null, "Now, clean the data for the " + dimension
|
||||
+ " dimension.\nRemove instances from MongoDB collection \"" + dimension.getCollectioName()
|
||||
+ "\"\nwhich do not make sense and cause implausible zig zag sections\nwithin \"Zero mean sigma\" curve.\n\nClose the graphical tool, when you are done to resume the model training.");
|
||||
}
|
||||
|
||||
private static void showInfoAboutIntervalAdjustments(Class<?> classToAdjust, Class<?> valueRangeEnum) {
|
||||
JOptionPane.showMessageDialog(null, "Now, open the source code of the class \"" + classToAdjust.getName()
|
||||
+ "\". Scroll down to the definition of the inner enum \"" + valueRangeEnum.getSimpleName()
|
||||
+ "\", read its JavaDoc and adjust its interval definitions so that each interval can be learned by the adjusted regressor model configuration with minimal error. Press OK ONLY after you are done.");
|
||||
+ "\".\nScroll down to the definition of the inner enum \"" + valueRangeEnum.getSimpleName()
|
||||
+ "\",\nread its JavaDoc and adjust its interval definitions so that\neach interval can be learned by the adjusted regressor model configuration\nwith minimal error.\n\nPress OK after you are done.");
|
||||
}
|
||||
|
||||
private static void awaitThreadPoolCompletion() throws InterruptedException {
|
||||
executorService.shutdown();
|
||||
boolean success = executorService.awaitTermination(2, TimeUnit.HOURS);
|
||||
boolean success = executorService.awaitTermination(24, TimeUnit.HOURS);
|
||||
if (!success) {
|
||||
new InterruptedException("Thread-pool was terminated after two hours waiting time");
|
||||
new InterruptedException("Thread-pool was terminated after 24 hours waiting time");
|
||||
}
|
||||
Thread.sleep(1000L);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.sap.sailing.windestimation.model;
|
||||
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DistanceBasedTwdTransitionStdRegressorTrainer;
|
||||
import com.sap.sailing.windestimation.model.regressor.twdtransition.DurationBasedTwdTransitionStdRegressorTrainer;
|
||||
import com.sap.sailing.windestimation.util.LoggingUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Vladislav Chumak (D069712)
|
||||
*
|
||||
*/
|
||||
public class SimpleModelsTrainingPart2 {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
DurationBasedTwdTransitionStdRegressorTrainer.main(args);
|
||||
DistanceBasedTwdTransitionStdRegressorTrainer.main(args);
|
||||
Thread.sleep(1000);
|
||||
ExportedModelsGenerator.main(args);
|
||||
LoggingUtil.logInfo("Model training finished. You can upload the generated file to a server instance.");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user