org.mymedialite.hyperparameter
Class NelderMead

java.lang.Object
  extended by org.mymedialite.hyperparameter.NelderMead

public class NelderMead
extends java.lang.Object

Nealder-Mead algorithm for finding suitable hyperparameters.


Method Summary
static double findMinimum(java.lang.String evaluation_measure, java.util.List<java.lang.String> hp_names, java.util.List<DoubleMatrix1D> initial_hp_values, RatingPredictor recommender, ISplit<IRatings> split)
          Find the the parameters resulting in the minimal results for a given evaluation measure.
static double findMinimum(java.lang.String error_measure, RatingPredictor recommender)
          Find best hyperparameter (according to an error measure) using Nelder-Mead search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findMinimum

public static double findMinimum(java.lang.String error_measure,
                                 RatingPredictor recommender)
                          throws java.lang.Exception
Find best hyperparameter (according to an error measure) using Nelder-Mead search.

Parameters:
error_measure - an error measure (lower is better)
recommender - a rating predictor (will be set to best hyperparameter combination)
Returns:
the estimated error of the best hyperparameter combination
Throws:
java.lang.Exception

findMinimum

public static double findMinimum(java.lang.String evaluation_measure,
                                 java.util.List<java.lang.String> hp_names,
                                 java.util.List<DoubleMatrix1D> initial_hp_values,
                                 RatingPredictor recommender,
                                 ISplit<IRatings> split)
                          throws java.lang.Exception
Find the the parameters resulting in the minimal results for a given evaluation measure. The recommender will be set to the best parameter value after calling this method.

Parameters:
evaluation_measure - the name of the evaluation measure
hp_names - the names of the hyperparameters to optimize
initial_hp_values - the values of the hyperparameters to try out first
recommender - the recommender
split - the dataset split to use
Returns:
the best (lowest) average value for the hyperparameter
Throws:
java.lang.Exception