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 ...@@ -33,14 +33,14 @@ theory SVM
type output_type = int type output_type = int
type svm = { type svm = {
app : input_type -> output_type; apply : input_type -> output_type;
num_input: int; nb_inputs : int;
num_classes: int; nb_classes : int;
} }
predicate linfty_distance (a: input_type) (b: input_type) (eps:t) (n: 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 forall i. 0 <= i < n -> .- eps .< a i .- b i .< eps
predicate robust_to (svm: svm) (a: input_type) (eps: t) = 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 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