public class SubsampleTask extends AbstractTask<DataSource>
| Constructor and Description |
|---|
SubsampleTask() |
SubsampleTask(String name) |
| Modifier and Type | Method and Description |
|---|---|
double |
getFraction()
Get the size of file.
|
SubsampleMode |
getMode()
Get the mode of the subsample.
|
File |
getOutput()
Get the output name of subsample file.
|
DataSource |
getSource()
Get the data source backing this subsample manager.
|
DataSource |
perform()
Run the Subsample command.
|
SubsampleTask |
setFraction(double fraction)
Set the fraction of subsample to generate.
|
SubsampleTask |
setMode(SubsampleMode mode)
Set the mode of the subsample, it is user, item or rating.
|
SubsampleTask |
setOutput(File out)
Set the output file for the sampled data.
|
SubsampleTask |
setOutput(String name)
Set the output file name.
|
SubsampleTask |
setSource(DataSource source)
Set the input data source.
|
execute, getName, getProject, setName, setProjectaddListener, cancel, get, get, interruptTask, isCancelled, isDone, set, setException, wasInterruptedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListenerpublic SubsampleTask()
public SubsampleTask(String name)
public SubsampleTask setFraction(double fraction) throws IllegalArgumentException
fraction - The fraction of ratings to keep.IllegalArgumentExceptionpublic SubsampleTask setOutput(String name)
name - The name of the output file.setOutput(java.io.File)public SubsampleTask setOutput(File out)
out - The output file.public SubsampleTask setSource(DataSource source)
source - The data source to use.public SubsampleTask setMode(SubsampleMode mode)
mode - The mode of the output.public File getOutput()
public DataSource getSource()
public double getFraction()
public SubsampleMode getMode()
public DataSource perform() throws TaskExecutionException
perform in class AbstractTask<DataSource>TaskExecutionException