Package elki.data.uncertain
Class UnweightedDiscreteUncertainObject
- java.lang.Object
-
- elki.data.uncertain.AbstractUncertainObject
-
- elki.data.uncertain.UnweightedDiscreteUncertainObject
-
- 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") public class UnweightedDiscreteUncertainObject extends AbstractUncertainObject implements DiscreteUncertainObject
Unweighted implementation of discrete uncertain objects.- Every object is represented by a finite number of discrete samples.
- Every sample has the same weight.
- Every sample is equally 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)- Since:
- 0.7.0
- Author:
- Alexander Koos, Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
UnweightedDiscreteUncertainObject.Factory
Factory class for this data type.
-
Field Summary
Fields Modifier and Type Field Description static FeatureVector.Factory<UnweightedDiscreteUncertainObject,?>
FACTORY
Vector factory.private DoubleVector[]
samples
Sample vectors.-
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 UnweightedDiscreteUncertainObject(DoubleVector[] samples)
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<UnweightedDiscreteUncertainObject,?> FACTORY
Vector factory.
-
samples
private DoubleVector[] samples
Sample vectors.
-
-
Constructor Detail
-
UnweightedDiscreteUncertainObject
public UnweightedDiscreteUncertainObject(DoubleVector[] samples)
Constructor.- Parameters:
samples
- Samples
-
-
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
-
-