@BuiltBy(value=AlgorithmInstanceBuilder.class) public class AlgorithmInstance extends Object implements Attributed
| Constructor and Description |
|---|
AlgorithmInstance(String name,
LenskitConfiguration config) |
AlgorithmInstance(String name,
LenskitConfiguration cfg,
Map<String,Object> attrs,
boolean preload) |
| Modifier and Type | Method and Description |
|---|---|
LenskitRecommender |
buildRecommender(LenskitConfiguration defaults)
Build a recommender.
|
DAGNode<Component,Dependency> |
buildRecommenderGraph(LenskitConfiguration defaults)
Build a recommender graph (but don't instantiate any objects).
|
Map<String,Object> |
getAttributes() |
LenskitConfiguration |
getConfig() |
String |
getName()
Get the name of this algorithmInfo.
|
boolean |
getPreload()
Query whether this algorithmInfo is to operate on in-memory data.
|
AlgorithmInstance |
setRandom(Random rng)
Let AlgorithmInstanceBuilder to pass random number generator to algorithmInfo instance
|
String |
toString() |
public AlgorithmInstance(String name, LenskitConfiguration config)
public AlgorithmInstance(String name, LenskitConfiguration cfg, Map<String,Object> attrs, boolean preload)
public String getName()
getName in interface Attributedpublic boolean getPreload()
true if the ratings database should be loaded in-memory
prior to running.@Nonnull public Map<String,Object> getAttributes()
getAttributes in interface Attributed@Nonnull public LenskitConfiguration getConfig()
public AlgorithmInstance setRandom(Random rng)
rng - The random number generator.public LenskitRecommender buildRecommender(@Nullable LenskitConfiguration defaults) throws RecommenderBuildException
defaults - Additional configuration. This configuration comes before the
algorithm's configuration, so it is overridden if appropriate. It is used
for providing things such as DAOs.RecommenderBuildExceptionpublic DAGNode<Component,Dependency> buildRecommenderGraph(@Nullable LenskitConfiguration defaults) throws RecommenderConfigurationException
defaults - Additional configuration. This configuration comes before the
algorithm's configuration, so it is overridden if appropriate. It is used
for providing things such as DAOs.RecommenderConfigurationException - if there is an error configuring the recommender.