From 5824bbc1731c9b7befac63d431d15a5d3636d987 Mon Sep 17 00:00:00 2001 From: Jean-KOUAGOU Date: Tue, 15 Oct 2024 16:03:15 +0200 Subject: [PATCH] update documentation --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 953f97f1..6285ca60 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,20 @@ for str_target_concept, examples in learning_problems.items(): "model": "TDL"}) print(response.json()) ``` - +NCES (another scalable learner) can be used as follows +```python +import json +import requests +with open(f"LPs/Mutagenesis/lps.json") as json_file: + learning_problems = json.load(json_file)["problems"] +for str_target_concept, examples in learning_problems.items(): + response = requests.get('http://0.0.0.0:8000/cel', + headers={'accept': 'application/json', 'Content-Type': 'application/json'}, + json={"pos": examples['positive_examples'], + "neg": examples['negative_examples'], + "model": "NCES"}) + print(response.json()) +```