ontolearn.incomplete_kb
Functions
|
Makes the knowledge base incomplete by removing a certain percentage of statements (triples). |
|
Makes the knowledge base incomplete by removing a certain percentage of individuals. |
|
This function makes the knowledge base (KB) inconsistent by introducing incorrect statements. |
Module Contents
- ontolearn.incomplete_kb.make_kb_incomplete_ass(kb_path, output_path, rate, seed)[source]
Makes the knowledge base incomplete by removing a certain percentage of statements (triples).
Inputs:
kb_path: Path to the input knowledge base. output_path: Path to save the modified (incomplete) knowledge base. rate: Percentage of statements to remove (0-100). seed: random seed for reproducibility.
Output:
Incomplete KB at level rate %
- ontolearn.incomplete_kb.make_kb_incomplete(kb_path, output_path, rate, seed) Set[str] [source]
Makes the knowledge base incomplete by removing a certain percentage of individuals.
Inputs:
kb_path: Path to the input knowledge base. output_path: Path to save the modified (incomplete) knowledge base. rate: Percentage of individuals to remove (0-100). seed: random seed for reproducibility.
Output:
Incomplete KB at level rate %
- ontolearn.incomplete_kb.make_kb_inconsistent(kb_path, output_path, rate, seed, max_attempts=100)[source]
This function makes the knowledge base (KB) inconsistent by introducing incorrect statements.
Parameters: kb_path (str): Path to the original OWL ontology file. output_path (str): Path to save the inconsistent ontology file. rate (float): Percentage of incorrect statements to introduce (0-100). seed (int): Seed for reproducibility. max_attempts (int): Maximum attempts to find a valid incorrect statement.