Class WekaInstanceTranslator<U>
java.lang.Object
es.uam.eps.ir.relison.links.data.ml.weka.WekaInstanceTranslator<U>
- Type Parameters:
U
- type of the users.
public class WekaInstanceTranslator<U>
extends java.lang.Object
Class for transforming InstanceSet to WekaInstanceSet.
-
Constructor Summary
Constructors Constructor Description WekaInstanceTranslator()
-
Method Summary
Modifier and Type Method Description WekaInstanceSet<U>
toWeka(InstanceSet<U> instanceSet, java.lang.String name)
Translates an InstanceSet to a WekaInstanceSet.private weka.core.FastVector
translateFeatureInfo(InstanceSet<U> instanceSet)
Given the feature information in a given InstanceSet, translates it into an object containing such feature information for its use by Weka.private weka.core.Instance
translateInstance(Instance<U> instance, FeatureInformation featInfo, WekaInstanceSet<U> wekaInstanceSet)
Translates an individual instance into a Weka one.
-
Constructor Details
-
WekaInstanceTranslator
public WekaInstanceTranslator()
-
-
Method Details
-
toWeka
Translates an InstanceSet to a WekaInstanceSet.- Parameters:
instanceSet
- the original instance set.name
- the name of the dataset (ex: train/test).- Returns:
- the Weka pattern set.
-
translateFeatureInfo
Given the feature information in a given InstanceSet, translates it into an object containing such feature information for its use by Weka.- Parameters:
instanceSet
- the original instance set.- Returns:
- the Weka feature information.
-
translateInstance
private weka.core.Instance translateInstance(Instance<U> instance, FeatureInformation featInfo, WekaInstanceSet<U> wekaInstanceSet)Translates an individual instance into a Weka one.- Parameters:
instance
- the original instance.featInfo
- the feature information for the original set.wekaInstanceSet
- the Weka instance set in which we want to integrate the new instance.- Returns:
- the Weka instance.
-