@Reference(authors="O. Benjelloun, A. D. Sarma, A. Halevy, J. Widom", title="ULDBs: Databases with uncertainty and lineage", booktitle="Proc. of the 32nd international conference on Very Large Data Bases (VLDB)", url="http://www.vldb.org/conf/2006/p953-benjelloun.pdf") public class WeightedDiscreteUncertainObject extends AbstractUncertainObject implements DiscreteUncertainObject
drawSample(java.util.Random)
.
N. Dalvi, C. Ré, D. Suciu
Probabilistic databases: diamonds in the dirt
Communications of the ACM 52, 7
O. Benjelloun, A. D. Sarma, A. Halevy, J. Widom
ULDBs: Databases with uncertainty and lineage
In Proc. of the 32nd international conference on Very Large Data Bases (VLDB)
N. Dalvi, D. Suciu
Efficient query evaluation on probabilistic databases.
The VLDB Journal, 16(4)
T. Bernecker, H.-P. Kriegel, M. Renz, F. Verhein, A. Züfle
Probabilistic frequent itemset mining in uncertain databases.
In Proc. 15th ACM SIGKDD International Conference on Knowledge Discovery and
Data Mining.
Modifier and Type | Class and Description |
---|---|
private static class |
WeightedDiscreteUncertainObject.Factory
Factory class for this data type.
|
Modifier and Type | Field and Description |
---|---|
static FeatureVector.Factory<WeightedDiscreteUncertainObject,?> |
FACTORY
Vector factory.
|
private DoubleVector[] |
samples
Samples
|
private double[] |
weights
Sample weights
|
bounds, DEFAULT_TRY_LIMIT
Constructor and Description |
---|
WeightedDiscreteUncertainObject(DoubleVector[] samples,
double[] weights)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleVector |
drawSample(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.
|
computeBounds, getDimensionality, getMax, getMin, getValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDimensionality, getMax, getMin
getDimensionality, getValue, toString
public static final FeatureVector.Factory<WeightedDiscreteUncertainObject,?> FACTORY
private DoubleVector[] samples
private double[] weights
public WeightedDiscreteUncertainObject(DoubleVector[] samples, double[] weights)
samples
- Samplesweights
- Weights (must be in ]0:1] and sum up to at most 1).public DoubleVector drawSample(Random rand)
UncertainObject
drawSample
in interface UncertainObject
drawSample
in class AbstractUncertainObject
rand
- Random generatorpublic DoubleVector getCenterOfMass()
UncertainObject
getCenterOfMass
in interface UncertainObject
getCenterOfMass
in class AbstractUncertainObject
public int getNumberSamples()
DiscreteUncertainObject
getNumberSamples
in interface DiscreteUncertainObject
public DoubleVector getSample(int i)
DiscreteUncertainObject
getSample
in interface DiscreteUncertainObject
i
- Indexpublic double getWeight(int i)
DiscreteUncertainObject
getWeight
in interface DiscreteUncertainObject
i
- IndexCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.