CLI¶
Overview¶
The command-line interface is exposed as the cqdisc command.
In addition to end-user commands such as learn, the CLI includes a
hidden contributor command, generate-docs, for regenerating algorithm
documentation pages from Jinja templates.
Generate Algorithm Pages¶
Run this from the repository root:
This command:
- renders one markdown page per registered algorithm under
docs/userguide/algorithms/ - updates
docs/userguide/algorithms.mdwhen the index template is present - updates the Algorithms navigation block in
mkdocs.yml
Optional arguments:
--output-dir DIRto write pages to a different directory--mkdocs FILEto explicitly set the mkdocs config path
Example:
API Docs¶
cli
¶
Command-line interface for causaliq-discovery.
Functions:
-
cli–causaliq-discovery: structure learning from data.
-
describe_cmd–Show description, hyperparameters, and reference for ALGORITHM.
-
generate_docs_cmd–Generate a user-guide markdown page for each registered algorithm.
-
learn_cmd–Learn a causal graph from data.
-
list_algorithms_cmd–List all supported structure learning algorithms.
-
main–Entry point for the cqdisc CLI.
describe_cmd
¶
Show description, hyperparameters, and reference for ALGORITHM.
generate_docs_cmd
¶
Generate a user-guide markdown page for each registered algorithm.
learn_cmd
¶
learn_cmd(
input_path: str,
algorithm: str,
output: str,
hyperparameters: Optional[dict],
trace: bool,
variable_types: Optional[str],
sample_size: Optional[int],
variant: Optional[str],
knowledge: Optional[str],
randomise: tuple,
seed: Optional[int],
) -> None
Learn a causal graph from data.
Examples: cqdisc learn -i data.csv -a tabu-stable -o results/ cqdisc learn -i data.csv -a hc -o results/ -p score=bdeu -d
list_algorithms_cmd
¶
List all supported structure learning algorithms.