Module BC_BDTree


module BC_BDTree: sig  end
Binary decision trees


type ('b, 'a) btree =
| Leaf of 'a (*a leaf of type 'b*)
| Node of 'b * ('b, 'a) btree * ('b, 'a) btree (*a node consists of a (parameter for a) decision function of type 'a, and two child nodes*)
the type for binary decision trees

val bdtree : ('a, 'b) btree -> ('c -> 'a -> bool) -> 'c -> 'b
bdtree spec matcher creates a function for classification. spec is the structure of the decision tree, and matcher is a function for discrimination, using the element of type 'a at the node as a parameter
val prune_tree : ('a, 'b) btree -> ('a, 'b) btree
prune useless branches from a tree
val binary_id3 : ?maxdepth:int ->
?scoref:(int -> int -> int -> int -> float) ->
'a list ->
'a list ->
((int -> int -> int -> int -> float) -> 'a list -> 'a list -> 'b) ->
('a -> 'b -> bool) -> ('b, bool) btree
ID3 algorithm (Quinlan, 19??) for binary classes. arguments in following order:
val bdt_to_string : ('a, bool) btree -> ('a -> string) -> string
convert a boolean tree to a string. the second argument is a function which converts the parameters at the node to a string
val serialize : ('a, 'b) btree -> ('a -> string) -> ('b -> string) -> string
convert binary decision trees to strings which can be used as internal representation
val entropy_gain : int -> int -> int -> int -> float
entropy gain score function: for ID3