|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
fr.lip6.bag.BagOfVector<T>
fr.lip6.bag.WeightedBagOfVector<T>
T - type of vectors in input space.public class WeightedBagOfVector<T extends MLVector<?>>
Simple class of bag that associated a weight to each element of the bag. This weight is proportional to the representativity of the elements. ie, it os the inverse of the sum of the similarities between the element and the rest of the bag.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
WeightedBagOfVector(Kernel<T> k)
Constructor with kernel argument. |
|
| Method Summary | |
|---|---|
void |
computeWeights()
Compute the weights for each element of the bag. |
double |
getWeight(T t)
get the weights of a particular element in the bag |
double[] |
getWeights()
get the weights associated with each element of the bag |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Constructor Detail |
|---|
public WeightedBagOfVector(Kernel<T> k)
k - kernel used to compute the weights.| Method Detail |
|---|
public double[] getWeights()
public double getWeight(T t)
t - element to be associated with the weight
public void computeWeights()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||