Class WekaMLGridSearch<U>
java.lang.Object
es.uam.eps.ir.relison.grid.links.recommendation.algorithms.supervised.WekaMLGridSearch<U>
- Type Parameters:
U
- type of the users.
- All Implemented Interfaces:
AlgorithmGridSearch<U>
public class WekaMLGridSearch<U> extends java.lang.Object implements AlgorithmGridSearch<U>
Grid search generator for LambdaMART algorithm. Differently from other algorithms, for the LambdaMART
algorithm, we consider the grid to be a list of configurations.
- See Also:
MachineLearningWekaRecommender
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CLASSIFIER
Identifier for the route of the jforests configuration file.private static java.lang.String
ITER
The number of iterations of the random forest algorithm.private static java.lang.String
TEST
Identifier for the route containing the test instances.private static java.lang.String
TRAIN
Identifier for the route containing the training instances.private org.ranksys.formats.parsing.Parser<U>
uParser
Parser for reading users. -
Constructor Summary
Constructors Constructor Description WekaMLGridSearch(org.ranksys.formats.parsing.Parser<U> uParser)
Constructor. -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,RecommendationAlgorithmFunction<U>>
grid(Grid grid)
Obtains the different recommendation algorithms to execute in a grid.java.util.Map<java.lang.String,java.util.function.Supplier<es.uam.eps.ir.ranksys.rec.Recommender<U,U>>>
grid(Grid grid, FastGraph<U> graph, es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,U> prefData)
Obtains the different recommendation algorithms to execute in a grid.private java.util.List<org.jooq.lambda.tuple.Tuple2<java.lang.String,java.util.function.Supplier<weka.classifiers.Classifier>>>
selectClassifiers(java.util.Map<java.lang.String,Grid> classifiersGrid)
-
Field Details
-
TRAIN
private static final java.lang.String TRAINIdentifier for the route containing the training instances.- See Also:
- Constant Field Values
-
TEST
private static final java.lang.String TESTIdentifier for the route containing the test instances.- See Also:
- Constant Field Values
-
CLASSIFIER
private static final java.lang.String CLASSIFIERIdentifier for the route of the jforests configuration file.- See Also:
- Constant Field Values
-
ITER
private static final java.lang.String ITERThe number of iterations of the random forest algorithm.- See Also:
- Constant Field Values
-
uParser
Parser for reading users.
-
-
Constructor Details
-
WekaMLGridSearch
Constructor.- Parameters:
uParser
- a parser for reading users.
-
-
Method Details
-
grid
Description copied from interface:AlgorithmGridSearch
Obtains the different recommendation algorithms to execute in a grid.- Specified by:
grid
in interfaceAlgorithmGridSearch<U>
- Parameters:
grid
- The grid for the algorithm.- Returns:
- a map containing the different recommendations.
-
selectClassifiers
private java.util.List<org.jooq.lambda.tuple.Tuple2<java.lang.String,java.util.function.Supplier<weka.classifiers.Classifier>>> selectClassifiers(java.util.Map<java.lang.String,Grid> classifiersGrid) -
grid
public java.util.Map<java.lang.String,java.util.function.Supplier<es.uam.eps.ir.ranksys.rec.Recommender<U,U>>> grid(Grid grid, FastGraph<U> graph, es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,U> prefData)Description copied from interface:AlgorithmGridSearch
Obtains the different recommendation algorithms to execute in a grid.- Specified by:
grid
in interfaceAlgorithmGridSearch<U>
- Parameters:
grid
- The grid for the algorithm.graph
- The training graph.prefData
- The preference training data.- Returns:
- a map containing the different recommendations.
-