Module BC_Learning


module BC_Learning: sig  end
Machine Learning stuff
Author(s): Hideo Bannai

val cross_validate : int ->
'a list ->
?sampler:(int -> 'a list -> ('a list * 'a list) list) ->
('a list -> 'b) -> ('b -> 'a list -> 'c) -> 'c list
cross_validate k data sampler learner evaluator runs a k-cross validation on the data. Each element of Data is of type 'a. The learner will take a list of data, and output a hypothesis of type 'b. evaluator will take the learned hypothesis, and data and return some evaluation of type 'c. The k evaluations are returned in a list.

sampler : A function to create cross validation data sets. The default is to use BC_Random.cross_sample_list.
val posneg_cross_validate : int ->
'a list ->
'a list ->
?sampler:(int -> 'a list -> ('a list * 'a list) list) ->
('a list -> 'a list -> 'b) -> ('b -> 'a list -> 'a list -> 'c) -> 'c list
posneg_cross_validate k posdata negdata sampler learner evaluator similar to cross_validate: runs a k-cross validation on the data, but the data consists of two sets, which should be equally sampled. Each element of Data is of type 'a. The learner will take two lists of data, and output a hypothesis of type 'b. evaluator will take the learned hypothesis, and two sets of data and return some evaluation of type 'c. The k evaluations are returned in a list.

sampler : A function to create cross validation data sets. The default is to use BC_Random.cross_sample_list.