sig
module type Comparable =
sig
type t
val compare : Oc45.Comparable.t -> Oc45.Comparable.t -> int
val avg : Oc45.Comparable.t -> Oc45.Comparable.t -> Oc45.Comparable.t
end
module type S =
sig
exception InvalidArgument of string
type feature = int
exception BadContinuity of Oc45.S.feature
exception DiscreteFeatOutOfBounds of Oc45.S.feature * int
type category = int
type contData
type dataVal = Discrete of int | Continuous of Oc45.S.contData
type data = Oc45.S.dataVal array
type trainVal = { data : Oc45.S.data; category : Oc45.S.category; }
type trainSet
type decisionTree
val c45 : Oc45.S.trainSet -> Oc45.S.decisionTree
val classify : Oc45.S.decisionTree -> Oc45.S.data -> Oc45.S.category
val emptyTrainSet : int -> int -> bool array -> Oc45.S.trainSet
val addData : Oc45.S.trainVal -> Oc45.S.trainSet -> Oc45.S.trainSet
val addDataList :
Oc45.S.trainVal list -> Oc45.S.trainSet -> Oc45.S.trainSet
val getSet : Oc45.S.trainSet -> Oc45.S.trainVal list
val setFeatureMax : int -> int -> Oc45.S.trainSet -> unit
val getNbFeatures : Oc45.S.trainSet -> int
val getFeatureMax : Oc45.S.trainSet -> int array
val getFeatContinuity : Oc45.S.trainSet -> bool array
val getNbCategories : Oc45.S.trainSet -> int
val getSetSize : Oc45.S.trainSet -> int
val toDot :
Format.formatter ->
(Format.formatter -> Oc45.S.contData -> unit) ->
Oc45.S.decisionTree -> unit
val toDotStdout :
(Format.formatter -> Oc45.S.contData -> unit) ->
Oc45.S.decisionTree -> unit
end
module Make :
functor (X : Comparable) ->
sig
exception InvalidArgument of string
type feature = int
exception BadContinuity of feature
exception DiscreteFeatOutOfBounds of feature * int
type category = int
type contData = X.t
type dataVal = Discrete of int | Continuous of contData
type data = dataVal array
type trainVal = { data : data; category : category; }
type trainSet
type decisionTree
val c45 : trainSet -> decisionTree
val classify : decisionTree -> data -> category
val emptyTrainSet : int -> int -> bool array -> trainSet
val addData : trainVal -> trainSet -> trainSet
val addDataList : trainVal list -> trainSet -> trainSet
val getSet : trainSet -> trainVal list
val setFeatureMax : int -> int -> trainSet -> unit
val getNbFeatures : trainSet -> int
val getFeatureMax : trainSet -> int array
val getFeatContinuity : trainSet -> bool array
val getNbCategories : trainSet -> int
val getSetSize : trainSet -> int
val toDot :
Format.formatter ->
(Format.formatter -> contData -> unit) -> decisionTree -> unit
val toDotStdout :
(Format.formatter -> contData -> unit) -> decisionTree -> unit
end
module IntOc45 :
sig
exception InvalidArgument of string
type feature = int
exception BadContinuity of feature
exception DiscreteFeatOutOfBounds of feature * int
type category = int
type contData = int
type dataVal = Discrete of int | Continuous of contData
type data = dataVal array
type trainVal = { data : data; category : category; }
type trainSet
type decisionTree
val c45 : trainSet -> decisionTree
val classify : decisionTree -> data -> category
val emptyTrainSet : int -> int -> bool array -> trainSet
val addData : trainVal -> trainSet -> trainSet
val addDataList : trainVal list -> trainSet -> trainSet
val getSet : trainSet -> trainVal list
val setFeatureMax : int -> int -> trainSet -> unit
val getNbFeatures : trainSet -> int
val getFeatureMax : trainSet -> int array
val getFeatContinuity : trainSet -> bool array
val getNbCategories : trainSet -> int
val getSetSize : trainSet -> int
val toDot :
Format.formatter ->
(Format.formatter -> contData -> unit) -> decisionTree -> unit
val toDotStdout :
(Format.formatter -> contData -> unit) -> decisionTree -> unit
end
module FloatOc45 :
sig
exception InvalidArgument of string
type feature = int
exception BadContinuity of feature
exception DiscreteFeatOutOfBounds of feature * int
type category = int
type contData = float
type dataVal = Discrete of int | Continuous of contData
type data = dataVal array
type trainVal = { data : data; category : category; }
type trainSet
type decisionTree
val c45 : trainSet -> decisionTree
val classify : decisionTree -> data -> category
val emptyTrainSet : int -> int -> bool array -> trainSet
val addData : trainVal -> trainSet -> trainSet
val addDataList : trainVal list -> trainSet -> trainSet
val getSet : trainSet -> trainVal list
val setFeatureMax : int -> int -> trainSet -> unit
val getNbFeatures : trainSet -> int
val getFeatureMax : trainSet -> int array
val getFeatContinuity : trainSet -> bool array
val getNbCategories : trainSet -> int
val getSetSize : trainSet -> int
val toDot :
Format.formatter ->
(Format.formatter -> contData -> unit) -> decisionTree -> unit
val toDotStdout :
(Format.formatter -> contData -> unit) -> decisionTree -> unit
end
end