Class Step_13_RandomSearch


  • public class Step_13_RandomSearch
    extends java.lang.Object
    To choose the best hyper-parameters the cross-validation with ParamGrid will be used in this example.

    Code in this example launches Ignite grid and fills the cache with test data (based on Titanic passengers data).

    After that it defines how to split the data to train and test sets and configures preprocessors that extract features from an upstream data and perform other desired changes over the extracted data.

    Then, it tunes hyper-parameters with K-fold Cross-Validation on the split training set and trains the model based on the processed data using decision tree classification and the obtained hyper-parameters.

    Finally, this example uses Evaluator functionality to compute metrics from predictions.

    The purpose of cross-validation is model checking, not model building.

    We train k different models.

    They differ in that 1/(k-1)th of the training data is exchanged against other cases.

    These models are sometimes called surrogate models because the (average) performance measured for these models is taken as a surrogate of the performance of the model trained on all cases.

    All scenarios are described there: https://sebastianraschka.com/faq/docs/evaluate-a-model.html

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Run example.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Step_13_RandomSearch

        public Step_13_RandomSearch()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Run example.