public ConditionalProbabilityDistribution(ConditionalFrequencyDistribution <TCondition, TSample> cfd, Func <TCondition, FrequencyDistribution <TSample>, IProbabilityDistribution <TSample> > getProbDist) { _probDists = cfd.Conditions.ToDictionary(cond => cond, cond => getProbDist(cond, cfd[cond])); }
public ConditionalFrequencyDistribution(ConditionalFrequencyDistribution <TCondition, TSample> cfd) { _freqDists = cfd._freqDists.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Clone()); }