Skip to content

Instantly share code, notes, and snippets.

@zaleslaw
Created October 19, 2020 13:45
Show Gist options
  • Save zaleslaw/59e1bc927487e4a7fec61ff4c894c17c to your computer and use it in GitHub Desktop.
Save zaleslaw/59e1bc927487e4a7fec61ff4c894c17c to your computer and use it in GitHub Desktop.
Manual hyperparameter tuning in Apache Ignite ML
// Tune hyper-parameters with K-fold Cross-Validation on the split training set.
int[] pSet = new int[] {1, 2};
int[] maxDeepSet = new int[] {1, 2, 3, 4, 5, 10, 20};
int bestP = 1;
int bestMaxDeep = 1;
double avg = Double.MIN_VALUE;
for (int p : pSet) {
for (int maxDeep : maxDeepSet) {
Preprocessor<Integer, Vector> normalizationPreprocessor = new NormalizationTrainer<Integer, Vector>()
.withP(p)
.fit(
ignite,
dataCache,
minMaxScalerPreprocessor
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment