Skip to content
Snippets Groups Projects
Commit 30fefc19 authored by Michele Alberti's avatar Michele Alberti
Browse files

[stdlib] Rework svm type in stdlib to be coherent with type naming in code.

parent ed8c2098
No related branches found
No related tags found
No related merge requests found
......@@ -33,14 +33,14 @@ theory SVM
type output_type = int
type svm = {
app : input_type -> output_type;
num_input: int;
num_classes: int;
apply : input_type -> output_type;
nb_inputs : int;
nb_classes : int;
}
predicate linfty_distance (a: input_type) (b: input_type) (eps:t) (n: int) =
forall i. 0 <= i < n -> .- eps .< a i .- b i .< eps
predicate robust_to (svm: svm) (a: input_type) (eps: t) =
forall b. linfty_distance a b eps svm.num_input -> svm.app a = svm.app b
forall b. linfty_distance a b eps svm.nb_inputs -> svm.apply a = svm.apply b
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment