From 5e1d59687f32674fd48d2066bd7c39052853ff64 Mon Sep 17 00:00:00 2001 From: Alex Moreo Date: Thu, 27 Jan 2022 12:41:32 +0100 Subject: [PATCH] fisrt commit, lets put here some code for ordinal quantification --- Ordinal/inspect_dataset.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Ordinal/inspect_dataset.py diff --git a/Ordinal/inspect_dataset.py b/Ordinal/inspect_dataset.py new file mode 100644 index 0000000..cd38eed --- /dev/null +++ b/Ordinal/inspect_dataset.py @@ -0,0 +1,16 @@ +import quapy as qp +from quapy.data import LabelledCollection +from quapy.data.reader import from_text +from quapy.functional import strprev + +category = 'Books' +datadir = './data' + +training_path = f'{datadir}/{category}/training_data.txt' + +data = LabelledCollection.load(training_path, loader_func=from_text) + +print(len(data)) +print(strprev(data.prevalence())) + +