Module

Math.Probability.Information.Value.SimpleDecisionTree

Package
purescript-value-of-information
Repository
colehaus/purescript-value-of-information

#Failure Source

data Failure choice result

Constructors

Instances

#Skeleton Source

type Skeleton choice result = NonEmpty Map choice (NonEmpty Set result)

#choices Source

choices :: forall choice result prob. Ord choice => SimpleDecisionTree prob choice result -> NonEmpty Set choice

#choose Source

choose :: forall choice result prob. Ord choice => Ord result => Semiring prob => choice -> SimpleDecisionTree prob choice result -> Maybe (Dist prob result)

#elementary Source

elementary :: forall choice result prob. Ord choice => Ord result => Semiring prob => SimpleDecisionTree prob choice result -> List (Tuple choice (List (Tuple result prob)))

#flatDist Source

flatDist :: forall choice result prob. Ord choice => Ord result => Bounded prob => Semigroup prob => EuclideanRing prob => SimpleDecisionTree prob choice result -> Dist prob (NonEmpty Map choice result)

#fromElementary Source

fromElementary :: forall choice result prob. Ord choice => Ord result => EuclideanRing prob => List (Tuple choice (List (Tuple result prob))) -> Either (Failure choice result) (SimpleDecisionTree prob choice result)

#lift Source

lift :: forall choice1 result1 choice2 result2 prob. Ord choice2 => Ord result2 => Semiring prob => (NonEmpty Map choice1 (Dist prob result1) -> NonEmpty Map choice2 (Dist prob result2)) -> SimpleDecisionTree prob choice1 result1 -> Either (Failure choice2 result2) (SimpleDecisionTree prob choice2 result2)

#make Source

make :: forall choice result prob. Semiring prob => Ord choice => Ord result => NonEmpty Map choice (Dist prob result) -> Either (Failure choice result) (SimpleDecisionTree prob choice result)

#mapWithIndex Source

mapWithIndex :: forall choice result1 result2 prob. Ord choice => Ord result2 => Semiring prob => (choice -> Dist prob result1 -> Dist prob result2) -> SimpleDecisionTree prob choice result1 -> Either (Failure choice result2) (SimpleDecisionTree prob choice result2)

#skeleton Source

skeleton :: forall choice result prob. Ord result => Semiring prob => SimpleDecisionTree prob choice result -> Skeleton choice result

#unmake Source

unmake :: forall choice result prob. SimpleDecisionTree prob choice result -> NonEmpty Map choice (Dist prob result)

#validate Source

validate :: forall choice result prob. Ord choice => Ord result => Semiring prob => NonEmpty Map choice (Dist prob result) -> Either (Failure choice result) Unit

Re-exports from Math.Probability.Information.Value.SimpleDecisionTree.Internal

#SimpleDecisionTree Source

newtype SimpleDecisionTree prob choice result

Instances