fixed paths to constructors

This commit is contained in:
Quinn Dougherty 2022-06-24 09:19:15 -04:00
parent e0e2f12e27
commit 29cf1cebb2

View File

@ -228,7 +228,10 @@ let dispatchToGenericOutput = (call: IEV.functionCall, env: DistributionOperatio
| ("klDivergence", [IEvDistribution(prediction), IEvDistribution(answer)]) => | ("klDivergence", [IEvDistribution(prediction), IEvDistribution(answer)]) =>
Some( Some(
DistributionOperation.run( DistributionOperation.run(
FromDist(ToScore(LogScore(DistributionTypes.Score_Dist(answer), None)), prediction), FromDist(
ToScore(LogScore(DistributionTypes.DistributionOperation.Score_Dist(answer), None)),
prediction,
),
~env, ~env,
), ),
) )
@ -241,8 +244,8 @@ let dispatchToGenericOutput = (call: IEV.functionCall, env: DistributionOperatio
FromDist( FromDist(
ToScore( ToScore(
LogScore( LogScore(
DistributionTypes.Score_Dist(answer), DistributionTypes.DistributionOperation.Score_Dist(answer),
Some(DistributionTypes.Score_Dist(prior)), Some(DistributionTypes.DistributionOperation.Score_Dist(prior)),
), ),
), ),
prediction, prediction,
@ -266,8 +269,8 @@ let dispatchToGenericOutput = (call: IEV.functionCall, env: DistributionOperatio
FromDist( FromDist(
ToScore( ToScore(
LogScore( LogScore(
DistributionTypes.Score_Scalar(answer), DistributionTypes.DistributionOperation.Score_Scalar(answer),
DistributionTypes.Score_Dist(prior)->Some, DistributionTypes.DistributionOperation.Score_Dist(prior)->Some,
), ),
), ),
prediction, prediction,
@ -280,7 +283,10 @@ let dispatchToGenericOutput = (call: IEV.functionCall, env: DistributionOperatio
[IEvDistribution(prediction), IEvDistribution(Symbolic(#Float(answer)))], [IEvDistribution(prediction), IEvDistribution(Symbolic(#Float(answer)))],
) => ) =>
DistributionOperation.run( DistributionOperation.run(
FromDist(ToScore(LogScore(DistributionTypes.Score_Scalar(answer), None)), prediction), FromDist(
ToScore(LogScore(DistributionTypes.DistributionOperation.Score_Scalar(answer), None)),
prediction,
),
~env, ~env,
)->Some )->Some
| ("isNormalized", [IEvDistribution(dist)]) => Helpers.toBoolFn(IsNormalized, dist, ~env) | ("isNormalized", [IEvDistribution(dist)]) => Helpers.toBoolFn(IsNormalized, dist, ~env)