diff --git a/senpy/schemas/aggregatedEvaluation.json b/senpy/schemas/aggregatedEvaluation.json new file mode 100644 index 0000000..4560aab --- /dev/null +++ b/senpy/schemas/aggregatedEvaluation.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "allOf": [ + {"$ref": "response.json"}, + { + "title": "AggregatedEvaluation", + "description": "The results of the evaluation", + "type": "object", + "properties": { + "@context": { + "$ref": "context.json" + }, + "@type": { + "default": "AggregatedEvaluation" + }, + "@id": { + "description": "ID of the aggregated evaluation", + "type": "string" + }, + "evaluations": { + "default": [], + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "evaluation.json" + },{ + "type": "string" + } + ] + } + } + + }, + "required": ["@id", "evaluations"] + } + ] +} diff --git a/senpy/schemas/dataset.json b/senpy/schemas/dataset.json new file mode 100644 index 0000000..6786d8f --- /dev/null +++ b/senpy/schemas/dataset.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "Dataset", + "properties": { + "@id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "compression": { + "type": "string" + }, + "expected_bytes": { + "type": "int" + }, + "filename": { + "description": "Name of the dataset", + "type": "string" + }, + "url": { + "description": "Classifier or plugin evaluated", + "type": "string" + }, + "stats": { + } + }, + "required": ["@id"] +} diff --git a/senpy/schemas/datasets.json b/senpy/schemas/datasets.json new file mode 100644 index 0000000..98bec82 --- /dev/null +++ b/senpy/schemas/datasets.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "allOf": [ + {"$ref": "response.json"}, + { + "required": ["datasets"], + "properties": { + "datasets": { + "type": "array", + "default": [], + "items": { + "$ref": "dataset.json" + } + } + } + } + ] +} diff --git a/senpy/schemas/definitions.json b/senpy/schemas/definitions.json index 0b748d6..b74e8d0 100644 --- a/senpy/schemas/definitions.json +++ b/senpy/schemas/definitions.json @@ -41,5 +41,20 @@ }, "Response": { "$ref": "response.json" + }, + "AggregatedEvaluation": { + "$ref": "aggregatedevaluation.json" + }, + "Evaluation": { + "$ref": "evaluation.json" + }, + "Metric": { + "$ref": "metric.json" + }, + "Dataset": { + "$ref": "dataset.json" + }, + "Datasets": { + "$ref": "datasets.json" } } diff --git a/senpy/schemas/evaluation.json b/senpy/schemas/evaluation.json new file mode 100644 index 0000000..c8816e9 --- /dev/null +++ b/senpy/schemas/evaluation.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "name": "Evalation", + "properties": { + "@id": { + "type": "string" + }, + "@type": { + "type": "array", + "default": "Evaluation" + + }, + "metrics": { + "type": "array", + "items": {"$ref": "metric.json" }, + "default": [] + }, + "evaluatesOn": { + "description": "Name of the dataset evaluated ", + "type": "string" + }, + "evaluates": { + "description": "Classifier or plugin evaluated", + "type": "string" + } + }, + "required": ["@id", "metrics"] +} diff --git a/senpy/schemas/metric.json b/senpy/schemas/metric.json new file mode 100644 index 0000000..842e099 --- /dev/null +++ b/senpy/schemas/metric.json @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "properties": { + "@id": { + "type": "string" + }, + "@type": { + "type": "string" + }, + "maxValue": { + "type": "number" + }, + "minValue": { + "type": "number" + }, + "value": { + "type": "number" + }, + "deviation": { + "type": "number" + } + }, + "required": ["@id"] +}