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 prob result choice. Ord choice => SimpleDecisionTree prob choice result -> NonEmpty Set choice

#choose Source

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

#elementary Source

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

#flatDist Source

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

#fromElementary Source

fromElementary :: forall prob result choice. 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 prob result2 choice2 result1 choice1. 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 prob result choice. Semiring prob => Ord choice => Ord result => NonEmpty Map choice (Dist prob result) -> Either (Failure choice result) (SimpleDecisionTree prob choice result)

#mapWithIndex Source

mapWithIndex :: forall prob result2 result1 choice. 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 prob result choice. Ord result => Semiring prob => SimpleDecisionTree prob choice result -> Skeleton choice result

#unmake Source

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

#validate Source

validate :: forall prob result choice. 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