Class IndividualSamplingAlgorithmGridSelector<U>
java.lang.Object
es.uam.eps.ir.relison.grid.links.recommendation.sampling.IndividualSamplingAlgorithmGridSelector<U>
- Type Parameters:
U- type of the users.
public class IndividualSamplingAlgorithmGridSelector<U>
extends java.lang.Object
Given a grid, this class obtains a sampling algorithm, to apply to every target user for a
link prediction / contact recommendation approach.
-
Constructor Summary
Constructors Constructor Description IndividualSamplingAlgorithmGridSelector() -
Method Summary
Modifier and Type Method Description IndividualSamplingAlgorithmConfigurator<U>getConfigurator(java.lang.String name, org.ranksys.formats.parsing.Parser<U> uParser)Obtains a configurator for an individual sampling algorithm.org.jooq.lambda.tuple.Tuple2<java.lang.String,IndividualSampler<U>>getIndividualSamplingAlgorithm(java.lang.String name, Parameters param, FastGraph<U> graph, FastGraph<U> extraEdges, es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,U> prefData, org.ranksys.formats.parsing.Parser<U> uParser)Obtains a configured individual sampling algorithm.org.jooq.lambda.tuple.Tuple2<java.lang.String,IndividualSamplerFunction<U>>getIndividualSamplingAlgorithm(java.lang.String name, Parameters param, org.ranksys.formats.parsing.Parser<U> uParser)Obtains a function for obtaining a configured individual sampling algorithm.
-
Constructor Details
-
IndividualSamplingAlgorithmGridSelector
public IndividualSamplingAlgorithmGridSelector()
-
-
Method Details
-
getIndividualSamplingAlgorithm
public org.jooq.lambda.tuple.Tuple2<java.lang.String,IndividualSampler<U>> getIndividualSamplingAlgorithm(java.lang.String name, Parameters param, FastGraph<U> graph, FastGraph<U> extraEdges, es.uam.eps.ir.ranksys.fast.preference.FastPreferenceData<U,U> prefData, org.ranksys.formats.parsing.Parser<U> uParser)Obtains a configured individual sampling algorithm.- Parameters:
name- the name of the algorithm.param- the set of parameters of the algorithm.graph- the graph to sample.extraEdges- a graph useful for the sample (for example, a test graph).prefData- preference data representing the graph.uParser- a parser for reading users from text.- Returns:
- a pair containing the name of the algorithm and its configured object.
-
getIndividualSamplingAlgorithm
public org.jooq.lambda.tuple.Tuple2<java.lang.String,IndividualSamplerFunction<U>> getIndividualSamplingAlgorithm(java.lang.String name, Parameters param, org.ranksys.formats.parsing.Parser<U> uParser)Obtains a function for obtaining a configured individual sampling algorithm.- Parameters:
name- the name of the algorithm.param- the parameters of the algorithm.uParser- a parser for reading users from text.- Returns:
- a pair containing the name of the algorithm and a function to retrieve a configured sampler.
-
getConfigurator
public IndividualSamplingAlgorithmConfigurator<U> getConfigurator(java.lang.String name, org.ranksys.formats.parsing.Parser<U> uParser)Obtains a configurator for an individual sampling algorithm.- Parameters:
name- the name of the algorithm.uParser- parser for reading users.- Returns:
- the configurator if exists, null otherwise.
-