Class RandomForestRegressionExample


  • public class RandomForestRegressionExample
    extends java.lang.Object
    Example represents a solution for the task of price predictions for houses in Boston based on a Random Forest implementation for regression.

    Code in this example launches Ignite grid and fills the cache with test data points (based on the Boston Housing dataset).

    After that it initializes the RandomForestRegressionTrainer and trains the model based on the specified data using random forest regression algorithm.

    Finally, this example loops over the test set of data points, compares prediction of the trained model to the expected outcome (ground truth), and evaluates model quality in terms of Mean Squared Error (MSE) and Mean Absolute Error (MAE).

    You can change the test data used in this example and re-run it to explore this algorithm further.

    • 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

      • RandomForestRegressionExample

        public RandomForestRegressionExample()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Run example.
        Throws:
        java.io.IOException