equal
deleted
inserted
replaced
40 | MaSh_NB_Ext |
40 | MaSh_NB_Ext |
41 | MaSh_kNN_Ext |
41 | MaSh_kNN_Ext |
42 |
42 |
43 val is_mash_enabled : unit -> bool |
43 val is_mash_enabled : unit -> bool |
44 val the_mash_algorithm : unit -> mash_algorithm |
44 val the_mash_algorithm : unit -> mash_algorithm |
|
45 val str_of_mash_algorithm : mash_algorithm -> string |
45 |
46 |
46 val mesh_facts : ('a * 'a -> bool) -> int -> (real * (('a * real) list * 'a list)) list -> 'a list |
47 val mesh_facts : ('a * 'a -> bool) -> int -> (real * (('a * real) list * 'a list)) list -> 'a list |
47 val nickname_of_thm : thm -> string |
48 val nickname_of_thm : thm -> string |
48 val find_suggested_facts : Proof.context -> ('b * thm) list -> string list -> ('b * thm) list |
49 val find_suggested_facts : Proof.context -> ('b * thm) list -> string list -> ('b * thm) list |
49 val crude_thm_ord : thm * thm -> order |
50 val crude_thm_ord : thm * thm -> order |
151 | algorithm => (warning ("Unknown MaSh algorithm: " ^ quote algorithm ^ "."); NONE)) |
152 | algorithm => (warning ("Unknown MaSh algorithm: " ^ quote algorithm ^ "."); NONE)) |
152 end |
153 end |
153 |
154 |
154 val is_mash_enabled = is_some o mash_algorithm |
155 val is_mash_enabled = is_some o mash_algorithm |
155 val the_mash_algorithm = the_default MaSh_NB_kNN o mash_algorithm |
156 val the_mash_algorithm = the_default MaSh_NB_kNN o mash_algorithm |
|
157 |
|
158 fun str_of_mash_algorithm MaSh_NB = "nb" |
|
159 | str_of_mash_algorithm MaSh_kNN = "knn" |
|
160 | str_of_mash_algorithm MaSh_NB_kNN = "nb_knn" |
|
161 | str_of_mash_algorithm MaSh_NB_Ext = "nb_ext" |
|
162 | str_of_mash_algorithm MaSh_kNN_Ext = "knn_ext" |
156 |
163 |
157 fun scaled_avg [] = 0 |
164 fun scaled_avg [] = 0 |
158 | scaled_avg xs = Real.ceil (100000000.0 * fold (curry (op +)) xs 0.0) div length xs |
165 | scaled_avg xs = Real.ceil (100000000.0 * fold (curry (op +)) xs 0.0) div length xs |
159 |
166 |
160 fun avg [] = 0.0 |
167 fun avg [] = 0.0 |