public class ExternalAlgorithmBuilder extends Object implements org.apache.commons.lang3.builder.Builder<ExternalAlgorithm>
Constructor and Description |
---|
ExternalAlgorithmBuilder() |
ExternalAlgorithmBuilder(String name) |
Modifier and Type | Method and Description |
---|---|
ExternalAlgorithm |
build() |
Map<String,Object> |
getAttributes()
Get the attributes of this algorithmInfo instance.
|
String |
getName()
Get the algorithmInfo name.
|
ExternalAlgorithmBuilder |
setAttribute(String attr,
Object value)
Set an attribute for this algorithmInfo instance.
|
ExternalAlgorithmBuilder |
setCommand(List<String> cmd)
Set the command to run.
|
ExternalAlgorithmBuilder |
setCommand(String... cmd) |
ExternalAlgorithmBuilder |
setName(String n)
Set the algorithmInfo name.
|
ExternalAlgorithmBuilder |
setOutputDelimiter(String delim)
Set the delimiter of the recommender's output file.
|
ExternalAlgorithmBuilder |
setWorkDir(File dir)
Set the working directory for the external recommender.
|
ExternalAlgorithmBuilder |
setWorkDir(String dir)
Set the working directory for the external recommender.
|
public ExternalAlgorithmBuilder()
public ExternalAlgorithmBuilder(String name)
public ExternalAlgorithmBuilder setName(String n)
n
- The name for this algorithmInfo instance.public String getName()
public ExternalAlgorithmBuilder setAttribute(@Nonnull String attr, @Nonnull Object value)
attr
- The attribute name.value
- The attribute value.public Map<String,Object> getAttributes()
public ExternalAlgorithmBuilder setCommand(List<String> cmd)
{OUTPUT}
— the output file name (should be delimited text).
{TRAIN_DATA}
— the training CSV file name
{TEST_DATA}
— the test data CSV file name
cmd
- The command to run (name and arguments).public ExternalAlgorithmBuilder setCommand(String... cmd)
public ExternalAlgorithmBuilder setWorkDir(File dir)
dir
- The working directory.public ExternalAlgorithmBuilder setWorkDir(String dir)
dir
- The working directory.public ExternalAlgorithmBuilder setOutputDelimiter(String delim)
delim
- The output delimiter. The default delimiter is ','.public ExternalAlgorithm build()
build
in interface org.apache.commons.lang3.builder.Builder<ExternalAlgorithm>