Interface InstanceSetWriter<U>
- Type Parameters:
U
- Type of the users
- All Known Implementing Classes:
LETORInstanceWriter
public interface InstanceSetWriter<U>
Class for writing patterns in different formats.
-
Method Summary
Modifier and Type Method Description java.lang.String
write(Instance<U> instance)
Obtains an string containing the information for a single instance.void
write(java.io.Writer write, FeatureInformation featInfo)
Writes the feature information of a file.void
write(java.io.Writer write, Instance<U> instance)
Writes an individual instance into a file.void
write(java.lang.String file, InstanceSet<U> instanceSet)
Writes a dataset into a file.java.lang.String
writeFeatureInfo(FeatureInformation featInfo)
Obtains an string with all the information about the features of a dataset.
-
Method Details
-
write
Writes a dataset into a file.- Parameters:
file
- the name of the file.instanceSet
- the instance set to store.- Throws:
java.io.IOException
- if something fails while writing.
-
writeFeatureInfo
Obtains an string with all the information about the features of a dataset.- Parameters:
featInfo
- the feature information.- Returns:
- a String containing the information about the features.
-
write
Writes the feature information of a file.- Parameters:
write
- the writer.featInfo
- feature information to write.- Throws:
java.io.IOException
- if something fails while writing.
-
write
Writes an individual instance into a file.- Parameters:
write
- the writer.instance
- the instance to write.- Throws:
java.io.IOException
- if something fails while writing.
-
write
Obtains an string containing the information for a single instance.- Parameters:
instance
- the instance.- Returns:
- an string containing all the necessary information.
-