@ConfigDelegate(value=AlgorithmInstanceBuilderDelegate.class) public class AlgorithmInstanceBuilder extends java.lang.Object implements org.apache.commons.lang3.builder.Builder<AlgorithmInstance>
Constructor and Description |
---|
AlgorithmInstanceBuilder() |
AlgorithmInstanceBuilder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
AlgorithmInstance |
build() |
AlgorithmInstanceBuilder |
configureFromFile(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.io.File file)
Configure the algorithmInfo instance builder from a file.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Get the attributes of this algorithmInfo instance.
|
LenskitConfiguration |
getConfig() |
java.lang.String |
getName()
Get the algorithmInfo name.
|
boolean |
getPreload()
Get whether this algorithmInfo will require ratings to be pre-loaded.
|
EvalProject |
getProject()
Get the project of this algorithmInfo
|
AlgorithmInstanceBuilder |
setAttribute(java.lang.String attr,
java.lang.Object value)
Set an attribute for this algorithmInfo instance.
|
AlgorithmInstanceBuilder |
setName(java.lang.String n)
Set the algorithmInfo name.
|
AlgorithmInstanceBuilder |
setPreload(boolean pl)
Deprecated.
This method doesn't do anything anymore. Pack rating data if you want
preloading.
|
AlgorithmInstanceBuilder |
setProject(EvalProject prj)
Set the project of Algorithm.
|
public AlgorithmInstanceBuilder()
public AlgorithmInstanceBuilder(java.lang.String name)
public AlgorithmInstanceBuilder setName(java.lang.String n)
n
- The name for this algorithmInfo instance.public java.lang.String getName()
public boolean getPreload()
true
if the algorithmInfo should have ratings pre-loaded into memory.public EvalProject getProject()
@Deprecated public AlgorithmInstanceBuilder setPreload(boolean pl)
pl
- true
to pre-load input data when running this algorithmInfo.public AlgorithmInstanceBuilder setAttribute(@Nonnull java.lang.String attr, @Nonnull java.lang.Object value)
attr
- The attribute name.value
- The attribute value.public AlgorithmInstanceBuilder setProject(EvalProject prj)
prj
- The project for this algorithmInfo.public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
public LenskitConfiguration getConfig()
public AlgorithmInstanceBuilder configureFromFile(java.util.Map<java.lang.String,java.lang.Object> attributes, java.io.File file) throws RecommenderConfigurationException, java.io.IOException
attributes
- The attributes. Attributes 'name' and 'preload' are mapped to their
corresponding real properties.file
- The file.RecommenderConfigurationException
- If there is an error running the script.java.io.IOException
- If there is an error loading the script.public AlgorithmInstance build()
build
in interface org.apache.commons.lang3.builder.Builder<AlgorithmInstance>