Class InstanceSetCombiner<U>
java.lang.Object
es.uam.eps.ir.relison.links.data.letor.InstanceSetCombiner<U>
- Type Parameters:
U
- type of the users.
public class InstanceSetCombiner<U>
extends java.lang.Object
Auxiliar class for combining instance set in different manners.
-
Constructor Summary
Constructors Constructor Description InstanceSetCombiner()
-
Method Summary
Modifier and Type Method Description private Instance<U>
combine(Instance<U> first, Instance<U> second)
Combines two instances.private Instance<U>
combine(Instance<U> first, java.util.List<java.lang.Integer> firstFeats, Instance<U> second, java.util.List<java.lang.Integer> secondFeats)
Combines two instances.InstanceSet<U>
combine(InstanceSet<U> first, InstanceSet<U> second)
Combines two instance sets.InstanceSet<U>
combine(InstanceSet<U> first, java.util.List<java.lang.Integer> firstFeats, InstanceSet<U> second, java.util.List<java.lang.Integer> secondFeats)
Combines two instance sets.The combined set only contains instances which are present in both sets, and share the same category.
-
Constructor Details
-
InstanceSetCombiner
public InstanceSetCombiner()
-
-
Method Details
-
combine
Combines two instance sets. The combined set only contains instances which are present in both sets, and share the same category. This approach just concatenates the instances.- Parameters:
first
- the first instance set.second
- the second instance set.- Returns:
- the combined instance set.
-
combine
public InstanceSet<U> combine(InstanceSet<U> first, java.util.List<java.lang.Integer> firstFeats, InstanceSet<U> second, java.util.List<java.lang.Integer> secondFeats)Combines two instance sets.The combined set only contains instances which are present in both sets, and share the same category. This approach selects a subset of the features for each instance.- Parameters:
first
- the first instance set.firstFeats
- the indexes of the features to use from the first set.second
- the second instance set.secondFeats
- the indexes of the features to use from the second set.- Returns:
- the combined instance set.
-
combine
Combines two instances.- Parameters:
first
- the first instance.second
- the second instance.- Returns:
- the combined instance.
-
combine
private Instance<U> combine(Instance<U> first, java.util.List<java.lang.Integer> firstFeats, Instance<U> second, java.util.List<java.lang.Integer> secondFeats)Combines two instances.- Parameters:
first
- the first instance.firstFeats
- the features to use from the first instance.second
- the second instance.secondFeats
- the features to use from the second instance.- Returns:
- the combined instance.
-