Make sure pointSetDist toPointSet is normalized

This commit is contained in:
Ozzie Gooen 2022-04-23 18:29:58 -04:00
parent 4e77448f02
commit 260d159500

View File

@ -133,9 +133,17 @@ let toPointSetDist = (
~discrete=Some(discrete), ~discrete=Some(discrete),
) )
/*
I'm surprised that this doesn't come out normalized. My guess is that the KDE library
we're using is standardizing on something else. If we ever change that library, we should
check to see if we still need to do this.
*/
let normalizedPointSet = pointSetDist->E.O2.fmap(PointSetDist.T.normalize)
let samplesParse: Internals.Types.outputs = { let samplesParse: Internals.Types.outputs = {
continuousParseParams: pdf |> E.O.fmap(snd), continuousParseParams: pdf |> E.O.fmap(snd),
pointSetDist: pointSetDist, pointSetDist: normalizedPointSet,
} }
samplesParse samplesParse