public class AlgorithmInstance
extends java.lang.Object
An instance of a recommender algorithm to be trained and measured.
| Constructor and Description |
|---|
AlgorithmInstance(java.lang.String name,
LenskitConfiguration config)
Construct a new algorithm instance.
|
AlgorithmInstance(java.lang.String name,
java.util.List<LenskitConfiguration> configs,
java.util.Map<java.lang.String,java.lang.Object> attrs)
Construct a new algorithm instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Get the attributes of this algorithm.
|
java.util.List<LenskitConfiguration> |
getConfigurations()
Get the recommender configurations.
|
java.lang.String |
getName()
Get the name of this algorithm.
|
static java.util.List<AlgorithmInstance> |
load(java.nio.file.Path file,
java.lang.String name,
java.lang.ClassLoader classLoader)
Load an algorithm instance from a file.
|
java.lang.String |
toString() |
public AlgorithmInstance(java.lang.String name,
LenskitConfiguration config)
Construct a new algorithm instance.
name - The algorithm name.config - The algorithm configuration.public AlgorithmInstance(java.lang.String name,
java.util.List<LenskitConfiguration> configs,
java.util.Map<java.lang.String,java.lang.Object> attrs)
Construct a new algorithm instance.
name - The algorithm name.configs - The algorithm configurations.attrs - The attributes for this algorithm instance.public java.lang.String getName()
Get the name of this algorithm. This returns a short name which is used to identify the algorithm or instance.
@Nonnull public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Get the attributes of this algorithm. These attributes are used to distinguish between similar algorithms, e.g. different configurations of the same basic algorithm.
@Nonnull public java.util.List<LenskitConfiguration> getConfigurations()
Get the recommender configurations.
public static java.util.List<AlgorithmInstance> load(java.nio.file.Path file, java.lang.String name, java.lang.ClassLoader classLoader)
Load an algorithm instance from a file.
file - The file to load.name - The algorithm name, or null to use the file’s basename.classLoader - The class loader, or null to use a default.public java.lang.String toString()
toString in class java.lang.Object