T1
- Type of the first list.T2
- Type of the second list.public class WeightedPairDistribution<T1,T2> extends Object
Modifier and Type | Field and Description |
---|---|
long |
count |
Constructor and Description |
---|
WeightedPairDistribution(long count,
LinkedHashMap<CachedPair<T1,T2>,WeightCountTuple> jointCounts,
LinkedHashMap<T1,WeightCountTuple> firstCount,
LinkedHashMap<T2,WeightCountTuple> secondCount) |
WeightedPairDistribution(long count,
Map<CachedPair<T1,T2>,WeightCountTuple> jointCounts,
Map<T1,WeightCountTuple> firstCount,
Map<T2,WeightCountTuple> secondCount) |
Modifier and Type | Method and Description |
---|---|
static <T1,T2> WeightedPairDistribution<T1,T2> |
constructFromLists(List<T1> first,
List<T2> second,
List<Double> weights)
Generates the counts for two vectors.
|
static <T1,T2> WeightedPairDistribution<T1,T2> |
constructFromMap(Map<CachedPair<T1,T2>,WeightCountTuple> jointCount)
Generates a WeightedPairDistribution by generating the marginal distributions for the first and second elements.
|
Map<T1,WeightCountTuple> |
getFirstCount() |
Map<CachedPair<T1,T2>,WeightCountTuple> |
getJointCounts() |
Map<T2,WeightCountTuple> |
getSecondCount() |
public WeightedPairDistribution(long count, Map<CachedPair<T1,T2>,WeightCountTuple> jointCounts, Map<T1,WeightCountTuple> firstCount, Map<T2,WeightCountTuple> secondCount)
public WeightedPairDistribution(long count, LinkedHashMap<CachedPair<T1,T2>,WeightCountTuple> jointCounts, LinkedHashMap<T1,WeightCountTuple> firstCount, LinkedHashMap<T2,WeightCountTuple> secondCount)
public Map<CachedPair<T1,T2>,WeightCountTuple> getJointCounts()
public Map<T1,WeightCountTuple> getFirstCount()
public Map<T2,WeightCountTuple> getSecondCount()
public static <T1,T2> WeightedPairDistribution<T1,T2> constructFromLists(List<T1> first, List<T2> second, List<Double> weights)
T1
- Type of the first list.T2
- Type of the second list.first
- An list of values.second
- Another list of values.weights
- An list of per example weights.public static <T1,T2> WeightedPairDistribution<T1,T2> constructFromMap(Map<CachedPair<T1,T2>,WeightCountTuple> jointCount)
T1
- Type of the first element.T2
- Type of the second element.jointCount
- The (normalised) input map.Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.