Class WeightedDiscreteUncertainObject
- java.lang.Object
-
- elki.data.uncertain.AbstractUncertainObject
-
- elki.data.uncertain.WeightedDiscreteUncertainObject
-
- All Implemented Interfaces:
FeatureVector<java.lang.Double>
,SpatialComparable
,DiscreteUncertainObject
,UncertainObject
@Reference(authors="N. Dalvi, C. R\u00e9, D. Suciu",title="Probabilistic databases: diamonds in the dirt",booktitle="Communications of the ACM 52, 7",url="https://doi.org/10.1145/1538788.1538810",bibkey="DBLP:journals/cacm/DalviRS09") @Reference(authors="O. Benjelloun, A. D. Sarma, A. Halevy, J. Widom",title="ULDBs: Databases with uncertainty and lineage",booktitle="Proc. of the 32nd Int. Conf. on Very Large Data Bases (VLDB)",url="http://www.vldb.org/conf/2006/p953-benjelloun.pdf",bibkey="DBLP:conf/vldb/BenjellounSHW06") @Reference(authors="Thomas Bernecker, Hans-Peter Kriegel, Matthias Renz, Florian Verhein, Andreas Z\u00fcfle",title="Probabilistic frequent itemset mining in uncertain databases",booktitle="Proc. 15th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining",url="https://doi.org/10.1145/1557019.1557039",bibkey="DBLP:conf/kdd/BerneckerKRVZ09") public class WeightedDiscreteUncertainObject extends AbstractUncertainObject implements DiscreteUncertainObject
Weighted version of discrete uncertain objects.- Every object is represented by a finite number of discrete samples.
- Every sample has a weight associated with it.
- Samples with higher weight are more likely to be returned by
drawSample(java.util.Random)
.
This is called the block independent-disjoint (BID model) in:
N. Dalvi, C. Ré, D. Suciu
Probabilistic databases: diamonds in the dirt
Communications of the ACM 52, 7This is also known as the X-Tuple model in:
O. Benjelloun, A. D. Sarma, A. Halevy, J. Widom
ULDBs: Databases with uncertainty and lineage
In Proc. of the 32nd Int. Conf. on Very Large Data Bases (VLDB)If only a single sample is provided, this can be used to model existential uncertainty as in:
N. Dalvi, D. Suciu
Efficient query evaluation on probabilistic databases.
The VLDB Journal, 16(4)and:
Thomas Bernecker, Hans-Peter Kriegel, Matthias Renz, Florian Verhein, Andreas Züfle
Probabilistic frequent itemset mining in uncertain databases.
In Proc. 15th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining.- Since:
- 0.7.0
- Author:
- Alexander Koos, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
WeightedDiscreteUncertainObject.Factory
Factory class for this data type.
-
Field Summary
Fields Modifier and Type Field Description static FeatureVector.Factory<WeightedDiscreteUncertainObject,?>
FACTORY
Vector factory.private DoubleVector[]
samples
Samplesprivate double[]
weights
Sample weights-
Fields inherited from class elki.data.uncertain.AbstractUncertainObject
bounds, DEFAULT_TRY_LIMIT
-
Fields inherited from interface elki.data.FeatureVector
TYPE
-
Fields inherited from interface elki.data.uncertain.UncertainObject
DISCRETE_UNCERTAIN_OBJECT, UNCERTAIN_OBJECT_FIELD
-
-
Constructor Summary
Constructors Constructor Description WeightedDiscreteUncertainObject(DoubleVector[] samples, double[] weights)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleVector
drawSample(java.util.Random rand)
Draw a random sampled instance.DoubleVector
getCenterOfMass()
Get the center of mass of the uncertain object.int
getNumberSamples()
Get the number of samples available (or -1 for infinite).DoubleVector
getSample(int i)
Get the i'th vector.double
getWeight(int i)
Get the weight of the i'th vector.-
Methods inherited from class elki.data.uncertain.AbstractUncertainObject
computeBounds, getDimensionality, getMax, getMin, getValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.data.FeatureVector
getDimensionality, getValue, toString
-
Methods inherited from interface elki.data.spatial.SpatialComparable
getDimensionality, getMax, getMin
-
-
-
-
Field Detail
-
FACTORY
public static final FeatureVector.Factory<WeightedDiscreteUncertainObject,?> FACTORY
Vector factory.
-
samples
private DoubleVector[] samples
Samples
-
weights
private double[] weights
Sample weights
-
-
Constructor Detail
-
WeightedDiscreteUncertainObject
public WeightedDiscreteUncertainObject(DoubleVector[] samples, double[] weights)
Constructor.- Parameters:
samples
- Samplesweights
- Weights (must be in ]0:1] and sum up to at most 1).
-
-
Method Detail
-
drawSample
public DoubleVector drawSample(java.util.Random rand)
Description copied from interface:UncertainObject
Draw a random sampled instance.- Specified by:
drawSample
in interfaceUncertainObject
- Specified by:
drawSample
in classAbstractUncertainObject
- Parameters:
rand
- Random generator- Returns:
- Sampled object.
-
getCenterOfMass
public DoubleVector getCenterOfMass()
Description copied from interface:UncertainObject
Get the center of mass of the uncertain object.- Specified by:
getCenterOfMass
in interfaceUncertainObject
- Specified by:
getCenterOfMass
in classAbstractUncertainObject
- Returns:
- Center of mass.
-
getNumberSamples
public int getNumberSamples()
Description copied from interface:DiscreteUncertainObject
Get the number of samples available (or -1 for infinite).- Specified by:
getNumberSamples
in interfaceDiscreteUncertainObject
- Returns:
- Number of samples, negative indicates infinite.
-
getSample
public DoubleVector getSample(int i)
Description copied from interface:DiscreteUncertainObject
Get the i'th vector.- Specified by:
getSample
in interfaceDiscreteUncertainObject
- Parameters:
i
- Index- Returns:
- Vector
-
getWeight
public double getWeight(int i)
Description copied from interface:DiscreteUncertainObject
Get the weight of the i'th vector.- Specified by:
getWeight
in interfaceDiscreteUncertainObject
- Parameters:
i
- Index- Returns:
- Weight
-
-