├── .git_commit_template
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ └── generic-issue-template.md
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ ├── api-docs.yml
│ ├── conda.yml
│ ├── dev-docker.yml
│ ├── pip.yml
│ ├── quick-checks.yml
│ ├── release.yml
│ └── tests.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE.md
├── MANIFEST.in
├── README.md
├── doc
├── README.md
├── _static
│ ├── css
│ │ └── custom.css
│ └── images
│ │ ├── khiops_logo.png
│ │ ├── new_khiops_logo.svg
│ │ ├── new_khiops_logo_with_border.svg
│ │ └── orange_small_logo.png
├── _templates
│ └── autosummary
│ │ ├── class.rst
│ │ ├── function.rst
│ │ ├── method.rst
│ │ └── module.rst
├── clean-doc
├── conf.py
├── convert-samples-hook
├── convert_samples.py
├── convert_tutorials.py
├── core
│ └── index.rst
├── create-doc
├── index.rst
├── internal
│ └── index.rst
├── multi_table_primer.rst
├── notes.rst
├── requirements.txt
├── samples
│ ├── samples.rst
│ └── samples_sklearn.rst
├── sklearn
│ └── index.rst
├── tools
│ └── index.rst
└── tutorials
│ └── index.rst
├── khiops
├── __init__.py
├── _version.py
├── core
│ ├── __init__.py
│ ├── analysis_results.py
│ ├── api.py
│ ├── coclustering_results.py
│ ├── dictionary.py
│ ├── exceptions.py
│ ├── helpers.py
│ └── internals
│ │ ├── __init__.py
│ │ ├── common.py
│ │ ├── filesystems.py
│ │ ├── io.py
│ │ ├── runner.py
│ │ ├── scenario.py
│ │ ├── task.py
│ │ ├── tasks
│ │ ├── __init__.py
│ │ ├── build_deployed_dictionary.py
│ │ ├── build_dictionary_from_data_table.py
│ │ ├── check_database.py
│ │ ├── deploy_model.py
│ │ ├── detect_data_table_format.py
│ │ ├── detect_data_table_format_with_dictionary.py
│ │ ├── evaluate_predictor.py
│ │ ├── export_dictionary_as_json.py
│ │ ├── extract_clusters.py
│ │ ├── extract_keys_from_data_table.py
│ │ ├── interpret_predictor.py
│ │ ├── prepare_coclustering_deployment.py
│ │ ├── reinforce_predictor.py
│ │ ├── simplify_coclustering.py
│ │ ├── sort_data_table.py
│ │ ├── train_coclustering.py
│ │ ├── train_instance_variable_coclustering.py
│ │ ├── train_predictor.py
│ │ └── train_recoder.py
│ │ ├── types.py
│ │ └── version.py
├── extras
│ ├── __init__.py
│ └── docker.py
├── samples
│ ├── __init__.py
│ ├── samples.ipynb
│ ├── samples.py
│ ├── samples_sklearn.ipynb
│ └── samples_sklearn.py
├── sklearn
│ ├── __init__.py
│ ├── dataset.py
│ ├── estimators.py
│ └── helpers.py
└── tools.py
├── packaging
├── conda
│ ├── README.md
│ └── meta.yaml
└── docker
│ └── khiopspydev
│ ├── Dockerfile.rocky
│ ├── Dockerfile.ubuntu
│ ├── run_fake_remote_file_servers.sh
│ └── run_service.sh
├── pyproject.toml
├── scripts
└── update_copyright.py
├── setup.cfg
├── setup.py
├── test-requirements.txt
├── tests
├── __init__.py
├── resources
│ ├── README.md
│ ├── analysis_results
│ │ └── ref_json_reports
│ │ │ ├── Adult.khj
│ │ │ ├── AdultEvaluation.khj
│ │ │ ├── Ansi.khj
│ │ │ ├── AnsiGreek.khj
│ │ │ ├── AnsiLatin.khj
│ │ │ ├── AnsiLatinGreek.khj
│ │ │ ├── BadTool.khj
│ │ │ ├── Deft2017ChallengeNGrams1000.khj
│ │ │ ├── EmptyDatabase.khj
│ │ │ ├── Greek.khj
│ │ │ ├── Iris2D.khj
│ │ │ ├── IrisC.khj
│ │ │ ├── IrisG.khj
│ │ │ ├── IrisR.khj
│ │ │ ├── IrisRWithTrees.khj
│ │ │ ├── IrisU.khj
│ │ │ ├── IrisU2D.khj
│ │ │ ├── Latin.khj
│ │ │ ├── LatinGreek.khj
│ │ │ ├── MissingDiscretization.khj
│ │ │ ├── MissingMODLEqualWidth.khj
│ │ │ ├── NoBivariateDetailedStats.khj
│ │ │ ├── NoPredictorDetails.khj
│ │ │ ├── NoVersion.khj
│ │ │ ├── SpliceJunctionWithTrees.khj
│ │ │ └── XORRegression.khj
│ ├── coclustering_results
│ │ └── ref_json_reports
│ │ │ ├── Adult.khcj
│ │ │ ├── AnsiGreek_Coclustering.khcj
│ │ │ ├── AnsiLatinGreek_Coclustering.khcj
│ │ │ ├── AnsiLatin_Coclustering.khcj
│ │ │ ├── Ansi_Coclustering.khcj
│ │ │ ├── Greek_Coclustering.khcj
│ │ │ ├── Iris.khcj
│ │ │ ├── IrisIV.khcj
│ │ │ ├── LatinGreek_Coclustering.khcj
│ │ │ ├── Latin_Coclustering.khcj
│ │ │ └── MushroomAnnotated.khcj
│ ├── dictionary
│ │ ├── ref_kdic
│ │ │ ├── AIDSBondCounts.kdic
│ │ │ ├── Adult.kdic
│ │ │ ├── AdultKey.kdic
│ │ │ ├── AdultLegacy.kdic
│ │ │ ├── AdultModeling.kdic
│ │ │ ├── Ansi.kdic
│ │ │ ├── AnsiGreek.kdic
│ │ │ ├── AnsiGreek_Modeling.kdic
│ │ │ ├── AnsiLatin.kdic
│ │ │ ├── AnsiLatinGreek.kdic
│ │ │ ├── AnsiLatinGreek_Modeling.kdic
│ │ │ ├── AnsiLatin_Modeling.kdic
│ │ │ ├── Ansi_Modeling.kdic
│ │ │ ├── Bytes.kdic
│ │ │ ├── Customer.kdic
│ │ │ ├── CustomerExtended.kdic
│ │ │ ├── D_Modeling.kdic
│ │ │ ├── Dorothea.kdic
│ │ │ ├── Greek.kdic
│ │ │ ├── Greek_Modeling.kdic
│ │ │ ├── Latin.kdic
│ │ │ ├── LatinGreek.kdic
│ │ │ ├── LatinGreek_Modeling.kdic
│ │ │ ├── Latin_Modeling.kdic
│ │ │ ├── SpliceJunction.kdic
│ │ │ └── SpliceJunctionModeling.kdic
│ │ └── ref_kdicj
│ │ │ ├── AIDSBondCounts.kdicj
│ │ │ ├── Adult.kdicj
│ │ │ ├── AdultKey.kdicj
│ │ │ ├── AdultLegacy.kdicj
│ │ │ ├── AdultModeling.kdicj
│ │ │ ├── Ansi.kdicj
│ │ │ ├── AnsiGreek.kdicj
│ │ │ ├── AnsiGreek_Modeling.kdicj
│ │ │ ├── AnsiLatin.kdicj
│ │ │ ├── AnsiLatinGreek.kdicj
│ │ │ ├── AnsiLatinGreek_Modeling.kdicj
│ │ │ ├── AnsiLatin_Modeling.kdicj
│ │ │ ├── Ansi_Modeling.kdicj
│ │ │ ├── Bytes.kdicj
│ │ │ ├── Customer.kdicj
│ │ │ ├── CustomerExtended.kdicj
│ │ │ ├── D_Modeling.kdicj
│ │ │ ├── Dorothea.kdicj
│ │ │ ├── Greek.kdicj
│ │ │ ├── Greek_Modeling.kdicj
│ │ │ ├── Latin.kdicj
│ │ │ ├── LatinGreek.kdicj
│ │ │ ├── LatinGreek_Modeling.kdicj
│ │ │ ├── Latin_Modeling.kdicj
│ │ │ ├── SpliceJunction.kdicj
│ │ │ └── SpliceJunctionModeling.kdicj
│ ├── reference_paths.txt
│ ├── scenario_generation
│ │ ├── api
│ │ │ ├── build_deployed_dictionary
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── build_dictionary_from_data_table
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── check_database
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── deploy_model
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── detect_data_table_format
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── evaluate_predictor
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── export_dictionary_as_json
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── extract_clusters
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── extract_keys_from_data_table
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── prepare_coclustering_deployment
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── simplify_coclustering
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── sort_data_table
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── train_coclustering
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ ├── train_predictor
│ │ │ │ └── ref
│ │ │ │ │ ├── Adult._kh
│ │ │ │ │ ├── Customer._kh
│ │ │ │ │ └── SpliceJunction._kh
│ │ │ └── train_recoder
│ │ │ │ └── ref
│ │ │ │ ├── Adult._kh
│ │ │ │ ├── Customer._kh
│ │ │ │ └── SpliceJunction._kh
│ │ ├── data_path_deprecation
│ │ │ ├── check_database
│ │ │ │ └── ref
│ │ │ │ │ └── Customer._kh
│ │ │ ├── deploy_model
│ │ │ │ └── ref
│ │ │ │ │ └── Customer._kh
│ │ │ ├── evaluate_predictor
│ │ │ │ └── ref
│ │ │ │ │ └── Customer._kh
│ │ │ ├── train_coclustering
│ │ │ │ └── ref
│ │ │ │ │ └── Customer._kh
│ │ │ ├── train_predictor
│ │ │ │ └── ref
│ │ │ │ │ └── Customer._kh
│ │ │ └── train_recoder
│ │ │ │ └── ref
│ │ │ │ └── Customer._kh
│ │ └── system_settings
│ │ │ └── ref
│ │ │ └── default._kh
│ ├── sklearn
│ │ └── results
│ │ │ ├── khiops.log
│ │ │ ├── khiops_train_cc.log
│ │ │ ├── ref_json_reports
│ │ │ ├── Adult
│ │ │ │ ├── KhiopsClassifier
│ │ │ │ │ └── AllReports.khj
│ │ │ │ ├── KhiopsEncoder
│ │ │ │ │ └── AllReports.khj
│ │ │ │ └── KhiopsRegressor
│ │ │ │ │ └── AllReports.khj
│ │ │ └── SpliceJunction
│ │ │ │ ├── KhiopsClassifier
│ │ │ │ └── AllReports.khj
│ │ │ │ ├── KhiopsCoclustering
│ │ │ │ └── Coclustering.khcj
│ │ │ │ ├── KhiopsEncoder
│ │ │ │ └── AllReports.khj
│ │ │ │ └── KhiopsRegressor
│ │ │ │ └── AllReports.khj
│ │ │ ├── ref_models
│ │ │ ├── Adult
│ │ │ │ ├── KhiopsClassifier
│ │ │ │ │ ├── Modeling.kdic
│ │ │ │ │ └── Modeling.kdicj
│ │ │ │ ├── KhiopsEncoder
│ │ │ │ │ ├── Modeling.kdic
│ │ │ │ │ └── Modeling.kdicj
│ │ │ │ └── KhiopsRegressor
│ │ │ │ │ ├── Modeling.kdic
│ │ │ │ │ └── Modeling.kdicj
│ │ │ └── SpliceJunction
│ │ │ │ ├── KhiopsClassifier
│ │ │ │ ├── Modeling.kdic
│ │ │ │ └── Modeling.kdicj
│ │ │ │ ├── KhiopsCoclustering
│ │ │ │ ├── Coclustering.kdic
│ │ │ │ ├── Coclustering.kdicj
│ │ │ │ └── tmp_cc_deploy_model.kdic
│ │ │ │ ├── KhiopsEncoder
│ │ │ │ ├── Modeling.kdic
│ │ │ │ └── Modeling.kdicj
│ │ │ │ └── KhiopsRegressor
│ │ │ │ ├── Modeling.kdic
│ │ │ │ └── Modeling.kdicj
│ │ │ └── ref_predictions
│ │ │ ├── Adult
│ │ │ ├── KhiopsClassifier
│ │ │ │ └── predict.txt
│ │ │ ├── KhiopsEncoder
│ │ │ │ └── transform.txt
│ │ │ └── KhiopsRegressor
│ │ │ │ └── predict.txt
│ │ │ └── SpliceJunction
│ │ │ ├── KhiopsClassifier
│ │ │ └── predict.txt
│ │ │ ├── KhiopsCoclustering
│ │ │ ├── keys_main_table.txt
│ │ │ ├── raw_keys_main_table.txt
│ │ │ └── transform.txt
│ │ │ ├── KhiopsEncoder
│ │ │ └── transform.txt
│ │ │ └── KhiopsRegressor
│ │ │ └── predict.txt
│ └── tmp
│ │ └── test_error_y_type_must_be_str_when_x_type_is_tuple
│ │ └── Reviews.csv
├── test_core.py
├── test_dataset_class.py
├── test_dataset_errors.py
├── test_estimator_attributes.py
├── test_helper.py
├── test_helper_functions.py
├── test_khiops_integrations.py
├── test_parallel_execution.py
├── test_remote_access.py
├── test_samples.py
├── test_sklearn.py
└── test_sklearn_output_types.py
└── versioneer.py
/.git_commit_template:
--------------------------------------------------------------------------------
1 |
2 | # Title: Start uppercase, no final period and avoid other punctuation
3 | # Should answer "What this change does?"
4 | #
5 | # Optional long description: Preferably bullet points.
6 | # Should answer "Why this change was done?" and "How it is done?"
7 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Commit message template always have Unix endlines
2 | .git_commit_template eol=lf
3 |
4 | # Versioneer
5 | khiops/_version.py export-subst
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/generic-issue-template.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Generic issue template
3 | about: Should be used for all issues of this repository.
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | #### Description
11 | _What, Why_
12 |
13 | #### Questions/Ideas
14 | - _A potential solution__
15 | - _A potential solution detail_
16 | - _A potential problem_
17 | - _Something I still don't understand_
18 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
2 | _Put your message here_
3 |
4 | ---
5 |
6 | ### TODO Before Asking for a Review
7 | - [ ] Rebase your branch to the latest version of `dev` (or `main` for release PRs)
8 | - [ ] Make sure all CI workflows are green
9 | - [ ] When adding a public feature/fix: Update the `Unreleased` section of `CHANGELOG.md` (no date)
10 | - [ ] Self-Review: Review "Files Changed" tab and fix any problems you find
11 | - API Docs (only if there are changes in docstrings, rst files or samples):
12 | - [ ] Check the docs build **without** warning: see the log of the API Docs workflow
13 | - [ ] Check that your changes render well in HTML: download the API Docs artifact and open `index.html`
14 | - If there are any problems it is faster to iterate by [building locally the API Docs](../blob/dev/doc/README.md#build-the-documentation)
15 |
--------------------------------------------------------------------------------
/.github/workflows/quick-checks.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Quick Checks
3 | on:
4 | pull_request:
5 | workflow_dispatch:
6 | concurrency:
7 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8 | cancel-in-progress: true
9 | jobs:
10 | pre-commit:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Checkout sources
14 | uses: actions/checkout@v4
15 | - name: Setup Python
16 | uses: actions/setup-python@v5
17 | with:
18 | python-version: '3.11'
19 | - name: Install khiops-python dev dependencies
20 | run: |
21 | # Extract and install package dependency requirements from metadata
22 | pip install pip-tools
23 | python -m piptools compile -o requirements.txt
24 |
25 | # Install dev dependencies
26 | pip install -r requirements.txt
27 |
28 | # Install black for the samples-generation script
29 | pip install black
30 | - name: Run pre-commit checks
31 | uses: pre-commit/action@v3.0.1
32 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Release
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | version:
7 | description: Version of the release
8 | jobs:
9 | release:
10 | runs-on: ubuntu-22.04
11 | permissions:
12 | contents: write
13 | steps:
14 | - name: Checkout sources
15 | uses: actions/checkout@v4
16 | with:
17 | ref: main
18 | # Get Git tags so that versioneer can function correctly
19 | # See issue https://github.com/actions/checkout/issues/701
20 | fetch-depth: 0
21 | - name: Update "main" branch
22 | run: |-
23 | # Set the git user
24 | git config --global user.name "${{ github.triggering_actor }}"
25 | git config --global user.email "khiops.team@orange.com"
26 |
27 | # Fetch the dev branch
28 | git fetch origin dev
29 | git switch dev # To activate the local copy
30 | git switch main
31 |
32 | # Merge dev into main, tag the merge commit
33 | git merge --no-ff -m'Merge branch 'dev' for release ${{ inputs.version }}' dev
34 | git tag ${{ inputs.version }}
35 |
36 | # Make dev point to main
37 | git switch dev
38 | git reset --hard main
39 |
40 | # Update remotes
41 | git switch dev
42 | git push
43 | git switch main
44 | git push
45 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Editors
2 | .vscode/
3 | .idea/
4 | *.un~
5 |
6 | # Mac/OSX
7 | .DS_Store
8 |
9 | # Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
10 | # Byte-compiled / optimized / DLL files
11 | __pycache__/
12 | *.py[cod]
13 | *$py.class
14 |
15 | # Coverage reports
16 | htmlcov/
17 | .coverage
18 | .coverage.*
19 | .cache
20 | coverage.xml
21 | *.cover
22 | cover/
23 |
24 | # Distribution/packaging
25 | .Python
26 | build/
27 | develop-eggs/
28 | dist/
29 | dowloads/
30 | eggs/
31 | .eggs/
32 | sdist/
33 | wheels/
34 | *.egg-info/
35 | *.egg
36 |
37 | # Backup files
38 | *.bak
39 |
40 | # Jupyter
41 | .ipynb_checkpoints
42 |
43 | # Directories generated by tests
44 | tests/resources/*/output_reports
45 | tests/resources/*/output_kdic
46 | tests/resources/dictionary/copy_output_kdic
47 | tests/resources/scenario_generation/api/*/output
48 | tests/resources/scenario_generation/data_path_deprecation/*/output
49 | tests/resources/scenario_generation/general_options/output
50 | tests/resources/scenario_generation/runner_version/output
51 | tests/resources/*/copy_output_kdic
52 |
53 | # File generated by documentation scripts/notebooks
54 | kh_samples
55 | doc/tutorials/
56 | !doc/tutorials/index.rst
57 | doc/samples/*.txt
58 | doc/samples/kh_samples
59 | doc/samples/my_classifier
60 | doc/core/generated
61 | doc/sklearn/generated
62 | doc/internal/generated
63 | doc/tools/generated
64 | doc/_build/
65 | doc/khiops-python-tutorial
66 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | repos:
3 | - repo: https://github.com/psf/black-pre-commit-mirror
4 | rev: 24.8.0
5 | hooks:
6 | - id: black
7 | language_version: python3
8 | - repo: https://github.com/pycqa/pylint
9 | rev: v3.2.7
10 | hooks:
11 | - id: pylint
12 | language_version: python3
13 | exclude: doc/convert_samples.py|doc/conf.py|versioneer.py|khiops/_version.py|setup.py
14 | - repo: https://github.com/pycqa/isort
15 | rev: 5.13.2
16 | hooks:
17 | - id: isort
18 | language_version: python3
19 | exclude: khiops/samples/samples.py|khiops/samples/samples_sklearn.py
20 | - id: isort
21 | alias: isort-samples
22 | name: isort-samples
23 | language_version: python3
24 | files: khiops/samples/samples.py|khiops/samples/samples_sklearn.py
25 | args: [--no-sections]
26 | - repo: https://github.com/lyz-code/yamlfix/
27 | rev: 1.17.0
28 | hooks:
29 | - id: yamlfix
30 | exclude: packaging/conda/meta.yaml
31 | language: python
32 | - repo: https://github.com/python-jsonschema/check-jsonschema
33 | rev: 0.29.2
34 | hooks:
35 | - id: check-github-workflows
36 | name: gh-workflows
37 | args: [--verbose]
38 | - id: check-github-actions
39 | name: gh-actions
40 | args: [--verbose]
41 | - repo: https://github.com/jumanjihouse/pre-commit-hooks
42 | rev: 3.0.0
43 | hooks:
44 | - id: shellcheck
45 | name: shellcheck
46 | - repo: local
47 | hooks:
48 | - id: samples-generation
49 | name: samples-generation
50 | entry: bash doc/convert-samples-hook
51 | language: system
52 | files: khiops/samples/samples.py|khiops/samples/samples_sklearn.py
53 | pass_filenames: false
54 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The Clear BSD License
2 |
3 | Copyright (c) 2024 Orange S.A.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted (subject to the limitations in the disclaimer
8 | below) provided that the following conditions are met:
9 |
10 | * Redistributions of source code must retain the above copyright notice,
11 | this list of conditions and the following disclaimer.
12 |
13 | * Redistributions in binary form must reproduce the above copyright
14 | notice, this list of conditions and the following disclaimer in the
15 | documentation and/or other materials provided with the distribution.
16 |
17 | * Neither the name of the copyright holder nor the names of its
18 | contributors may be used to endorse or promote products derived from this
19 | software without specific prior written permission.
20 |
21 | NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
22 | THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
23 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
29 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
30 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | POSSIBILITY OF SUCH DAMAGE.
33 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | recursive-exclude cicd *
2 | recursive-exclude tests *
3 | recursive-exclude doc *
4 | exclude .git*
5 | exclude CONTRIBUTING.md
6 | exclude MANIFEST.in
7 | exclude pyproject.toml
8 | exclude sonar-project.properties
9 | exclude test-requirements.txt
10 | include khiops/samples/*.ipynb
11 | include khiops/_version.py
12 | include khiops/core/scenarios/**/*._kh*
13 | include versioneer.py
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Khiops Python Library
2 |
3 | This is the repository of the **Khiops Python Library** for the [Khiops AutoML suite][khiops].
4 |
5 | ## Description
6 | Khiops is a robust AutoML suite for constructing supervised models (classifiers, regressors and
7 | encoders) and unsupervised models (coclusterings). With this package you can use Khiops via Python
8 | in two ways:
9 | - with the module `khiops.core`: To use Khiops in its native way (Khiops dictionary files +
10 | tabular data files as input)
11 | - with the module `khiops.sklearn`: To use Khiops with Scikit-Learn estimator objects (Pandas
12 | dataframes or NumPy arrays as input)
13 |
14 | ## Installation
15 |
16 | ```bash
17 | conda install -c conda-forge -c khiops khiops
18 | ```
19 | Other install methods are documented at the [Khiops website][khiops-install].
20 |
21 | ### Requirements
22 | - [Python][python] (>=3.8)
23 | - [Pandas][pandas] (>=0.25.3)
24 | - [Scikit-Learn][sklearn] (>=0.22.2)
25 |
26 | [pandas]: https://pandas.pydata.org
27 | [sklearn]: https://scikit-learn.org/stable
28 |
29 | ## Documentation
30 | The API Docs for the Khiops Python library are available [here][khiops-api-docs]. Other
31 | documentation (algorithms, installation etc.) can be found on the [Khiops site][khiops].
32 |
33 | The library itself is documented with docstrings: for example, to obtain help on the
34 | `KhiopsClassifier` estimator and on the `train_predictor` function, respectively,
35 | you can use:
36 | ```python
37 | from khiops.sklearn import KhiopsClassifier
38 | help(KhiopsClassifier)
39 |
40 | from khiops import core as kh
41 | help(kh.train_predictor)
42 | ```
43 |
44 | ## License
45 | The Khiops Python library is distributed under the BSD 3-Clause-clear License, the text
46 | of which is available at
47 | https://spdx.org/licenses/BSD-3-Clause-Clear.html or see the [LICENSE.md](./LICENSE.md) for more
48 | details.
49 |
50 | ## Credits
51 | The Khiops Python library is currently developed at [Orange Innovation][o-innov] by the Khiops
52 | Team: khiops.team@orange.com .
53 |
54 | [khiops]: https://khiops.org
55 | [khiops-install]: https://khiops.org/setup
56 | [khiops-api-docs]: https://khiopsml.github.io/khiops-python
57 | [python]: https://www.python.org
58 | [pandas]: https://pandas.pydata.org
59 | [sklearn]: https://scikit-learn.org/stable
60 | [boto3]: https://github.com/boto/boto3
61 | [gcs]: https://github.com/googleapis/python-storage
62 | [o-innov]: https://hellofuture.orange.com/en/
63 |
--------------------------------------------------------------------------------
/doc/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/doc/README.md
--------------------------------------------------------------------------------
/doc/_static/css/custom.css:
--------------------------------------------------------------------------------
1 | /* Custom header sizes */
2 | h1 {
3 | font-size: 1.85em;
4 | }
5 |
6 | h2 {
7 | font-size: 1.55em;
8 | }
9 |
10 | h3 {
11 | font-size: 1.30em;
12 | }
13 |
14 | h4 {
15 | font-size: 1.10em;
16 | }
17 |
18 | h5 {
19 | font-size: 0.90em;
20 | }
21 |
22 | img.sidebar-logo {
23 | width: 40px;
24 | }
25 |
--------------------------------------------------------------------------------
/doc/_static/images/khiops_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/doc/_static/images/khiops_logo.png
--------------------------------------------------------------------------------
/doc/_static/images/new_khiops_logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/doc/_static/images/new_khiops_logo_with_border.svg:
--------------------------------------------------------------------------------
1 |
2 |
49 |
--------------------------------------------------------------------------------
/doc/_static/images/orange_small_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/doc/_static/images/orange_small_logo.png
--------------------------------------------------------------------------------
/doc/_templates/autosummary/class.rst:
--------------------------------------------------------------------------------
1 | {{ name | escape | underline}}
2 | Class in module ``{{ module }}``
3 |
4 | .. currentmodule:: {{ module }}
5 |
6 | .. autoclass:: {{ objname }}
7 |
8 | {% block methods %}
9 | {% if methods %}
10 | .. rubric:: {{ _('Methods') }}
11 | .. autosummary::
12 | :nosignatures:
13 | {% for item in methods %}
14 | {% if item != "__init__" %}
15 | ~{{ item }}
16 | {% endif %}
17 | {%- endfor %}
18 | {% endif %}
19 | {% endblock %}
20 |
21 | {% block attributes %}
22 | {% if attributes %}
23 | .. rubric:: {{ _('Attributes') }}
24 | .. autosummary::
25 | {% for item in attributes %}
26 | ~{{ name }}.{{ item }}
27 | {%- endfor %}
28 | {% endif %}
29 | {% endblock %}
30 |
--------------------------------------------------------------------------------
/doc/_templates/autosummary/function.rst:
--------------------------------------------------------------------------------
1 | {{ name | escape | underline}}
2 |
3 | .. currentmodule:: {{ module }}
4 |
5 | .. auto{{ objtype }}:: {{ objname }}
6 |
--------------------------------------------------------------------------------
/doc/_templates/autosummary/method.rst:
--------------------------------------------------------------------------------
1 | {{ "EU + " name | escape | underline}}
2 |
3 | .. currentmodule:: {{ module }}
4 |
5 | .. auto{{ objtype }}:: {{ objname }}
6 |
--------------------------------------------------------------------------------
/doc/_templates/autosummary/module.rst:
--------------------------------------------------------------------------------
1 | {{ fullname | replace("khiops.", "") | escape | underline }}
2 |
3 | Submodule of ``{{ module }}``
4 |
5 | .. automodule:: {{ fullname }}
6 |
7 | {% block attributes %}
8 | {% if attributes %}
9 | .. rubric:: {{ _('Module Attributes') }}
10 |
11 | .. autosummary::
12 | {% for item in attributes %}
13 | {{ item }}
14 | {%- endfor %}
15 | {% endif %}
16 | {% endblock %}
17 |
18 | {% block functions %}
19 | {% if functions %}
20 | {{ _('Functions') }}
21 | --------------------
22 |
23 | .. autosummary::
24 | :nosignatures:
25 | {% for item in functions %}
26 | {{ item }}
27 |
28 | {%- endfor %}
29 | {% endif %}
30 | {% endblock %}
31 |
32 | {% block classes %}
33 | {% if classes %}
34 | {{ _('Classes') }}
35 | ------------------
36 |
37 | .. autosummary::
38 | :nosignatures:
39 | {% for item in classes %}
40 | {{ item }}
41 | {%- endfor %}
42 | {% endif %}
43 | {% endblock %}
44 |
45 | {% block exceptions %}
46 | {% if exceptions %}
47 | .. rubric:: {{ _('Exceptions') }}
48 |
49 | .. autosummary::
50 | {% for item in exceptions %}
51 | {{ item }}
52 | {%- endfor %}
53 | {% endif %}
54 | {% endblock %}
55 |
56 | {% block modules %}
57 | {% if modules %}
58 | Modules
59 | -------
60 |
61 | .. autosummary::
62 | :toctree:
63 | :recursive:
64 | {% for item in modules %}
65 | {{ item }}
66 | {%- endfor %}
67 | {% endif %}
68 | {% endblock %}
69 |
--------------------------------------------------------------------------------
/doc/clean-doc:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # ARG_OPTIONAL_BOOLEAN([clean-tutorial],[],[Cleans the tutorial's directory. Build takes considerably longer after this.])
4 | # ARG_HELP([Cleans the generated documentation])
5 | # ARGBASH_GO()
6 | # needed because of Argbash --> m4_ignore([
7 | ### START OF CODE GENERATED BY Argbash v2.9.0 one line above ###
8 | # Argbash is a bash code generator used to get arguments parsing right.
9 | # Argbash is FREE SOFTWARE, see https://argbash.io for more info
10 | # Generated online by https://argbash.io/generate
11 |
12 |
13 | die()
14 | {
15 | local _ret="${2:-1}"
16 | test "${_PRINT_HELP:-no}" = yes && print_help >&2
17 | echo "$1" >&2
18 | exit "${_ret}"
19 | }
20 |
21 |
22 | begins_with_short_option()
23 | {
24 | local first_option all_short_options='h'
25 | first_option="${1:0:1}"
26 | test "$all_short_options" = "${all_short_options/$first_option/}" && return 1 || return 0
27 | }
28 |
29 | # THE DEFAULTS INITIALIZATION - OPTIONALS
30 | _arg_clean_tutorial="off"
31 |
32 |
33 | print_help()
34 | {
35 | printf '%s\n' "Cleans the generated documentation"
36 | printf 'Usage: %s [--(no-)clean-tutorial] [-h|--help]\n' "$0"
37 | printf '\t%s\n' "--clean-tutorial, --no-clean-tutorial: Cleans the tutorial's directory. Build takes considerably longer after this. (off by default)"
38 | printf '\t%s\n' "-h, --help: Prints help"
39 | }
40 |
41 |
42 | parse_commandline()
43 | {
44 | while test $# -gt 0
45 | do
46 | _key="$1"
47 | case "$_key" in
48 | --no-clean-tutorial|--clean-tutorial)
49 | _arg_clean_tutorial="on"
50 | test "${1:0:5}" = "--no-" && _arg_clean_tutorial="off"
51 | ;;
52 | -h|--help)
53 | print_help
54 | exit 0
55 | ;;
56 | -h*)
57 | print_help
58 | exit 0
59 | ;;
60 | *)
61 | _PRINT_HELP=yes die "FATAL ERROR: Got an unexpected argument '$1'" 1
62 | ;;
63 | esac
64 | shift
65 | done
66 | }
67 |
68 | parse_commandline "$@"
69 |
70 | # OTHER STUFF GENERATED BY Argbash
71 |
72 | ### END OF CODE GENERATED BY Argbash (sortof) ### ])
73 | # [ <-- needed because of Argbash
74 |
75 | rm -v core/generated/*.rst
76 | rm -v sklearn/generated/*.rst
77 | rm -v internal/generated/*.rst
78 | rm -v tools/generated/*.rst
79 | sphinx-build -M clean . _build
80 |
81 | if [[ $_arg_clean_tutorial == "on" ]]
82 | then
83 | rm -rfv khiops-python-tutorial
84 | rm -rfv ./tutorials
85 | fi
86 |
87 | # ] <-- needed because of Argbash
88 |
--------------------------------------------------------------------------------
/doc/convert-samples-hook:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -euo pipefail
3 |
4 | # Set the documentation and samples directories
5 | DOC_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
6 | SAMPLES_DIR="$(dirname "$DOC_DIR")/khiops/samples"
7 |
8 | # Generate the rEST pages
9 | python "$DOC_DIR/convert_samples.py" -f rst "$SAMPLES_DIR" "$DOC_DIR/samples/samples.rst"
10 | python "$DOC_DIR/convert_samples.py" --sklearn -f rst "$SAMPLES_DIR" "$DOC_DIR/samples/samples_sklearn.rst"
11 |
12 | # Generate the notebooks
13 | python "$DOC_DIR/convert_samples.py" "$SAMPLES_DIR" "$SAMPLES_DIR/samples.ipynb"
14 | python "$DOC_DIR/convert_samples.py" --sklearn "$SAMPLES_DIR" "$SAMPLES_DIR/samples_sklearn.ipynb"
15 |
--------------------------------------------------------------------------------
/doc/core/index.rst:
--------------------------------------------------------------------------------
1 | =============
2 | khiops.core
3 | =============
4 | .. automodule:: khiops.core
5 |
6 | .. note::
7 | Input types in this module are flexible. See :doc:`../notes`.
8 |
9 | .. note::
10 | For convenience, the public members of the above modules are imported to the ``core`` namespace.
11 | For example the function `~.api.train_predictor` can be used as follows::
12 |
13 | from khiops import core as kh
14 | kh.train_predictor(...)
15 |
16 | Main Modules
17 | ============
18 | .. autosummary::
19 | :toctree: generated
20 | :recursive:
21 | :nosignatures:
22 |
23 | api
24 | dictionary
25 | analysis_results
26 | coclustering_results
27 | exceptions
28 | helpers
29 |
--------------------------------------------------------------------------------
/doc/create-doc:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -euo pipefail
3 |
4 | # Obtain this script's dir
5 | SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
6 |
7 | # Default parameter values
8 | TRANSFORM_NOTEBOOKS=""
9 | DOWNLOAD_REPO=""
10 | DEFAULT_KHIOPS_TUTORIAL_REPO_URL="git@github.com:KhiopsML/khiops-python-tutorial.git"
11 | DEFAULT_KHIOPS_TUTORIAL_DIR="${SCRIPT_DIR}/khiops-python-tutorial"
12 |
13 | # Function to display the usage help
14 | usage() {
15 | echo "Usage: create-doc [-r REPO_URL] [-d] [-t] [-l]"
16 | echo "Options:"
17 | echo " -d: Downloads the Khiops tutorial repository. Implies -t. See also -r."
18 | echo " -t: Transform the Khiops Jupyter notebooks tutorials into reST."
19 | echo " -r: Set the Khiops tutorial repository. The default is"
20 | echo " '$DEFAULT_KHIOPS_TUTORIAL_REPO_URL'."
21 | echo " -l: Directory of the local copy of the khiops tutorial repository. The default is"
22 | echo " '$DEFAULT_KHIOPS_TUTORIAL_DIR'."
23 | echo ""
24 | }
25 |
26 | exit_bad() {
27 | usage
28 | exit 1
29 | }
30 |
31 | # Read command line arguments
32 | while getopts "dtr:l:" opt
33 | do
34 | case "$opt" in
35 | d ) DOWNLOAD_REPO=true && TRANSFORM_NOTEBOOKS="true" ;;
36 | t ) TRANSFORM_NOTEBOOKS="true" ;;
37 | r ) KHIOPS_TUTORIAL_REPO_URL="$OPTARG" ;;
38 | l ) KHIOPS_TUTORIAL_REPO_DIR="$OPTARG" ;;
39 | * ) exit_bad ;;
40 | esac
41 | done
42 | KHIOPS_TUTORIAL_REPO_URL="${KHIOPS_TUTORIAL_REPO_URL:-$DEFAULT_KHIOPS_TUTORIAL_REPO_URL}"
43 | KHIOPS_TUTORIAL_REPO_DIR="${KHIOPS_TUTORIAL_REPO_DIR:-$DEFAULT_KHIOPS_TUTORIAL_DIR}"
44 |
45 |
46 | # Add the khiops directory to the Python path
47 | if [[ -z "${PYTHONPATH+x}" ]]
48 | then
49 | export PYTHONPATH=".."
50 | else
51 | export PYTHONPATH="$PYTHONPATH:.."
52 | fi
53 |
54 | # Check command existence
55 | command_requirements="tar python make zip"
56 | if [[ $DOWNLOAD_REPO ]]
57 | then
58 | command_requirements="$command_requirements git"
59 | fi
60 | for command_name in $command_requirements
61 | do
62 | if ! command -v "$command_name" &> /dev/null
63 | then
64 | echo "Required command '$command_name' not found in path, aborting"
65 | exit 1
66 | fi
67 | done
68 |
69 | # Clone the Khiops tutorial repository
70 | if [[ $DOWNLOAD_REPO ]]
71 | then
72 | echo "Obtaining khiops-python-tutorial"
73 | rm -rf "$KHIOPS_TUTORIAL_REPO_DIR"
74 | khiops_python_tutorial_repo_branch="main"
75 | git clone --depth 1 --branch="$khiops_python_tutorial_repo_branch" \
76 | "$KHIOPS_TUTORIAL_REPO_URL" "$KHIOPS_TUTORIAL_REPO_DIR" \
77 | && rm -rf "$KHIOPS_TUTORIAL_REPO_DIR/.git"
78 | fi
79 |
80 | # Convert tutorials to reST
81 | tutorials_dir="$(realpath ./tutorials)"
82 | mkdir -p "$tutorials_dir"
83 | if [[ $TRANSFORM_NOTEBOOKS ]]
84 | then
85 | echo "Creating reST tutorial pages"
86 | python convert_tutorials.py \
87 | --execute-notebooks "$KHIOPS_TUTORIAL_REPO_DIR" "$tutorials_dir"
88 | fi
89 |
90 |
91 | # Create the coursework materials
92 | echo "Creating ZIP files"
93 | cd "$tutorials_dir"
94 | mkdir -p exercises
95 | touch exercises/.dummy # Create a dummy so the "exercises" directory is created on unzip
96 | zip "core_tutorials_solutions.zip" Core*.ipynb data/*/* exercises/.dummy
97 | zip "sklearn_tutorials_solutions.zip" Sklearn*.ipynb data/*/* exercises/.dummy
98 | cd "$KHIOPS_TUTORIAL_REPO_DIR"
99 | python create-coursework.py
100 | cd coursework
101 | mkdir -p exercises
102 | touch exercises/.dummy # Create a dummy so the "exercises" directory is created on unzip
103 | zip "$tutorials_dir/core_tutorials.zip" Core*.ipynb data/*/* exercises/.dummy
104 | zip "$tutorials_dir/sklearn_tutorials.zip" Sklearn*.ipynb data/*/* exercises/.dummy
105 | cd "../.."
106 |
107 | # Create the documentation with Sphinx
108 | echo "Executing Sphinx"
109 | sphinx-build -M html . _build/
110 |
--------------------------------------------------------------------------------
/doc/index.rst:
--------------------------------------------------------------------------------
1 |
2 | Khiops Python API Docs
3 | ======================
4 |
5 | Welcome to the Khiops Python API documentation page.
6 |
7 | Installation
8 | ------------
9 | Khiops is better installed with `conda package manager `_
10 |
11 | .. code-block:: shell
12 |
13 | conda install -c conda-forge -c khiops khiops
14 |
15 | More details and other install methods are documented at the `Khiops website
16 | `_.
17 |
18 |
19 | Main Submodules
20 | ---------------
21 | This package contains the following main submodules.
22 |
23 | ``sklearn`` submodule
24 | ~~~~~~~~~~~~~~~~~~~~~
25 | The :doc:`sklearn/index` module is a `Scikit-learn `_ based interface to
26 | Khiops. Use it if you are just started using Khiops and are familiar with the Scikit-learn workflow
27 | based on dataframes and estimator classes.
28 |
29 | ``core`` submodule
30 | ~~~~~~~~~~~~~~~~~~
31 | The :doc:`core/index` module is a pure Python library exposing all Khiops functionalities. Use it if
32 | you are familiar with the Khiops workflow based on plain-text tabular data files and dictionary
33 | files (``.kdic``).
34 |
35 | .. toctree::
36 | :caption: API Reference
37 | :hidden:
38 |
39 | sklearn
40 | core
41 | tools
42 | internals
43 |
44 | .. toctree::
45 | :caption: Tutorials and Code Samples
46 | :hidden:
47 |
48 | Tutorials
49 | samples/samples_sklearn
50 | Samples core
51 |
52 | .. toctree::
53 | :caption: Other Topics
54 | :hidden:
55 |
56 | multi_table_primer
57 | notes
58 |
59 |
--------------------------------------------------------------------------------
/doc/internal/index.rst:
--------------------------------------------------------------------------------
1 | Internals
2 | =========
3 | These are internal modules with no "data science" functionality. Their documentation is available
4 | for completeness.
5 |
6 | .. currentmodule:: khiops.sklearn
7 | .. autosummary::
8 | :nosignatures:
9 | :toctree: generated
10 |
11 | dataset
12 |
13 | .. currentmodule:: khiops.core.internals
14 | .. autosummary::
15 | :nosignatures:
16 | :toctree: generated
17 |
18 | common
19 | filesystems
20 | io
21 | runner
22 | scenario
23 | task
24 | types
25 | version
26 |
--------------------------------------------------------------------------------
/doc/requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx>=6.1.0
2 | furo>=2022.12.7
3 | ipykernel>=6.9.1
4 | nbconvert==6.4.4
5 | nbformat==5.3.0
6 | numpydoc>=1.5.0
7 | pandas>=0.25.3
8 | scikit-learn>=0.22.2
9 | sphinx-copybutton>=0.5.0
10 |
--------------------------------------------------------------------------------
/doc/sklearn/index.rst:
--------------------------------------------------------------------------------
1 | khiops.sklearn
2 | ==============
3 | .. note::
4 | For convenience, the public members of the above modules are imported to the
5 | ``sklearn`` namespace. For example the estimator class
6 | `~.sklearn.estimators.KhiopsClassifier` can be imported as follows::
7 |
8 | from khiops.sklearn import KhiopsClassifier
9 | clf = KhiopsClassifier()
10 |
11 | .. currentmodule:: khiops.sklearn
12 | .. autosummary::
13 | :toctree: generated
14 | :recursive:
15 | :nosignatures:
16 |
17 | estimators
18 |
19 | Related Docs
20 | ------------
21 | - :doc:`../samples/samples_sklearn`
22 | - :doc:`../notes`
23 |
--------------------------------------------------------------------------------
/doc/tools/index.rst:
--------------------------------------------------------------------------------
1 | Tools
2 | =====
3 | These are auxiliary tools for the Khiops Python library.
4 |
5 | .. currentmodule:: khiops
6 | .. autosummary::
7 | :toctree: generated
8 | :nosignatures:
9 |
10 | tools
11 |
--------------------------------------------------------------------------------
/doc/tutorials/index.rst:
--------------------------------------------------------------------------------
1 | Tutorials
2 | =========
3 |
4 | Sklearn
5 | -------
6 | These :download:`Jupyter notebook tutorials ` cover the basic usage of the ``sklearn`` Khiops sub-module. The solution notebooks are :download:`available here ` or you can browse them in this page:
7 |
8 | - :doc:`Sklearn Basics 1 - Train, Evaluate and Deploy a Classifier`
9 | - :doc:`Sklearn Basics 2 - Train a Classifier on a Star Multi-Table Dataset`
10 | - :doc:`Sklearn Basics 3 - Train a Classifier on a Snowflake Multi-Table Dataset`
11 | - :doc:`Sklearn Basics 4 - Train a Coclustering`
12 |
13 | Core
14 | ----
15 | These :download:`Jupyter notebook tutorials ` cover the basic usage of the ``core`` Khiops sub-module. The solution notebooks are :download:`available here ` or you can browse them in this page:
16 |
17 | - :doc:`Core Basics 1 - Train, Evaluate and Deploy a Classifier`
18 | - :doc:`Core Basics 2 - Train a Classifier on a Star Multi-Table Dataset`
19 | - :doc:`Core Basics 3 - Train a Classifier on a Snowflake Multi-Table Dataset`
20 | - :doc:`Core Basics 4 - Train a Coclustering`
21 |
--------------------------------------------------------------------------------
/khiops/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """
8 | The main module of the Khiops Python package.
9 |
10 | Example:
11 | from khiops import core as kh
12 | kh.train_predictor(...)
13 |
14 | The available sub-modules inside the package are:
15 |
16 | - core/api: main API to execute Khiops in its native way
17 | - core/dictionary: Classes to manipulate Khiops dictionaries JSON files
18 | (extension ".kdicj")
19 | - core/analysis_results: Classes to inspect Khiops JSON report files
20 | (extension ".khj")
21 | - core/coclustering_results: Classes to instpect Khiops Coclustering report files
22 | (extension ".khcj")
23 | - sklearn: Scikit-Learn estimator classes to learn and use Khiops models
24 | """
25 | import importlib
26 | import importlib.util
27 | import os
28 | import sys
29 | import warnings
30 | from copy import copy
31 | from pathlib import Path
32 |
33 | from khiops._version import get_versions
34 | from khiops.core.internals.version import KhiopsVersion
35 |
36 | __version__ = get_versions()["version"]
37 | del get_versions
38 |
39 |
40 | def get_compatible_khiops_version():
41 | """Returns the latest Khiops version compatible with this package's version"""
42 |
43 | # Define auxiliary function to remove trailing and old pre-release chars
44 | def remove_trailing_chars(version_part):
45 | if "+" in version_part:
46 | clean_version_part = version_part[: version_part.index("+")]
47 | else:
48 | clean_version_part = version_part
49 | if "b" in clean_version_part:
50 | clean_version_part = clean_version_part[: clean_version_part.index("b")]
51 | return clean_version_part
52 |
53 | # Build the Khiops Python version without the snapshot part
54 | khiops_version_parts = __version__.split(".")
55 | if len(khiops_version_parts) < 3:
56 | raise ValueError(f"Invalid Khiops Python version '{__version__}'")
57 | khiops_version_major = remove_trailing_chars(khiops_version_parts[0])
58 | khiops_version_minor = remove_trailing_chars(khiops_version_parts[1])
59 | khiops_version_patch = remove_trailing_chars(khiops_version_parts[2])
60 | return KhiopsVersion(
61 | f"{khiops_version_major}.{khiops_version_minor}.{khiops_version_patch}"
62 | )
63 |
--------------------------------------------------------------------------------
/khiops/core/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Pure Python library for the Khiops AutoML suite"""
8 | from khiops.core.analysis_results import *
9 | from khiops.core.api import *
10 | from khiops.core.coclustering_results import *
11 | from khiops.core.dictionary import *
12 | from khiops.core.exceptions import *
13 | from khiops.core.helpers import *
14 | from khiops.core.internals.runner import get_runner, set_runner
15 |
--------------------------------------------------------------------------------
/khiops/core/exceptions.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Khiops Python exception classes"""
8 |
9 |
10 | class KhiopsJSONError(Exception):
11 | """Parsing error for Khiops-generated JSON files"""
12 |
13 |
14 | class KhiopsRuntimeError(Exception):
15 | """Khiops execution related errors"""
16 |
17 |
18 | class KhiopsEnvironmentError(Exception):
19 | """Khiops execution environment error
20 |
21 | Example: Khiops binary not found.
22 | """
23 |
--------------------------------------------------------------------------------
/khiops/core/internals/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """API internal implementation"""
8 | # Bring all tasks to the namespace of internals
9 | from khiops.core.internals import tasks
10 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Tasks module
8 |
9 | This is a "read-only" module that registers all the task definition at __init__ time.
10 | """
11 | from khiops.core.internals.task import KhiopsTask, get_task_registry
12 | from khiops.core.internals.tasks import (
13 | build_deployed_dictionary,
14 | build_dictionary_from_data_table,
15 | check_database,
16 | deploy_model,
17 | detect_data_table_format,
18 | detect_data_table_format_with_dictionary,
19 | evaluate_predictor,
20 | export_dictionary_as_json,
21 | extract_clusters,
22 | extract_keys_from_data_table,
23 | interpret_predictor,
24 | prepare_coclustering_deployment,
25 | reinforce_predictor,
26 | simplify_coclustering,
27 | sort_data_table,
28 | train_coclustering,
29 | train_instance_variable_coclustering,
30 | train_predictor,
31 | train_recoder,
32 | )
33 |
34 | # Register the tasks in each module
35 | task_modules = [
36 | build_deployed_dictionary,
37 | build_dictionary_from_data_table,
38 | check_database,
39 | deploy_model,
40 | detect_data_table_format,
41 | detect_data_table_format_with_dictionary,
42 | evaluate_predictor,
43 | export_dictionary_as_json,
44 | extract_clusters,
45 | extract_keys_from_data_table,
46 | interpret_predictor,
47 | reinforce_predictor,
48 | prepare_coclustering_deployment,
49 | simplify_coclustering,
50 | sort_data_table,
51 | train_coclustering,
52 | train_instance_variable_coclustering,
53 | train_predictor,
54 | train_recoder,
55 | ]
56 | for task_module in task_modules:
57 | assert isinstance(task_module.TASKS, list)
58 | for task in task_module.TASKS:
59 | assert isinstance(task, KhiopsTask)
60 | task_registry = get_task_registry()
61 | task_registry.register_task(task)
62 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/build_deployed_dictionary.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """build_deployed_dictionary task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "build_deployed_dictionary",
16 | "khiops",
17 | "10.0.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("dictionary_name", StringLikeType),
21 | ("output_dictionary_file_path", StringLikeType),
22 | ],
23 | [],
24 | ["dictionary_file_path", "output_dictionary_file_path"],
25 | # fmt: off
26 | """
27 | // Dictionary file and class settings
28 | ClassManagement.OpenFile
29 | ClassFileName __dictionary_file_path__
30 | OK
31 |
32 | // Transfer settings
33 | LearningTools.TransferDatabase
34 | ClassName __dictionary_name__
35 | BuildTransferredClass
36 | ClassFileName __output_dictionary_file_path__
37 | OK
38 | Exit
39 | """,
40 | # fmt: on
41 | ),
42 | ]
43 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/build_dictionary_from_data_table.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """build_dictionary_from_data_table task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import BoolType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "build_dictionary_from_data_table",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("data_table_path", StringLikeType),
20 | ("output_dictionary_name", StringLikeType),
21 | ("output_dictionary_file_path", StringLikeType),
22 | ],
23 | [
24 | ("detect_format", BoolType, True),
25 | ("header_line", BoolType, True),
26 | ("field_separator", StringLikeType, ""),
27 | ],
28 | ["data_table_path", "output_dictionary_file_path"],
29 | # fmt: off
30 | """
31 | // Dictionary building settings
32 | ClassManagement.ManageClasses
33 | BuildClassDefButton
34 | SourceDataTable.DatabaseSpec.Data.DatabaseName __data_table_path__
35 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed __header_line__
36 | SourceDataTable.DatabaseSpec.Data.FieldSeparator __field_separator__
37 | __OPT__
38 | __detect_format__
39 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
40 | __END_OPT__
41 | BuildClassDef
42 | ClassName __output_dictionary_name__
43 | OK
44 | Exit
45 |
46 | // Save dictionary
47 | ClassFileName __output_dictionary_file_path__
48 | OK
49 | Exit
50 | """,
51 | # fmt: on
52 | ),
53 | ]
54 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/check_database.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """check_database task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import (
10 | BoolType,
11 | DictType,
12 | FloatType,
13 | IntType,
14 | StringLikeType,
15 | )
16 |
17 | # Disable long lines to have readable scenarios
18 | # pylint: disable=line-too-long
19 | TASKS = [
20 | tm.KhiopsTask(
21 | "check_database",
22 | "khiops",
23 | "10.6.0-b.0",
24 | [
25 | ("dictionary_file_path", StringLikeType),
26 | ("dictionary_name", StringLikeType),
27 | ("data_table_path", StringLikeType),
28 | ],
29 | [
30 | ("detect_format", BoolType, True),
31 | ("header_line", BoolType, True),
32 | ("field_separator", StringLikeType, ""),
33 | ("sample_percentage", FloatType, 100.0),
34 | ("sampling_mode", StringLikeType, "Include sample"),
35 | ("selection_variable", StringLikeType, ""),
36 | ("selection_value", StringLikeType, ""),
37 | ("additional_data_tables", DictType(StringLikeType, StringLikeType), None),
38 | ("max_messages", IntType, 20),
39 | ],
40 | ["dictionary_file_path", "data_table_path", "additional_data_tables"],
41 | # fmt: off
42 | """
43 | // Dictionary file and class settings
44 | ClassManagement.OpenFile
45 | ClassFileName __dictionary_file_path__
46 | OK
47 |
48 | // Train database settings
49 | TrainDatabase.ClassName __dictionary_name__
50 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
51 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName __data_table_path__
52 | __DICT__
53 | __additional_data_tables__
54 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
55 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName
56 | __END_DICT__
57 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed __header_line__
58 | TrainDatabase.DatabaseSpec.Data.FieldSeparator __field_separator__
59 | __OPT__
60 | __detect_format__
61 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
62 | __END_OPT__
63 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage __sample_percentage__
64 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode __sampling_mode__
65 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute __selection_variable__
66 | TrainDatabase.DatabaseSpec.Selection.SelectionValue __selection_value__
67 |
68 | // Log messages limit
69 | AnalysisSpec.SystemParameters.MaxErrorMessageNumberInLog __max_messages__
70 |
71 | // Execute check database
72 | LearningTools.CheckData
73 | """,
74 | # fmt: on
75 | ),
76 | ]
77 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/detect_data_table_format.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """detect_data_table_format task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "detect_data_table_format",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("data_table_path", StringLikeType),
20 | ],
21 | [],
22 | ["data_table_path"],
23 | # fmt: off
24 | """
25 | // Detect format on the "Build Dictionary" window
26 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
27 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName __data_table_path__
28 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
29 | """,
30 | # fmt: on
31 | ),
32 | ]
33 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/detect_data_table_format_with_dictionary.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """detect_data_table_format_with_dictionary task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "detect_data_table_format_with_dictionary",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("dictionary_name", StringLikeType),
21 | ("data_table_path", StringLikeType),
22 | ],
23 | [],
24 | ["dictionary_file_path", "data_table_path"],
25 | # fmt: off
26 | """
27 | // Dictionary file and class settings
28 | ClassManagement.OpenFile
29 | ClassFileName __dictionary_file_path__
30 | OK
31 |
32 | TrainDatabase.ClassName __dictionary_name__
33 |
34 | // Detect format the data table format on the "Extract Keys" window
35 | LearningTools.ExtractKeysFromDataTable
36 | SourceDataTable.DatabaseSpec.Data.DatabaseName __data_table_path__
37 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
38 | Exit
39 | """,
40 | # fmt: on
41 | ),
42 | ]
43 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/evaluate_predictor.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """evaluate_predictor task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import BoolType, DictType, FloatType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "evaluate_predictor",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("train_dictionary_name", StringLikeType),
21 | ("data_table_path", StringLikeType),
22 | ("evaluation_report_file_path", StringLikeType),
23 | ],
24 | [
25 | ("detect_format", BoolType, True),
26 | ("header_line", BoolType, True),
27 | ("field_separator", StringLikeType, ""),
28 | ("sample_percentage", FloatType, 100.0),
29 | ("sampling_mode", StringLikeType, "Include sample"),
30 | ("selection_variable", StringLikeType, ""),
31 | ("selection_value", StringLikeType, ""),
32 | ("additional_data_tables", DictType(StringLikeType, StringLikeType), None),
33 | ("main_target_value", StringLikeType, ""),
34 | ],
35 | [
36 | "dictionary_file_path",
37 | "data_table_path",
38 | "evaluation_report_file_path",
39 | "additional_data_tables",
40 | ],
41 | # fmt: off
42 | """
43 | // Dictionary file settings
44 | ClassManagement.OpenFile
45 | ClassFileName __dictionary_file_path__
46 | OK
47 |
48 | // Evaluate predictor settings
49 | LearningTools.EvaluatePredictors
50 | MainTargetModality __main_target_value__
51 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
52 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName __data_table_path__
53 | __DICT__
54 | __additional_data_tables__
55 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
56 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName
57 | __END_DICT__
58 | EvaluationDatabase.DatabaseSpec.Data.HeaderLineUsed __header_line__
59 | EvaluationDatabase.DatabaseSpec.Data.FieldSeparator __field_separator__
60 | __OPT__
61 | __detect_format__
62 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
63 | __END_OPT__
64 | EvaluationDatabase.DatabaseSpec.Sampling.SampleNumberPercentage __sample_percentage__
65 | EvaluationDatabase.DatabaseSpec.Sampling.SamplingMode __sampling_mode__
66 | EvaluatedPredictors.List.Key __train_dictionary_name__
67 | EvaluationDatabase.DatabaseSpec.Selection.SelectionAttribute __selection_variable__
68 | EvaluationDatabase.DatabaseSpec.Selection.SelectionValue __selection_value__
69 | ExportAsXls false
70 | EvaluationFileName __evaluation_report_file_path__
71 |
72 | // Evaluate predictor
73 | EvaluatePredictors
74 | Exit
75 | """,
76 | # fmt: on
77 | ),
78 | ]
79 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/export_dictionary_as_json.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """export_dictionary_as_json task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "export_dictionary_as_json",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("json_dictionary_file_path", StringLikeType),
21 | ],
22 | [],
23 | ["dictionary_file_path", "json_dictionary_file_path"],
24 | """
25 | // Dictionary file settings
26 | ClassManagement.OpenFile
27 | ClassFileName __dictionary_file_path__
28 | OK
29 |
30 | // Export dictionary as JSON file
31 | ClassManagement.ExportAsJSON
32 | JSONFileName __json_dictionary_file_path__
33 | OK
34 | """,
35 | ),
36 | ]
37 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/extract_clusters.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """extract_clusters task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import DictType, IntType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "extract_clusters",
16 | "khiops_coclustering",
17 | "10.6.0-b.0",
18 | [
19 | ("coclustering_file_path", StringLikeType),
20 | ("cluster_variable", StringLikeType),
21 | ("clusters_file_path", StringLikeType),
22 | ],
23 | [
24 | ("max_preserved_information", IntType, 0),
25 | ("max_cells", IntType, 0),
26 | ("max_total_parts", IntType, 0),
27 | ("max_part_numbers", DictType(StringLikeType, IntType), None),
28 | ],
29 | ["coclustering_file_path", "clusters_file_path"],
30 | # fmt: off
31 | """
32 | // Extract cluster settings
33 | LearningTools.ExtractClusters
34 | SelectInputCoclustering
35 | InputCoclusteringFileName __coclustering_file_path__
36 | OK
37 | CoclusteringAttribute __cluster_variable__
38 | PostProcessingSpec.MaxPreservedInformation __max_preserved_information__
39 | PostProcessingSpec.MaxCellNumber __max_cells__
40 | PostProcessingSpec.MaxTotalPartNumber __max_total_parts__
41 | __DICT__
42 | __max_part_numbers__
43 | PostProcessingSpec.PostProcessedAttributes.List.Key
44 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber
45 | __END_DICT__
46 |
47 | // Output settings
48 | ClusterFileName __clusters_file_path__
49 |
50 | // Extract clusters
51 | ExtractClusters
52 | Exit
53 | """,
54 | # fmt: on
55 | ),
56 | ]
57 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/extract_keys_from_data_table.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """extract_keys_from_data_table task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import BoolType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "extract_keys_from_data_table",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("dictionary_name", StringLikeType),
21 | ("data_table_path", StringLikeType),
22 | ("output_data_table_path", StringLikeType),
23 | ],
24 | [
25 | ("detect_format", BoolType, True),
26 | ("header_line", BoolType, True),
27 | ("field_separator", StringLikeType, ""),
28 | ("output_header_line", BoolType, True),
29 | ("output_field_separator", StringLikeType, ""),
30 | ],
31 | [
32 | "dictionary_file_path",
33 | "data_table_path",
34 | "output_data_table_path",
35 | ],
36 | # fmt: off
37 | """
38 | // Dictionary file
39 | ClassManagement.OpenFile
40 | ClassFileName __dictionary_file_path__
41 | OK
42 |
43 | // Extract keys settings
44 | LearningTools.ExtractKeysFromDataTable
45 | ClassName __dictionary_name__
46 | SourceDataTable.DatabaseSpec.Data.DatabaseName __data_table_path__
47 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed __header_line__
48 | SourceDataTable.DatabaseSpec.Data.FieldSeparator __field_separator__
49 | __OPT__
50 | __detect_format__
51 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
52 | __END_OPT__
53 | TargetDataTable.DatabaseSpec.Data.DatabaseName __output_data_table_path__
54 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed __output_header_line__
55 | TargetDataTable.DatabaseSpec.Data.FieldSeparator __output_field_separator__
56 | ExtractKeysFromDataTable
57 | Exit
58 | """,
59 | # fmt: on
60 | ),
61 | ]
62 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/interpret_predictor.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """interpret_predictor task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import IntType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "interpret_predictor",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("predictor_dictionary_name", StringLikeType),
21 | ("interpretor_file_path", StringLikeType),
22 | ],
23 | [
24 | ("max_variable_importances", IntType, 100),
25 | ("importance_ranking", StringLikeType, "Global"),
26 | ],
27 | ["dictionary_file_path", "interpretor_file_path"],
28 | # pylint: disable=line-too-long
29 | # fmt: off
30 | """
31 | // Dictionary file and class settings
32 | ClassManagement.OpenFile
33 | ClassFileName __dictionary_file_path__
34 | OK
35 |
36 | // interpretation settings
37 | TrainDatabase.ClassName __predictor_dictionary_name__
38 |
39 | // Interpret model
40 | LearningTools.InterpretPredictor
41 |
42 | // Number of predictor variables exploited in the interpretation model
43 | ContributionAttributeNumber __max_variable_importances__
44 |
45 | // Ranking of the Shapley value produced by the interpretation model
46 | ShapleyValueRanking __importance_ranking__
47 |
48 | // Build interpretation dictionary
49 | BuildInterpretationClass
50 |
51 | // Output settings
52 | ClassFileName __interpretor_file_path__
53 | OK
54 | Exit
55 | """,
56 | # fmt: on
57 | ),
58 | ]
59 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/prepare_coclustering_deployment.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """prepare_coclustering_deployment task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import BoolType, DictType, IntType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "prepare_coclustering_deployment",
16 | "khiops_coclustering",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("dictionary_name", StringLikeType),
21 | ("coclustering_file_path", StringLikeType),
22 | ("table_variable", StringLikeType),
23 | ("deployed_variable_name", StringLikeType),
24 | ("coclustering_dictionary_file_path", StringLikeType),
25 | ],
26 | [
27 | ("max_preserved_information", IntType, 0),
28 | ("max_cells", IntType, 0),
29 | ("max_total_parts", IntType, 0),
30 | ("max_part_numbers", DictType(StringLikeType, IntType), None),
31 | ("build_cluster_variable", BoolType, True),
32 | ("build_distance_variables", BoolType, False),
33 | ("build_frequency_variables", BoolType, False),
34 | ("variables_prefix", StringLikeType, ""),
35 | ],
36 | [
37 | "dictionary_file_path",
38 | "coclustering_file_path",
39 | "coclustering_dictionary_file_path",
40 | ],
41 | # fmt: off
42 | """
43 | // Dictionary file and class settings
44 | ClassManagement.OpenFile
45 | ClassFileName __dictionary_file_path__
46 | OK
47 |
48 | // Prepare deployment window
49 | LearningTools.PrepareDeployment
50 |
51 | // Coclustering file
52 | SelectInputCoclustering
53 | InputCoclusteringFileName __coclustering_file_path__
54 | OK
55 |
56 | // Simplification settings
57 | PostProcessingSpec.MaxPreservedInformation __max_preserved_information__
58 | PostProcessingSpec.MaxCellNumber __max_cells__
59 | PostProcessingSpec.MaxTotalPartNumber __max_total_parts__
60 | __DICT__
61 | __max_part_numbers__
62 | PostProcessingSpec.PostProcessedAttributes.List.Key
63 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber
64 | __END_DICT__
65 |
66 | // Deployment dictionary settings
67 | DeploymentSpec.InputClassName __dictionary_name__
68 | DeploymentSpec.InputObjectArrayAttributeName __table_variable__
69 | DeploymentSpec.DeployedAttributeName __deployed_variable_name__
70 | DeploymentSpec.BuildPredictedClusterAttribute __build_cluster_variable__
71 | DeploymentSpec.BuildClusterDistanceAttributes __build_distance_variables__
72 | DeploymentSpec.BuildFrequencyRecodingAttributes __build_frequency_variables__
73 | DeploymentSpec.OutputAttributesPrefix __variables_prefix__
74 |
75 | // Output settings
76 | CoclusteringDictionaryFileName __coclustering_dictionary_file_path__
77 |
78 | // Execute prepare deployment
79 | PrepareDeployment
80 | Exit
81 | """,
82 | # fmt: on
83 | ),
84 | ]
85 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/reinforce_predictor.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """reinforce_predictor task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import ListType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "reinforce_predictor",
16 | "khiops",
17 | "10.7.3-a.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("predictor_dictionary_name", StringLikeType),
21 | ("reinforced_predictor_file_path", StringLikeType),
22 | ],
23 | [
24 | ("reinforcement_target_value", StringLikeType, ""),
25 | ("reinforcement_lever_variables", ListType(StringLikeType), None),
26 | ],
27 | ["dictionary_file_path", "reinforced_predictor_file_path"],
28 | # pylint: disable=line-too-long
29 | # fmt: off
30 | """
31 | // Dictionary file and class settings
32 | ClassManagement.OpenFile
33 | ClassFileName __dictionary_file_path__
34 | OK
35 |
36 | // Reinforcement settings
37 | TrainDatabase.ClassName __predictor_dictionary_name__
38 |
39 | // Reinforce model
40 | LearningTools.ReinforcePredictor
41 | ReinforcedTargetValue __reinforcement_target_value__
42 |
43 | LeverAttributes.UnselectAll
44 | __DICT__
45 | __reinforcement_lever_variables__
46 | LeverAttributes.List.Key
47 | LeverAttributes.Used
48 | __END_DICT__
49 |
50 | // Build reinforced predictor
51 | BuildReinforcementClass
52 |
53 | // Output settings
54 | ClassFileName __reinforced_predictor_file_path__
55 | OK
56 | Exit
57 | """,
58 | # fmt: on
59 | ),
60 | ]
61 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/simplify_coclustering.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """simplify_coclustering task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import DictType, IntType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "simplify_coclustering",
16 | "khiops_coclustering",
17 | "10.6.0-b.0",
18 | [
19 | ("coclustering_file_path", StringLikeType),
20 | ("simplified_coclustering_file_path", StringLikeType),
21 | ],
22 | [
23 | ("max_preserved_information", IntType, 0),
24 | ("max_cells", IntType, 0),
25 | ("max_total_parts", IntType, 0),
26 | ("max_part_numbers", DictType(StringLikeType, IntType), None),
27 | ],
28 | [
29 | "coclustering_file_path",
30 | "simplified_coclustering_file_path",
31 | ],
32 | # fmt: off
33 | """
34 | // Simplify coclustering settings
35 | LearningTools.PostProcessCoclustering
36 | SelectInputCoclustering
37 | InputCoclusteringFileName __coclustering_file_path__
38 | OK
39 | PostProcessingSpec.MaxPreservedInformation __max_preserved_information__
40 | PostProcessingSpec.MaxCellNumber __max_cells__
41 | PostProcessingSpec.MaxTotalPartNumber __max_total_parts__
42 | __DICT__
43 | __max_part_numbers__
44 | PostProcessingSpec.PostProcessedAttributes.List.Key
45 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber
46 | __END_DICT__
47 |
48 | // Output settings
49 | PostProcessedCoclusteringFileName __simplified_coclustering_file_path__
50 |
51 | // Simplify Coclustering
52 | PostProcessCoclustering
53 | Exit
54 | """,
55 | # fmt: on
56 | ),
57 | ]
58 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/sort_data_table.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """sort_data_table task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import BoolType, ListType, StringLikeType
10 |
11 | # Disable long lines to have readable scenarios
12 | # pylint: disable=line-too-long
13 | TASKS = [
14 | tm.KhiopsTask(
15 | "sort_data_table",
16 | "khiops",
17 | "10.6.0-b.0",
18 | [
19 | ("dictionary_file_path", StringLikeType),
20 | ("dictionary_name", StringLikeType),
21 | ("data_table_path", StringLikeType),
22 | ("output_data_table_path", StringLikeType),
23 | ],
24 | [
25 | ("sort_variables", ListType(StringLikeType), None),
26 | ("detect_format", BoolType, True),
27 | ("header_line", BoolType, True),
28 | ("field_separator", StringLikeType, ""),
29 | ("output_header_line", BoolType, True),
30 | ("output_field_separator", StringLikeType, ""),
31 | ],
32 | [
33 | "dictionary_file_path",
34 | "data_table_path",
35 | "output_data_table_path",
36 | ],
37 | # fmt: off
38 | """
39 | // Dictionary file and class settings
40 | ClassManagement.OpenFile
41 | ClassFileName __dictionary_file_path__
42 | OK
43 |
44 | // Sort table settings
45 | LearningTools.SortDataTableByKey
46 | ClassName __dictionary_name__
47 | SortAttributes.SelectDefaultKeyAttributes
48 | __LIST__
49 | __sort_variables__
50 | SortAttributes.RemoveItem
51 | SortAttributes.RemoveItem
52 | SortAttributes.RemoveItem
53 | SortAttributes.RemoveItem
54 | SortAttributes.RemoveItem
55 | SortAttributes.RemoveItem
56 | SortAttributes.RemoveItem
57 | SortAttributes.RemoveItem
58 | SortAttributes.RemoveItem
59 | SortAttributes.RemoveItem
60 | SortAttributes.InsertItemAfter
61 | SortAttributes.Name
62 | __END_LIST__
63 |
64 | // Source table settings
65 | SourceDataTable.DatabaseSpec.Data.DatabaseName __data_table_path__
66 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed __header_line__
67 | SourceDataTable.DatabaseSpec.Data.FieldSeparator __field_separator__
68 | __OPT__
69 | __detect_format__
70 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
71 | __END_OPT__
72 |
73 | // Target table settings
74 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed __output_header_line__
75 | TargetDataTable.DatabaseSpec.Data.DatabaseName __output_data_table_path__
76 | TargetDataTable.DatabaseSpec.Data.FieldSeparator __output_field_separator__
77 |
78 | // Sort table
79 | SortDataTableByKey
80 | Exit
81 | """,
82 | # fmt: on
83 | ),
84 | ]
85 |
--------------------------------------------------------------------------------
/khiops/core/internals/tasks/train_instance_variable_coclustering.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """train_instance_variable_coclustering task family"""
8 | from khiops.core.internals import task as tm
9 | from khiops.core.internals.types import (
10 | BoolType,
11 | DictType,
12 | FloatType,
13 | IntType,
14 | StringLikeType,
15 | )
16 |
17 | # Disable long lines to have readable scenarios
18 | # pylint: disable=line-too-long
19 | TASKS = [
20 | tm.KhiopsTask(
21 | "train_instance_variable_coclustering",
22 | "khiops_coclustering",
23 | "10.6.0-b.0",
24 | [
25 | ("dictionary_file_path", StringLikeType),
26 | ("dictionary_name", StringLikeType),
27 | ("data_table_path", StringLikeType),
28 | ("coclustering_report_file_path", StringLikeType),
29 | ],
30 | [
31 | ("detect_format", BoolType, True),
32 | ("header_line", BoolType, True),
33 | ("field_separator", StringLikeType, ""),
34 | ("sample_percentage", FloatType, 100.0),
35 | ("sampling_mode", StringLikeType, "Include sample"),
36 | ("selection_variable", StringLikeType, ""),
37 | ("selection_value", StringLikeType, ""),
38 | ("additional_data_tables", DictType(StringLikeType, StringLikeType), None),
39 | ("min_optimization_time", IntType, 0),
40 | ],
41 | [
42 | "dictionary_file_path",
43 | "data_table_path",
44 | "coclustering_report_file_path",
45 | "additional_data_tables",
46 | ],
47 | # fmt: off
48 | """
49 | // Dictionary file and class settings
50 | ClassManagement.OpenFile
51 | ClassFileName __dictionary_file_path__
52 | OK
53 |
54 | // Train database settings
55 | Database.ClassName __dictionary_name__
56 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key
57 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName __data_table_path__
58 | __DICT__
59 | __additional_data_tables__
60 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key
61 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName
62 | __END_DICT__
63 | Database.DatabaseSpec.Data.HeaderLineUsed __header_line__
64 | Database.DatabaseSpec.Data.FieldSeparator __field_separator__
65 | __OPT__
66 | __detect_format__
67 | Database.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
68 | __END_OPT__
69 | Database.DatabaseSpec.Sampling.SampleNumberPercentage __sample_percentage__
70 | Database.DatabaseSpec.Sampling.SamplingMode __sampling_mode__
71 | Database.DatabaseSpec.Selection.SelectionAttribute __selection_variable__
72 | Database.DatabaseSpec.Selection.SelectionValue __selection_value__
73 |
74 | // Enforce instance x variable coclustering
75 | AnalysisSpec.CoclusteringType Instances x Variables coclustering
76 |
77 | // Minimum optimization time
78 | AnalysisSpec.SystemParameters.OptimizationTime __min_optimization_time__
79 |
80 | // Output settings
81 | AnalysisResults.CoclusteringFileName __coclustering_report_file_path__
82 |
83 | // Train
84 | BuildCoclustering
85 | """,
86 | # fmt: on
87 | ),
88 | ]
89 |
--------------------------------------------------------------------------------
/khiops/extras/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Extra Khiops Python functionalities"""
8 |
--------------------------------------------------------------------------------
/khiops/samples/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 |
--------------------------------------------------------------------------------
/khiops/sklearn/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Scikit-Learn interface to the Khiops AutoML suite"""
8 | from khiops.sklearn.estimators import (
9 | KhiopsClassifier,
10 | KhiopsCoclustering,
11 | KhiopsEncoder,
12 | KhiopsRegressor,
13 | )
14 | from khiops.sklearn.helpers import train_test_split_dataset
15 |
--------------------------------------------------------------------------------
/packaging/conda/README.md:
--------------------------------------------------------------------------------
1 | # Khiops Conda Packaging Scripts
2 |
3 | ## How to Build
4 | You'll need `conda-build` installed in your system. The environment variable `KHIOPS_REVISION` must
5 | be set to a Git tag of the `khiops` repository.
6 |
7 | ```bash
8 | # At the root of the repo
9 | # These commands will leave a ready to use conda channel in `./khiops-conda-build`
10 | KHIOPS_REVISION=10.2.0
11 |
12 | # Windows
13 | conda build --output-folder ./khiops-conda-build packaging/conda
14 |
15 | # Linux/macOS
16 | # Note: We use the conda-forge channel so the khiops-core package obtains the pinned MPICH versions
17 | conda build --channel conda-forge --output-folder ./khiops-conda-build packaging/conda
18 | ```
19 |
--------------------------------------------------------------------------------
/packaging/conda/meta.yaml:
--------------------------------------------------------------------------------
1 | {% set metadata = load_setup_py_data(setup_file='../../setup.py', from_recipe_dir=True) %}
2 | package:
3 | name: {{ metadata.get('name') }}
4 | # The Conda version cannot contain the '-' character, so we eliminate it
5 | version: {{ metadata.get('version') | replace('-', '') }}
6 |
7 | source:
8 | path: ../../
9 |
10 | build:
11 | number: 0
12 | noarch: python
13 | entry_points:
14 | - kh-status = khiops.tools:kh_status_entry_point
15 | - kh-samples = khiops.tools:kh_samples_entry_point
16 | - kh-download-datasets = khiops.tools:kh_download_datasets_entry_point
17 | - pk-status = khiops.tools:pk_status_entry_point # deprecated
18 | script: |
19 | {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir --no-build-isolation -vvv
20 |
21 | requirements:
22 | build:
23 | - python
24 | - setuptools
25 | host:
26 | - python
27 | run:
28 | - python
29 | - khiops-core =10.7.3a.0
30 | - pandas >=0.25.3
31 | - scikit-learn >=0.22.2
32 | run_constrained:
33 | # do not necessary use the latest version
34 | # to avoid undesired breaking changes
35 | - boto3 >=1.17.39,<=1.35.69
36 | - google-cloud-storage >=1.37.0
37 | # an open issue on boto3 (https://github.com/boto/boto3/issues/3585) forces a min version of pyopenssl
38 | - pyopenssl>=24.0.0,<25.0.0
39 |
40 | outputs:
41 | - name: {{ metadata.get('name') }}
42 | test:
43 | commands:
44 | - kh-status
45 | imports:
46 | - khiops.core.api
47 | - khiops.sklearn.estimators
48 |
49 | about:
50 | home: https://khiops.org
51 | license: BSD+3-clause
52 | license_file: LICENSE.md
53 | summary: Khiops is an AutoML suite for supervised and unsupervised learning
54 | doc_url: https://khiopsml.github.com/khiops-python
55 | dev_url: https://github.com/khiopsml/khiops-python
56 |
--------------------------------------------------------------------------------
/packaging/docker/khiopspydev/run_fake_remote_file_servers.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ROOT_FOLDER=${1:-.} # defaults to current folder
4 |
5 | # File server for S3 (runs in background)
6 | # WARNING :
7 | # -r : exposes pre-provisioned files (not currently used feature) : the direct child folder will be the bucket name
8 | # these files were uploaded once because fake-s3 creates metadata
9 | echo "Launching fakes3 in background..."
10 | PORT_NUMBER=${AWS_ENDPOINT_URL##*:}
11 | nohup /usr/local/bin/fakes3 \
12 | -r "${ROOT_FOLDER}"/tests/resources/remote-access \
13 | -p "${PORT_NUMBER}" > /dev/null < /dev/null 2>&1 & # needs to redirect all the 3 fds to free the TTY
14 |
--------------------------------------------------------------------------------
/packaging/docker/khiopspydev/run_service.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | SERVICE=/usr/bin/service
4 | if [[ -x "$SERVICE" ]]
5 | then
6 | $SERVICE
7 | else
8 | echo No service to run. Exiting.
9 | fi
10 |
11 | # Container will terminate when this script finishes.
12 |
--------------------------------------------------------------------------------
/scripts/update_copyright.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Updates the copyright notice of the input files"""
8 |
9 | import argparse
10 | from datetime import datetime
11 |
12 | # pylint: disable=line-too-long
13 | copyright_blob = f"""######################################################################################
14 | # Copyright (c) 2023-{datetime.today().year} Orange. All rights reserved. #
15 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
16 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
17 | # see the "LICENSE.md" file for more details. #
18 | ######################################################################################
19 | """
20 | # pylint: enable=line-too-long
21 |
22 |
23 | def main(args):
24 | """Main method"""
25 | for file_path in args.file_paths:
26 | update_copyright(file_path)
27 |
28 |
29 | def update_copyright(file_path):
30 | """Updates the copyright notice of a file"""
31 | print(f"Updating {file_path}")
32 | with open(file_path, encoding="utf8") as file:
33 | lines = file.readlines()
34 | skipped_copyright = False
35 | with open(file_path, "w", encoding="utf8") as file:
36 | for line_number, line in enumerate(lines, start=1):
37 | # Write any shebang
38 | if line.startswith("#!") and line_number == 1:
39 | file.write(line)
40 | # Ignore a previous copyright banner
41 | elif line.startswith("#") and not skipped_copyright:
42 | continue
43 | # After reading the old banner write the new and any line after
44 | elif not line.startswith("#") and not skipped_copyright:
45 | skipped_copyright = True
46 | file.write(copyright_blob)
47 | file.write(line)
48 | elif skipped_copyright:
49 | file.write(line)
50 |
51 | # Write copyright if in not in skipped_copyright state at the end of the file
52 | # This case is for files with only the banner (ex. __init__.py)
53 | if not skipped_copyright:
54 | file.write(copyright_blob)
55 |
56 |
57 | if __name__ == "__main__":
58 | parser = argparse.ArgumentParser(
59 | prog="python update_copyright.py",
60 | formatter_class=argparse.RawTextHelpFormatter,
61 | description="Updates the copyright notice of the input files",
62 | )
63 | parser.add_argument(
64 | "file_paths",
65 | metavar="FILE",
66 | nargs="+",
67 | help="Location of the khiops-tutorial directory",
68 | )
69 | main(parser.parse_args())
70 |
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [versioneer]
2 | VCS = git
3 | style = pep440
4 | versionfile_source = khiops/_version.py
5 | versionfile_build = khiops/_version.py
6 | tag_prefix =
7 | parentdir_prefix = khiops-
8 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Python package builder and installer driver
8 | """
9 |
10 | from setuptools import find_packages, setup
11 |
12 | import versioneer
13 |
14 | if __name__ == "__main__":
15 | setup(
16 | name="khiops",
17 | version=versioneer.get_version(),
18 | url="https://khiops.org",
19 | description="Python library for the Khiops AutoML suite",
20 | maintainer="The Khiops Team",
21 | maintainer_email="khiops.team@orange.com",
22 | license_files=["LICENSE.md"],
23 | entry_points={
24 | "console_scripts": [
25 | "kh-status=khiops.tools:kh_status_entry_point",
26 | "kh-samples=khiops.tools:kh_samples_entry_point",
27 | "kh-download-datasets=khiops.tools:kh_download_datasets_entry_point",
28 | "pk-status=khiops.tools:pk_status_entry_point", # deprecated
29 | ]
30 | },
31 | packages=find_packages(include=["khiops", "khiops.*"]),
32 | include_package_data=True,
33 | python_requires=">=3.8",
34 | install_requires=[
35 | "pandas>=0.25.3",
36 | "scikit-learn>=0.22.2",
37 | ],
38 | classifiers=[
39 | "Development Status :: 5 - Production/Stable",
40 | "Intended Audience :: Developers",
41 | "Intended Audience :: Science/Research",
42 | "License :: Other/Proprietary License",
43 | "Operating System :: MacOS",
44 | "Operating System :: Microsoft :: Windows",
45 | "Operating System :: POSIX",
46 | "Operating System :: Unix",
47 | "Programming Language :: Python",
48 | "Topic :: Scientific/Engineering",
49 | ],
50 | cmdclass=versioneer.get_cmdclass(),
51 | extras_require={
52 | "s3": [
53 | # do not necessary use the latest version
54 | # to avoid undesired breaking changes
55 | "boto3>=1.17.39,<=1.35.69",
56 | # an open issue on boto3 (https://github.com/boto/boto3/issues/3585)
57 | # forces a minimal version of pyopenssl
58 | "pyopenssl>=24.0.0,<25.0.0",
59 | ],
60 | "gcs": ["google-cloud-storage>=1.37.0"],
61 | },
62 | )
63 |
--------------------------------------------------------------------------------
/test-requirements.txt:
--------------------------------------------------------------------------------
1 | coverage[toml]>=5.5
2 | wrapt
3 |
--------------------------------------------------------------------------------
/tests/__init__.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 |
--------------------------------------------------------------------------------
/tests/resources/README.md:
--------------------------------------------------------------------------------
1 | Test Resources
2 | --------------
3 |
4 | The file `reference_paths.txt` contain the origin and destination of reports and dictionary files.
5 | The origin is a path relative to the `LearningTest` directory that contain the Khiops tests. The
6 | destination paths are relative to this directory.
7 |
--------------------------------------------------------------------------------
/tests/resources/analysis_results/ref_json_reports/BadTool.khj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Coclustering",
3 | "version": "10.0.1",
4 | "shortDescription": "",
5 | "khiops_encoding": "ascii"
6 | }
7 |
--------------------------------------------------------------------------------
/tests/resources/analysis_results/ref_json_reports/EmptyDatabase.khj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops",
3 | "version": "VERSION",
4 | "shortDescription": "",
5 | "logs": [
6 | {
7 | "taskName": "Modeling",
8 | "messages": [
9 | "warning : No training: database is empty"
10 | ]
11 | }
12 | ],
13 | "preparationReport": {
14 | "reportType": "Preparation",
15 | "summary": {
16 | "dictionary": "Database",
17 | "variables": {
18 | "types": [
19 | "Categorical",
20 | "Numerical"
21 | ],
22 | "numbers": [
23 | 1,
24 | 7
25 | ]
26 | },
27 | "database": ".\/..\/Standard\/DatabaseEmpty.txt",
28 | "samplePercentage": 70,
29 | "samplingMode": "Include sample",
30 | "selectionVariable": "",
31 | "selectionValue": "",
32 | "instances": 0,
33 | "learningTask": "Classification analysis",
34 | "targetVariable": "Class",
35 | "targetDescriptiveStats": {
36 | "values": 0,
37 | "mode": "",
38 | "modeFrequency": 0,
39 | "missingNumber": 0,
40 | "sparseMissingNumber": 0
41 | },
42 | "targetValues": {
43 | "values": [],
44 | "frequencies": []
45 | }
46 | }
47 | },
48 | "khiops_encoding": "ascii"
49 | }
50 |
--------------------------------------------------------------------------------
/tests/resources/analysis_results/ref_json_reports/MissingDiscretization.khj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops",
3 | "version": "10.0.0.3i",
4 | "shortDescription": "",
5 | "preparationReport": {
6 | "reportType": "Preparation",
7 | "summary": {
8 | "dictionary": "IrisMissing",
9 | "variables": {
10 | "types": [
11 | "Categorical",
12 | "Numerical"
13 | ],
14 | "numbers": [
15 | 1,
16 | 1
17 | ]
18 | },
19 | "database": ".\/IrisMissing.txt",
20 | "samplePercentage": 100,
21 | "samplingMode": "Include sample",
22 | "selectionVariable": "",
23 | "selectionValue": "",
24 | "instances": 150,
25 | "learningTask": "Classification analysis",
26 | "targetVariable": "Class",
27 | "targetDescriptiveStats": {
28 | "values": 3,
29 | "mode": "Iris-setosa",
30 | "modeFrequency": 50
31 | },
32 | "targetValues": {
33 | "values": ["Iris-setosa","Iris-versicolor","Iris-virginica"],
34 | "frequencies": [50,50,50]
35 | },
36 | "evaluatedVariables": 1,
37 | "informativeVariables": 1,
38 | "featureEngineering": {
39 | "maxNumberOfConstructedVariables": 0,
40 | "maxNumberOfTextFeatures": 0,
41 | "maxNumberOfTrees": 0,
42 | "maxNumberOfVariablePairs": 0
43 | },
44 | "discretization": "MODL",
45 | "valueGrouping": "MODL",
46 | "nullModel": {
47 | "constructionCost": 0.693147,
48 | "preparationCost": 9.34801,
49 | "dataCost": 159.587
50 | }
51 | },
52 | "variablesStatistics": [
53 | {
54 | "rank": "R1",
55 | "name": "PW_UM40",
56 | "type": "Numerical",
57 | "level": 0.65628,
58 | "parts": 4,
59 | "values": 16,
60 | "min": 0.1,
61 | "max": 1.8,
62 | "mean": 0.8654545455,
63 | "stdDev": 0.5961141385,
64 | "missingNumber": 40,
65 | "constructionCost": 0.693147,
66 | "preparationCost": 41.7703,
67 | "dataCost": 15.8411
68 | }
69 | ],
70 | "variablesDetailedStatistics": {
71 | "R1": {
72 | "dataGrid": {
73 | "isSupervised": true,
74 | "dimensions": [
75 | {
76 | "variable": "PW_UM40",
77 | "type": "Numerical",
78 | "partitionType": "Intervals",
79 | "partition": [
80 | [],
81 | [0.1,0.8],
82 | [0.8,1.65],
83 | [1.65,1.8]
84 | ]
85 | },
86 | {
87 | "variable": "Class",
88 | "type": "Categorical",
89 | "partitionType": "Values",
90 | "partition": ["Iris-setosa","Iris-versicolor","Iris-virginica"]
91 | }
92 | ],
93 | "partTargetFrequencies": [
94 | [0,0,40],
95 | [50,0,0],
96 | [0,48,4],
97 | [0,2,6]
98 | ],
99 | "partInterests": [0.300596,0.375745,0.294313,0.0293466]
100 | }
101 | }
102 | }
103 | },
104 | "khiops_encoding": "ascii"
105 | }
106 |
--------------------------------------------------------------------------------
/tests/resources/analysis_results/ref_json_reports/NoBivariateDetailedStats.khj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops",
3 | "version": "10.0.6i",
4 | "shortDescription": "",
5 | "preparationReport": {
6 | "reportType": "Preparation",
7 | "summary": {
8 | "dictionary": "BugNC",
9 | "variables": {
10 | "types": [
11 | "Categorical",
12 | "Numerical"
13 | ],
14 | "numbers": [
15 | 1,
16 | 1
17 | ]
18 | },
19 | "database": ".\/BugTiny.txt",
20 | "samplePercentage": 100,
21 | "samplingMode": "Include sample",
22 | "selectionVariable": "",
23 | "selectionValue": "",
24 | "instances": 2,
25 | "learningTask": "Unsupervised analysis",
26 | "evaluatedVariables": 2,
27 | "featureEngineering": {
28 | "maxNumberOfConstructedVariables": 0,
29 | "maxNumberOfTextFeatures": 0,
30 | "maxNumberOfTrees": 0,
31 | "maxNumberOfVariablePairs": 1
32 | },
33 | "discretization": "EqualWidth",
34 | "valueGrouping": "BasicGrouping"
35 | },
36 | "variablesStatistics": [
37 | {
38 | "rank": "R1",
39 | "name": "Var1",
40 | "type": "Numerical",
41 | "values": 2,
42 | "min": 1,
43 | "max": 2,
44 | "mean": 1.5,
45 | "stdDev": 0.5,
46 | "missingNumber": 0,
47 | "sparseMissingNumber": 0,
48 | "constructionCost": 1.38629
49 | },
50 | {
51 | "rank": "R2",
52 | "name": "Var2",
53 | "type": "Categorical",
54 | "values": 2,
55 | "mode": "A",
56 | "modeFrequency": 1,
57 | "missingNumber": 0,
58 | "sparseMissingNumber": 0,
59 | "constructionCost": 1.38629
60 | }
61 | ],
62 | "variablesDetailedStatistics": {
63 | "R1": {
64 | "dataGrid": {
65 | "isSupervised": false,
66 | "dimensions": [
67 | {
68 | "variable": "Var1",
69 | "type": "Numerical",
70 | "partitionType": "Intervals",
71 | "partition": [
72 | [1,1.5],
73 | [1.5,2]
74 | ]
75 | }
76 | ],
77 | "frequencies": [1,1]
78 | }
79 | }
80 | }
81 | },
82 | "bivariatePreparationReport": {
83 | "reportType": "BivariatePreparation",
84 | "summary": {
85 | "dictionary": "BugNC",
86 | "variables": {
87 | "types": [
88 | "Categorical",
89 | "Numerical"
90 | ],
91 | "numbers": [
92 | 1,
93 | 1
94 | ]
95 | },
96 | "database": ".\/BugTiny.txt",
97 | "samplePercentage": 100,
98 | "samplingMode": "Include sample",
99 | "selectionVariable": "",
100 | "selectionValue": "",
101 | "instances": 2,
102 | "learningTask": "Unsupervised analysis",
103 | "evaluatedVariablePairs": 1,
104 | "informativeVariablePairs": 0
105 | },
106 | "variablesPairsStatistics": [
107 | {
108 | "rank": "R1",
109 | "name1": "Var1",
110 | "name2": "Var2",
111 | "level": 0,
112 | "variables": 0,
113 | "parts1": 1,
114 | "parts2": 1,
115 | "cells": 1,
116 | "constructionCost": 0.693147,
117 | "preparationCost": 1.09861,
118 | "dataCost": 1.38629
119 | }
120 | ]
121 | },
122 | "khiops_encoding": "ascii"
123 | }
124 |
--------------------------------------------------------------------------------
/tests/resources/analysis_results/ref_json_reports/NoVersion.khj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops",
3 | "shortDescription": "",
4 | "khiops_encoding": "ascii"
5 | }
6 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Adult.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary Adult
4 | {
5 | Categorical Label ;
6 | Numerical age ;
7 | Categorical workclass ;
8 | Numerical fnlwgt ;
9 | Categorical education ;
10 | Numerical education_num ;
11 | Categorical marital_status ;
12 | Categorical occupation ;
13 | Categorical relationship ;
14 | Categorical race ;
15 | Categorical sex ;
16 | Numerical capital_gain ;
17 | Numerical capital_loss ;
18 | Numerical hours_per_week ;
19 | Categorical native_country ;
20 | Categorical class ;
21 | };
22 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AdultKey.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary Adult (Label)
4 | {
5 | Categorical Label ;
6 | Numerical age ;
7 | Categorical workclass ;
8 | Numerical fnlwgt ;
9 | Categorical education ;
10 | Numerical education_num ;
11 | Categorical marital_status ;
12 | Categorical occupation ;
13 | Categorical relationship ;
14 | Categorical race ;
15 | Categorical sex ;
16 | Numerical capital_gain ;
17 | Numerical capital_loss ;
18 | Numerical hours_per_week ;
19 | Categorical native_country ;
20 | Categorical class ;
21 | };
22 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AdultLegacy.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 9.5.5i
2 |
3 | Dictionary Adult
4 | {
5 | Categorical Label ;
6 | Numerical age ;
7 | Categorical workclass ;
8 | Numerical fnlwgt ;
9 | Categorical education ;
10 | Numerical education_num ;
11 | Categorical marital_status ;
12 | Categorical occupation ;
13 | Categorical relationship ;
14 | Categorical race ;
15 | Categorical sex ;
16 | Numerical capital_gain ;
17 | Numerical capital_loss ;
18 | Numerical hours_per_week ;
19 | Categorical native_country ;
20 | Categorical class ;
21 | };
22 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Ansi.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/Ansi.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AnsiGreek.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/AnsiGreek.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AnsiGreek_Modeling.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/AnsiGreek_Modeling.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AnsiLatin.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/AnsiLatin.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AnsiLatinGreek.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/AnsiLatinGreek.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AnsiLatinGreek_Modeling.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/AnsiLatinGreek_Modeling.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/AnsiLatin_Modeling.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/AnsiLatin_Modeling.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Ansi_Modeling.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/Ansi_Modeling.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Bytes.kdic:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/dictionary/ref_kdic/Bytes.kdic
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Customer.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.3
2 |
3 | Dictionary Address (id_customer)
4 | {
5 | Categorical id_customer ;
6 | Numerical StreetNumber ;
7 | Categorical StreetName ;
8 | Categorical id_city ;
9 | };
10 |
11 | Root Dictionary Customer (id_customer)
12 | {
13 | Categorical id_customer ;
14 | Categorical Name ;
15 | Table(Service) Services ;
16 | Entity(Address) Address ;
17 | };
18 |
19 | Dictionary Service (id_customer, id_product)
20 | {
21 | Categorical id_customer ;
22 | Categorical id_product ;
23 | Date SubscriptionDate ;
24 | Table(Usage) Usages ;
25 | };
26 |
27 | Dictionary Usage (id_customer, id_product)
28 | {
29 | Categorical id_customer ;
30 | Categorical id_product ;
31 | Date Date ;
32 | Time Time ;
33 | Numerical Duration ;
34 | };
35 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/CustomerExtended.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.3
2 |
3 | Dictionary Address (id_customer)
4 | {
5 | Categorical id_customer ;
6 | Numerical StreetNumber ;
7 | Categorical StreetName ;
8 | Categorical id_city ;
9 | Entity(City) City [id_city] ;
10 | };
11 |
12 | Root Dictionary City (id_city)
13 | {
14 | Categorical id_city ;
15 | Categorical Name ;
16 | Categorical id_country ;
17 | Entity(Country) Country [id_country] ;
18 | };
19 |
20 | Root Dictionary Country (id_country)
21 | {
22 | Categorical id_country ;
23 | Categorical Name ;
24 | };
25 |
26 | Root Dictionary Customer (id_customer)
27 | {
28 | Categorical id_customer ;
29 | Categorical Name ;
30 | Table(Service) Services ;
31 | Entity(Address) Address ;
32 | };
33 |
34 | Root Dictionary Product (id_product)
35 | {
36 | Categorical id_product ;
37 | Categorical Name ;
38 | Numerical Price ;
39 | };
40 |
41 | Dictionary Service (id_customer, id_product)
42 | {
43 | Categorical id_customer ;
44 | Categorical id_product ;
45 | Entity(Product) Product [id_product] ;
46 | Entity(Product) ProductCopy [id_product] ;
47 | Date SubscriptionDate ;
48 | Table(Usage) Usages ;
49 | };
50 |
51 | Dictionary Usage (id_customer, id_product)
52 | {
53 | Categorical id_customer ;
54 | Categorical id_product ;
55 | Entity(Product) Product [id_product] ;
56 | Date Date ;
57 | Time Time ;
58 | Numerical Duration ;
59 | };
60 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Dorothea.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary Dorothea
4 | {
5 | Categorical Class ;
6 | {
7 | Numerical V1 ;
8 | Numerical V2 ;
9 | Numerical V3 ;
10 | Numerical V4 ;
11 | Numerical V5 ;
12 | Numerical V6 ;
13 | Numerical V7 ;
14 | Numerical V8 ;
15 | Numerical V9 ;
16 | } DataBlock ;
17 | };
18 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Greek.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary Greek
4 | {
5 | Categorical VarAscii_a ;
6 | Categorical `VarGreek_θ` ;
7 | };
8 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Greek_Modeling.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary SNB_MultipleEncodings
4 |
5 | {
6 | Unused Categorical Char ;
7 | Categorical Type ;
8 | Unused Numerical Ansi = InGroup(ValueGroup("ASCII", "ANSI"), Type) ;
9 | Unused Numerical Latin = InGroup(ValueGroup("ASCII", "UTF8 Latin"), Type) ;
10 | Unused Numerical Greek = InGroup(ValueGroup("ASCII", "UTF8 Greek"), Type) ;
11 | Unused Numerical AnsiLatin = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Latin"), Type) ;
12 | Unused Numerical AnsiGreek = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Greek"), Type) ;
13 | Unused Numerical LatinGreek = InGroup(ValueGroup("ASCII", "UTF8 Latin", "UTF8 Greek"), Type) ;
14 | Unused Numerical AnsiLatinGreek = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Latin", "UTF8 Greek"), Type) ;
15 | Unused Structure(DataGrid) VType = DataGrid(ValueSetC("ASCII", "UTF8 Greek"), Frequencies(10, 10)) ;
16 | Unused Structure(DataGrid) PChar = DataGrid(ValueGroups(ValueGroup(""), ValueGroup("<θ>", " * ")), ValueSetC("ASCII", "UTF8 Greek"), Frequencies(10, 0, 0, 10)) ; // DataGrid(Char, Type)
17 | Unused Structure(Classifier) SNBType = SNBClassifier(Vector(1), DataGridStats(PChar, Char), VType) ;
18 | Categorical PredictedType = TargetValue(SNBType) ;
19 | Unused Numerical ScoreType = TargetProb(SNBType) ;
20 | Numerical ProbTypeASCII = TargetProbAt(SNBType, "ASCII") ;
21 | Numerical `ProbTypeUTF8 Greek` = TargetProbAt(SNBType, "UTF8 Greek") ;
22 | };
23 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Latin.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary Latin
4 | {
5 | Categorical VarAscii_a ;
6 | Categorical `VarLatin_é` ;
7 | };
8 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/LatinGreek.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary LatinGreek
4 | {
5 | Categorical VarAscii_a ;
6 | Categorical `VarLatin_é` ;
7 | Categorical `VarGreek_θ` ;
8 | };
9 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/LatinGreek_Modeling.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary SNB_MultipleEncodings
4 |
5 | {
6 | Unused Categorical Char ;
7 | Categorical Type ;
8 | Unused Numerical Ansi = InGroup(ValueGroup("ASCII", "ANSI"), Type) ;
9 | Unused Numerical Latin = InGroup(ValueGroup("ASCII", "UTF8 Latin"), Type) ;
10 | Unused Numerical Greek = InGroup(ValueGroup("ASCII", "UTF8 Greek"), Type) ;
11 | Unused Numerical AnsiLatin = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Latin"), Type) ;
12 | Unused Numerical AnsiGreek = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Greek"), Type) ;
13 | Unused Numerical LatinGreek = InGroup(ValueGroup("ASCII", "UTF8 Latin", "UTF8 Greek"), Type) ;
14 | Unused Numerical AnsiLatinGreek = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Latin", "UTF8 Greek"), Type) ;
15 | Unused Structure(DataGrid) VType = DataGrid(ValueSetC("ASCII", "UTF8 Greek", "UTF8 Latin"), Frequencies(10, 10, 10)) ;
16 | Unused Structure(DataGrid) PChar = DataGrid(ValueGroups(ValueGroup(""), ValueGroup("<é>"), ValueGroup("<θ>", " * ")), ValueSetC("ASCII", "UTF8 Greek", "UTF8 Latin"), Frequencies(10, 0, 0, 0, 0, 10, 0, 10, 0)) ; // DataGrid(Char, Type)
17 | Unused Structure(Classifier) SNBType = SNBClassifier(Vector(1), DataGridStats(PChar, Char), VType) ;
18 | Categorical PredictedType = TargetValue(SNBType) ;
19 | Unused Numerical ScoreType = TargetProb(SNBType) ;
20 | Numerical ProbTypeASCII = TargetProbAt(SNBType, "ASCII") ;
21 | Numerical `ProbTypeUTF8 Greek` = TargetProbAt(SNBType, "UTF8 Greek") ;
22 | Numerical `ProbTypeUTF8 Latin` = TargetProbAt(SNBType, "UTF8 Latin") ;
23 | };
24 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/Latin_Modeling.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Dictionary SNB_MultipleEncodings
4 |
5 | {
6 | Unused Categorical Char ;
7 | Categorical Type ;
8 | Unused Numerical Ansi = InGroup(ValueGroup("ASCII", "ANSI"), Type) ;
9 | Unused Numerical Latin = InGroup(ValueGroup("ASCII", "UTF8 Latin"), Type) ;
10 | Unused Numerical Greek = InGroup(ValueGroup("ASCII", "UTF8 Greek"), Type) ;
11 | Unused Numerical AnsiLatin = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Latin"), Type) ;
12 | Unused Numerical AnsiGreek = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Greek"), Type) ;
13 | Unused Numerical LatinGreek = InGroup(ValueGroup("ASCII", "UTF8 Latin", "UTF8 Greek"), Type) ;
14 | Unused Numerical AnsiLatinGreek = InGroup(ValueGroup("ASCII", "ANSI", "UTF8 Latin", "UTF8 Greek"), Type) ;
15 | Unused Structure(DataGrid) VType = DataGrid(ValueSetC("ASCII", "UTF8 Latin"), Frequencies(10, 10)) ;
16 | Unused Structure(DataGrid) PChar = DataGrid(ValueGroups(ValueGroup(""), ValueGroup("<é>", " * ")), ValueSetC("ASCII", "UTF8 Latin"), Frequencies(10, 0, 0, 10)) ; // DataGrid(Char, Type)
17 | Unused Structure(Classifier) SNBType = SNBClassifier(Vector(1), DataGridStats(PChar, Char), VType) ;
18 | Categorical PredictedType = TargetValue(SNBType) ;
19 | Unused Numerical ScoreType = TargetProb(SNBType) ;
20 | Numerical ProbTypeASCII = TargetProbAt(SNBType, "ASCII") ;
21 | Numerical `ProbTypeUTF8 Latin` = TargetProbAt(SNBType, "UTF8 Latin") ;
22 | };
23 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdic/SpliceJunction.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0.0.3i
2 |
3 | Root Dictionary SpliceJunction (SampleId)
4 | {
5 | Categorical SampleId ;
6 | Categorical Class ;
7 | Table(SpliceJunctionDNA) DNA ;
8 | };
9 |
10 | Dictionary SpliceJunctionDNA (SampleId)
11 | {
12 | Categorical SampleId ;
13 | Numerical Pos ;
14 | Categorical Char ;
15 | };
16 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Adult.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "Adult",
7 | "variables": [
8 | {
9 | "name": "Label",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "age",
14 | "type": "Numerical"
15 | },
16 | {
17 | "name": "workclass",
18 | "type": "Categorical"
19 | },
20 | {
21 | "name": "fnlwgt",
22 | "type": "Numerical"
23 | },
24 | {
25 | "name": "education",
26 | "type": "Categorical"
27 | },
28 | {
29 | "name": "education_num",
30 | "type": "Numerical"
31 | },
32 | {
33 | "name": "marital_status",
34 | "type": "Categorical"
35 | },
36 | {
37 | "name": "occupation",
38 | "type": "Categorical"
39 | },
40 | {
41 | "name": "relationship",
42 | "type": "Categorical"
43 | },
44 | {
45 | "name": "race",
46 | "type": "Categorical"
47 | },
48 | {
49 | "name": "sex",
50 | "type": "Categorical"
51 | },
52 | {
53 | "name": "capital_gain",
54 | "type": "Numerical"
55 | },
56 | {
57 | "name": "capital_loss",
58 | "type": "Numerical"
59 | },
60 | {
61 | "name": "hours_per_week",
62 | "type": "Numerical"
63 | },
64 | {
65 | "name": "native_country",
66 | "type": "Categorical"
67 | },
68 | {
69 | "name": "class",
70 | "type": "Categorical"
71 | }
72 | ]
73 | }
74 | ],
75 | "khiops_encoding": "ascii"
76 | }
77 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/AdultKey.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "Adult",
7 | "key": ["Label"],
8 | "variables": [
9 | {
10 | "name": "Label",
11 | "type": "Categorical"
12 | },
13 | {
14 | "name": "age",
15 | "type": "Numerical"
16 | },
17 | {
18 | "name": "workclass",
19 | "type": "Categorical"
20 | },
21 | {
22 | "name": "fnlwgt",
23 | "type": "Numerical"
24 | },
25 | {
26 | "name": "education",
27 | "type": "Categorical"
28 | },
29 | {
30 | "name": "education_num",
31 | "type": "Numerical"
32 | },
33 | {
34 | "name": "marital_status",
35 | "type": "Categorical"
36 | },
37 | {
38 | "name": "occupation",
39 | "type": "Categorical"
40 | },
41 | {
42 | "name": "relationship",
43 | "type": "Categorical"
44 | },
45 | {
46 | "name": "race",
47 | "type": "Categorical"
48 | },
49 | {
50 | "name": "sex",
51 | "type": "Categorical"
52 | },
53 | {
54 | "name": "capital_gain",
55 | "type": "Numerical"
56 | },
57 | {
58 | "name": "capital_loss",
59 | "type": "Numerical"
60 | },
61 | {
62 | "name": "hours_per_week",
63 | "type": "Numerical"
64 | },
65 | {
66 | "name": "native_country",
67 | "type": "Categorical"
68 | },
69 | {
70 | "name": "class",
71 | "type": "Categorical"
72 | }
73 | ]
74 | }
75 | ],
76 | "khiops_encoding": "ascii"
77 | }
78 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/AdultLegacy.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "9.5.5i",
4 | "dictionaries": [
5 | {
6 | "name": "Adult",
7 | "variables": [
8 | {
9 | "name": "Label",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "age",
14 | "type": "Numerical"
15 | },
16 | {
17 | "name": "workclass",
18 | "type": "Categorical"
19 | },
20 | {
21 | "name": "fnlwgt",
22 | "type": "Numerical"
23 | },
24 | {
25 | "name": "education",
26 | "type": "Categorical"
27 | },
28 | {
29 | "name": "education_num",
30 | "type": "Numerical"
31 | },
32 | {
33 | "name": "marital_status",
34 | "type": "Categorical"
35 | },
36 | {
37 | "name": "occupation",
38 | "type": "Categorical"
39 | },
40 | {
41 | "name": "relationship",
42 | "type": "Categorical"
43 | },
44 | {
45 | "name": "race",
46 | "type": "Categorical"
47 | },
48 | {
49 | "name": "sex",
50 | "type": "Categorical"
51 | },
52 | {
53 | "name": "capital_gain",
54 | "type": "Numerical"
55 | },
56 | {
57 | "name": "capital_loss",
58 | "type": "Numerical"
59 | },
60 | {
61 | "name": "hours_per_week",
62 | "type": "Numerical"
63 | },
64 | {
65 | "name": "native_country",
66 | "type": "Categorical"
67 | },
68 | {
69 | "name": "class",
70 | "type": "Categorical"
71 | }
72 | ]
73 | }
74 | ]
75 | }
76 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Ansi.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "Ansi",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarAnsi_\u00E9",
14 | "type": "Categorical"
15 | }
16 | ]
17 | }
18 | ],
19 | "khiops_encoding": "ansi"
20 | }
21 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/AnsiGreek.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "AnsiGreek",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarAnsi_\u00E9",
14 | "type": "Categorical"
15 | },
16 | {
17 | "name": "VarGreek_θ",
18 | "type": "Categorical"
19 | }
20 | ]
21 | }
22 | ],
23 | "khiops_encoding": "mixed_ansi_utf8"
24 | }
25 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/AnsiLatin.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "AnsiLatin",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarAnsi_\u00E9",
14 | "type": "Categorical"
15 | },
16 | {
17 | "name": "VarLatin_é",
18 | "type": "Categorical"
19 | }
20 | ]
21 | }
22 | ],
23 | "khiops_encoding": "colliding_ansi_utf8",
24 | "ansi_chars": [
25 | "\u00E9"
26 | ],
27 | "colliding_utf8_chars": [
28 | "é"
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/AnsiLatinGreek.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "AnsiLatinGreek",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarAnsi_\u00E9",
14 | "type": "Categorical"
15 | },
16 | {
17 | "name": "VarLatin_é",
18 | "type": "Categorical"
19 | },
20 | {
21 | "name": "VarGreek_θ",
22 | "type": "Categorical"
23 | }
24 | ]
25 | }
26 | ],
27 | "khiops_encoding": "colliding_ansi_utf8",
28 | "ansi_chars": [
29 | "\u00E9"
30 | ],
31 | "colliding_utf8_chars": [
32 | "é"
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Bytes.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "MyDict\u00EA",
7 | "variables": [
8 | {
9 | "name": "MyVar\u00EE",
10 | "type": "Categorical",
11 | "metaData": {
12 | "aKey": "aValu\u00E9"
13 | }
14 | }
15 | ]
16 | }
17 | ],
18 | "khiops_encoding": "ansi"
19 | }
20 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Customer.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.3",
4 | "dictionaries": [
5 | {
6 | "name": "Address",
7 | "key": ["id_customer"],
8 | "variables": [
9 | {
10 | "name": "id_customer",
11 | "type": "Categorical"
12 | },
13 | {
14 | "name": "StreetNumber",
15 | "type": "Numerical"
16 | },
17 | {
18 | "name": "StreetName",
19 | "type": "Categorical"
20 | },
21 | {
22 | "name": "id_city",
23 | "type": "Categorical"
24 | }
25 | ]
26 | },
27 | {
28 | "name": "Customer",
29 | "root": true,
30 | "key": ["id_customer"],
31 | "variables": [
32 | {
33 | "name": "id_customer",
34 | "type": "Categorical"
35 | },
36 | {
37 | "name": "Name",
38 | "type": "Categorical"
39 | },
40 | {
41 | "name": "Services",
42 | "type": "Table",
43 | "objectType": "Service"
44 | },
45 | {
46 | "name": "Address",
47 | "type": "Entity",
48 | "objectType": "Address"
49 | }
50 | ]
51 | },
52 | {
53 | "name": "Service",
54 | "key": ["id_customer","id_product"],
55 | "variables": [
56 | {
57 | "name": "id_customer",
58 | "type": "Categorical"
59 | },
60 | {
61 | "name": "id_product",
62 | "type": "Categorical"
63 | },
64 | {
65 | "name": "SubscriptionDate",
66 | "type": "Date"
67 | },
68 | {
69 | "name": "Usages",
70 | "type": "Table",
71 | "objectType": "Usage"
72 | }
73 | ]
74 | },
75 | {
76 | "name": "Usage",
77 | "key": ["id_customer","id_product"],
78 | "variables": [
79 | {
80 | "name": "id_customer",
81 | "type": "Categorical"
82 | },
83 | {
84 | "name": "id_product",
85 | "type": "Categorical"
86 | },
87 | {
88 | "name": "Date",
89 | "type": "Date"
90 | },
91 | {
92 | "name": "Time",
93 | "type": "Time"
94 | },
95 | {
96 | "name": "Duration",
97 | "type": "Numerical"
98 | }
99 | ]
100 | }
101 | ],
102 | "khiops_encoding": "ascii"
103 | }
104 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Dorothea.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "Dorothea",
7 | "variables": [
8 | {
9 | "name": "Class",
10 | "type": "Categorical"
11 | },
12 | {
13 | "blockName": "DataBlock",
14 | "metaData": {
15 | "DefaultNumericalValue": 0
16 | },
17 | "variables": [
18 | {
19 | "name": "V1",
20 | "type": "Numerical",
21 | "metaData": {
22 | "VarKey": 1
23 | }
24 | },
25 | {
26 | "name": "V2",
27 | "type": "Numerical",
28 | "metaData": {
29 | "VarKey": 2
30 | }
31 | },
32 | {
33 | "name": "V3",
34 | "type": "Numerical",
35 | "metaData": {
36 | "VarKey": 3
37 | }
38 | },
39 | {
40 | "name": "V4",
41 | "type": "Numerical",
42 | "metaData": {
43 | "VarKey": 4
44 | }
45 | },
46 | {
47 | "name": "V5",
48 | "type": "Numerical",
49 | "metaData": {
50 | "VarKey": 5
51 | }
52 | },
53 | {
54 | "name": "V6",
55 | "type": "Numerical",
56 | "metaData": {
57 | "VarKey": 6
58 | }
59 | },
60 | {
61 | "name": "V7",
62 | "type": "Numerical",
63 | "metaData": {
64 | "VarKey": 7
65 | }
66 | },
67 | {
68 | "name": "V8",
69 | "type": "Numerical",
70 | "metaData": {
71 | "VarKey": 8
72 | }
73 | },
74 | {
75 | "name": "V9",
76 | "type": "Numerical",
77 | "metaData": {
78 | "VarKey": 9
79 | }
80 | }
81 | ]
82 | }
83 | ]
84 | }
85 | ],
86 | "khiops_encoding": "ascii"
87 | }
88 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Greek.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "Greek",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarGreek_θ",
14 | "type": "Categorical"
15 | }
16 | ]
17 | }
18 | ],
19 | "khiops_encoding": "utf8"
20 | }
21 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/Latin.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "Latin",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarLatin_é",
14 | "type": "Categorical"
15 | }
16 | ]
17 | }
18 | ],
19 | "khiops_encoding": "utf8"
20 | }
21 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/LatinGreek.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "LatinGreek",
7 | "variables": [
8 | {
9 | "name": "VarAscii_a",
10 | "type": "Categorical"
11 | },
12 | {
13 | "name": "VarLatin_é",
14 | "type": "Categorical"
15 | },
16 | {
17 | "name": "VarGreek_θ",
18 | "type": "Categorical"
19 | }
20 | ]
21 | }
22 | ],
23 | "khiops_encoding": "utf8"
24 | }
25 |
--------------------------------------------------------------------------------
/tests/resources/dictionary/ref_kdicj/SpliceJunction.kdicj:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Khiops Dictionary",
3 | "version": "10.0.0.3i",
4 | "dictionaries": [
5 | {
6 | "name": "SpliceJunction",
7 | "root": true,
8 | "key": ["SampleId"],
9 | "variables": [
10 | {
11 | "name": "SampleId",
12 | "type": "Categorical"
13 | },
14 | {
15 | "name": "Class",
16 | "type": "Categorical"
17 | },
18 | {
19 | "name": "DNA",
20 | "type": "Table",
21 | "objectType": "SpliceJunctionDNA"
22 | }
23 | ]
24 | },
25 | {
26 | "name": "SpliceJunctionDNA",
27 | "key": ["SampleId"],
28 | "variables": [
29 | {
30 | "name": "SampleId",
31 | "type": "Categorical"
32 | },
33 | {
34 | "name": "Pos",
35 | "type": "Numerical"
36 | },
37 | {
38 | "name": "Char",
39 | "type": "Categorical"
40 | }
41 | ]
42 | }
43 | ],
44 | "khiops_encoding": "ascii"
45 | }
46 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/build_deployed_dictionary/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task build_deployed_dictionary
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Transfer settings
8 | LearningTools.TransferDatabase
9 | ClassName Adult
10 | BuildTransferredClass
11 | ClassFileName AdultDeployed.kdic //
12 | OK
13 | Exit
14 |
15 | // End of scenario for task build_deployed_dictionary
16 |
17 | // Exit Khiops
18 | ClassManagement.Quit
19 | OK
20 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/build_deployed_dictionary/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task build_deployed_dictionary
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Transfer settings
8 | LearningTools.TransferDatabase
9 | ClassName Customer
10 | BuildTransferredClass
11 | ClassFileName CustomerDeployed.kdic //
12 | OK
13 | Exit
14 |
15 | // End of scenario for task build_deployed_dictionary
16 |
17 | // Exit Khiops
18 | ClassManagement.Quit
19 | OK
20 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/build_deployed_dictionary/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task build_deployed_dictionary
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Transfer settings
8 | LearningTools.TransferDatabase
9 | ClassName SpliceJunction
10 | BuildTransferredClass
11 | ClassFileName SpliceJunctionDeployed.kdic //
12 | OK
13 | Exit
14 |
15 | // End of scenario for task build_deployed_dictionary
16 |
17 | // Exit Khiops
18 | ClassManagement.Quit
19 | OK
20 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/build_dictionary_from_data_table/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task build_dictionary_from_data_table
2 | // Dictionary building settings
3 | ClassManagement.ManageClasses
4 | BuildClassDefButton
5 | SourceDataTable.DatabaseSpec.Data.DatabaseName Adult.csv //
6 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
7 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
8 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
9 | BuildClassDef
10 | ClassName Adult
11 | OK
12 | Exit
13 |
14 | // Save dictionary
15 | ClassFileName Adult.kdic //
16 | OK
17 | Exit
18 |
19 | // End of scenario for task build_dictionary_from_data_table
20 |
21 | // Exit Khiops
22 | ClassManagement.Quit
23 | OK
24 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/build_dictionary_from_data_table/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task build_dictionary_from_data_table
2 | // Dictionary building settings
3 | ClassManagement.ManageClasses
4 | BuildClassDefButton
5 | SourceDataTable.DatabaseSpec.Data.DatabaseName Customer.csv //
6 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
7 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
8 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
9 | BuildClassDef
10 | ClassName Customer
11 | OK
12 | Exit
13 |
14 | // Save dictionary
15 | ClassFileName Customer.kdic //
16 | OK
17 | Exit
18 |
19 | // End of scenario for task build_dictionary_from_data_table
20 |
21 | // Exit Khiops
22 | ClassManagement.Quit
23 | OK
24 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/build_dictionary_from_data_table/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task build_dictionary_from_data_table
2 | // Dictionary building settings
3 | ClassManagement.ManageClasses
4 | BuildClassDefButton
5 | SourceDataTable.DatabaseSpec.Data.DatabaseName SpliceJunction.csv //
6 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
7 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
8 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
9 | BuildClassDef
10 | ClassName SpliceJunction
11 | OK
12 | Exit
13 |
14 | // Save dictionary
15 | ClassFileName SpliceJunction.kdic //
16 | OK
17 | Exit
18 |
19 | // End of scenario for task build_dictionary_from_data_table
20 |
21 | // Exit Khiops
22 | ClassManagement.Quit
23 | OK
24 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/check_database/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task check_database
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Train database settings
8 | TrainDatabase.ClassName Adult
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Adult.csv //
11 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
12 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
15 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
16 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
17 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
18 |
19 | // Log messages limit
20 | AnalysisSpec.SystemParameters.MaxErrorMessageNumberInLog 20
21 |
22 | // Execute check database
23 | LearningTools.CheckData
24 |
25 | // End of scenario for task check_database
26 |
27 | // Exit Khiops
28 | ClassManagement.Quit
29 | OK
30 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/check_database/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task check_database
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Train database settings
8 | TrainDatabase.ClassName Customer
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /City
18 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CityBidon.csv //
19 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
20 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CountryBidon.csv //
21 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
22 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ProductBidon.csv //
23 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
24 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
25 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
26 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
27 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
28 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
29 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
30 |
31 | // Log messages limit
32 | AnalysisSpec.SystemParameters.MaxErrorMessageNumberInLog 20
33 |
34 | // Execute check database
35 | LearningTools.CheckData
36 |
37 | // End of scenario for task check_database
38 |
39 | // Exit Khiops
40 | ClassManagement.Quit
41 | OK
42 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/check_database/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task check_database
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Train database settings
8 | TrainDatabase.ClassName SpliceJunction
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunction.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunctionDNABidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
14 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
16 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
17 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
18 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
19 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
20 |
21 | // Log messages limit
22 | AnalysisSpec.SystemParameters.MaxErrorMessageNumberInLog 20
23 |
24 | // Execute check database
25 | LearningTools.CheckData
26 |
27 | // End of scenario for task check_database
28 |
29 | // Exit Khiops
30 | ClassManagement.Quit
31 | OK
32 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/deploy_model/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task deploy_model
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Deploy settings
8 | LearningTools.TransferDatabase
9 | ClassName Adult
10 |
11 | // Input database settings
12 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
13 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Adult.csv //
14 | SourceDatabase.DatabaseSpec.Data.HeaderLineUsed true
15 | SourceDatabase.DatabaseSpec.Data.FieldSeparator
16 | SourceDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
17 | SourceDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
18 | SourceDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
19 | SourceDatabase.DatabaseSpec.Selection.SelectionAttribute
20 | SourceDatabase.DatabaseSpec.Selection.SelectionValue
21 |
22 | // Output database settings
23 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
24 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./AdultDeployed.csv //
25 | TargetDatabase.DatabaseSpec.Data.HeaderLineUsed true
26 | TargetDatabase.DatabaseSpec.Data.FieldSeparator
27 |
28 | // Transfer
29 | TransferDatabase
30 | Exit
31 |
32 | // End of scenario for task deploy_model
33 |
34 | // Exit Khiops
35 | ClassManagement.Quit
36 | OK
37 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/deploy_model/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task deploy_model
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Deploy settings
8 | LearningTools.TransferDatabase
9 | ClassName Customer
10 |
11 | // Input database settings
12 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
13 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
14 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
15 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
16 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
17 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
18 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
19 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
20 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /City
21 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CityBidon.csv //
22 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
23 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CountryBidon.csv //
24 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
25 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ProductBidon.csv //
26 | SourceDatabase.DatabaseSpec.Data.HeaderLineUsed true
27 | SourceDatabase.DatabaseSpec.Data.FieldSeparator
28 | SourceDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
29 | SourceDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
30 | SourceDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
31 | SourceDatabase.DatabaseSpec.Selection.SelectionAttribute
32 | SourceDatabase.DatabaseSpec.Selection.SelectionValue
33 |
34 | // Output database settings
35 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
36 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./CustomerDeployed.csv //
37 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
38 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferServicesBidon.csv //
39 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
40 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferUsagesBidon.csv //
41 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
42 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferAddressBidon.csv //
43 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /City
44 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferCityBidon.csv //
45 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
46 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferCountryBidon.csv //
47 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
48 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferProductBidon.csv //
49 | TargetDatabase.DatabaseSpec.Data.HeaderLineUsed true
50 | TargetDatabase.DatabaseSpec.Data.FieldSeparator
51 |
52 | // Transfer
53 | TransferDatabase
54 | Exit
55 |
56 | // End of scenario for task deploy_model
57 |
58 | // Exit Khiops
59 | ClassManagement.Quit
60 | OK
61 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/deploy_model/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task deploy_model
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Deploy settings
8 | LearningTools.TransferDatabase
9 | ClassName SpliceJunction
10 |
11 | // Input database settings
12 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
13 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunction.csv //
14 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
15 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunctionDNABidon.csv //
16 | SourceDatabase.DatabaseSpec.Data.HeaderLineUsed true
17 | SourceDatabase.DatabaseSpec.Data.FieldSeparator
18 | SourceDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
19 | SourceDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
20 | SourceDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
21 | SourceDatabase.DatabaseSpec.Selection.SelectionAttribute
22 | SourceDatabase.DatabaseSpec.Selection.SelectionValue
23 |
24 | // Output database settings
25 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
26 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./SpliceJunctionDeployed.csv //
27 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
28 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferSpliceJunctionDNABidon.csv //
29 | TargetDatabase.DatabaseSpec.Data.HeaderLineUsed true
30 | TargetDatabase.DatabaseSpec.Data.FieldSeparator
31 |
32 | // Transfer
33 | TransferDatabase
34 | Exit
35 |
36 | // End of scenario for task deploy_model
37 |
38 | // Exit Khiops
39 | ClassManagement.Quit
40 | OK
41 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/detect_data_table_format/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task detect_data_table_format_with_dictionary
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | TrainDatabase.ClassName Adult
8 |
9 | // Detect format the data table format on the "Extract Keys" window
10 | LearningTools.ExtractKeysFromDataTable
11 | SourceDataTable.DatabaseSpec.Data.DatabaseName Adult.csv //
12 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
13 | Exit
14 |
15 | // End of scenario for task detect_data_table_format_with_dictionary
16 |
17 | // Exit Khiops
18 | ClassManagement.Quit
19 | OK
20 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/detect_data_table_format/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task detect_data_table_format
2 | // Detect format on the "Build Dictionary" window
3 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
4 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
5 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
6 |
7 | // End of scenario for task detect_data_table_format
8 |
9 | // Exit Khiops
10 | ClassManagement.Quit
11 | OK
12 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/detect_data_table_format/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task detect_data_table_format_with_dictionary
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunctionDNA.kdic //
5 | OK
6 |
7 | TrainDatabase.ClassName SpliceJunctionDNA
8 |
9 | // Detect format the data table format on the "Extract Keys" window
10 | LearningTools.ExtractKeysFromDataTable
11 | SourceDataTable.DatabaseSpec.Data.DatabaseName SpliceJunction.csv //
12 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
13 | Exit
14 |
15 | // End of scenario for task detect_data_table_format_with_dictionary
16 |
17 | // Exit Khiops
18 | ClassManagement.Quit
19 | OK
20 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/evaluate_predictor/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task evaluate_predictor
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName ModelingAdult.kdic //
5 | OK
6 |
7 | // Evaluate predictor settings
8 | LearningTools.EvaluatePredictors
9 | MainTargetModality
10 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
11 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Adult.csv //
12 | EvaluationDatabase.DatabaseSpec.Data.HeaderLineUsed true
13 | EvaluationDatabase.DatabaseSpec.Data.FieldSeparator
14 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
15 | EvaluationDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
16 | EvaluationDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
17 | EvaluatedPredictors.List.Key Adult
18 | EvaluationDatabase.DatabaseSpec.Selection.SelectionAttribute
19 | EvaluationDatabase.DatabaseSpec.Selection.SelectionValue
20 | ExportAsXls false
21 | EvaluationFileName AdultResults\AdultAnalysisResults.khj //
22 |
23 | // Evaluate predictor
24 | EvaluatePredictors
25 | Exit
26 |
27 | // End of scenario for task evaluate_predictor
28 |
29 | // Exit Khiops
30 | ClassManagement.Quit
31 | OK
32 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/evaluate_predictor/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task evaluate_predictor
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName ModelingCustomer.kdic //
5 | OK
6 |
7 | // Evaluate predictor settings
8 | LearningTools.EvaluatePredictors
9 | MainTargetModality
10 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
11 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
12 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
13 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
14 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
15 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
16 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
17 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
18 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /City
19 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CityBidon.csv //
20 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
21 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CountryBidon.csv //
22 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
23 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ProductBidon.csv //
24 | EvaluationDatabase.DatabaseSpec.Data.HeaderLineUsed true
25 | EvaluationDatabase.DatabaseSpec.Data.FieldSeparator
26 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
27 | EvaluationDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
28 | EvaluationDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
29 | EvaluatedPredictors.List.Key Customer
30 | EvaluationDatabase.DatabaseSpec.Selection.SelectionAttribute
31 | EvaluationDatabase.DatabaseSpec.Selection.SelectionValue
32 | ExportAsXls false
33 | EvaluationFileName CustomerResults\CustomerAnalysisResults.khj //
34 |
35 | // Evaluate predictor
36 | EvaluatePredictors
37 | Exit
38 |
39 | // End of scenario for task evaluate_predictor
40 |
41 | // Exit Khiops
42 | ClassManagement.Quit
43 | OK
44 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/evaluate_predictor/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task evaluate_predictor
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName ModelingSpliceJunction.kdic //
5 | OK
6 |
7 | // Evaluate predictor settings
8 | LearningTools.EvaluatePredictors
9 | MainTargetModality
10 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
11 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunction.csv //
12 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
13 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunctionDNABidon.csv //
14 | EvaluationDatabase.DatabaseSpec.Data.HeaderLineUsed true
15 | EvaluationDatabase.DatabaseSpec.Data.FieldSeparator
16 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
17 | EvaluationDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
18 | EvaluationDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
19 | EvaluatedPredictors.List.Key SpliceJunction
20 | EvaluationDatabase.DatabaseSpec.Selection.SelectionAttribute
21 | EvaluationDatabase.DatabaseSpec.Selection.SelectionValue
22 | ExportAsXls false
23 | EvaluationFileName SpliceJunctionResults\SpliceJunctionAnalysisResults.khj //
24 |
25 | // Evaluate predictor
26 | EvaluatePredictors
27 | Exit
28 |
29 | // End of scenario for task evaluate_predictor
30 |
31 | // Exit Khiops
32 | ClassManagement.Quit
33 | OK
34 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/export_dictionary_as_json/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task export_dictionary_as_json
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Export dictionary as JSON file
8 | ClassManagement.ExportAsJSON
9 | JSONFileName Adult.kdicj //
10 | OK
11 |
12 | // End of scenario for task export_dictionary_as_json
13 |
14 | // Exit Khiops
15 | ClassManagement.Quit
16 | OK
17 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/export_dictionary_as_json/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task export_dictionary_as_json
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Export dictionary as JSON file
8 | ClassManagement.ExportAsJSON
9 | JSONFileName Customer.kdicj //
10 | OK
11 |
12 | // End of scenario for task export_dictionary_as_json
13 |
14 | // Exit Khiops
15 | ClassManagement.Quit
16 | OK
17 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/export_dictionary_as_json/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task export_dictionary_as_json
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Export dictionary as JSON file
8 | ClassManagement.ExportAsJSON
9 | JSONFileName SpliceJunction.kdicj //
10 | OK
11 |
12 | // End of scenario for task export_dictionary_as_json
13 |
14 | // Exit Khiops
15 | ClassManagement.Quit
16 | OK
17 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/extract_clusters/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task extract_clusters
2 | // Extract cluster settings
3 | LearningTools.ExtractClusters
4 | SelectInputCoclustering
5 | InputCoclusteringFileName AdultCoclustering.khc //
6 | OK
7 | CoclusteringAttribute age
8 | PostProcessingSpec.MaxPreservedInformation 0
9 | PostProcessingSpec.MaxCellNumber 0
10 | PostProcessingSpec.MaxTotalPartNumber 0
11 |
12 | // Output settings
13 | ClusterFileName AdultClusters.txt //
14 |
15 | // Extract clusters
16 | ExtractClusters
17 | Exit
18 |
19 | // End of scenario for task extract_clusters
20 |
21 | // Exit Khiops
22 | ClassManagement.Quit
23 | OK
24 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/extract_clusters/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task extract_clusters
2 | // Extract cluster settings
3 | LearningTools.ExtractClusters
4 | SelectInputCoclustering
5 | InputCoclusteringFileName CustomerCoclustering.khc //
6 | OK
7 | CoclusteringAttribute id_customer
8 | PostProcessingSpec.MaxPreservedInformation 0
9 | PostProcessingSpec.MaxCellNumber 0
10 | PostProcessingSpec.MaxTotalPartNumber 0
11 |
12 | // Output settings
13 | ClusterFileName CustomerClusters.txt //
14 |
15 | // Extract clusters
16 | ExtractClusters
17 | Exit
18 |
19 | // End of scenario for task extract_clusters
20 |
21 | // Exit Khiops
22 | ClassManagement.Quit
23 | OK
24 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/extract_clusters/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task extract_clusters
2 | // Extract cluster settings
3 | LearningTools.ExtractClusters
4 | SelectInputCoclustering
5 | InputCoclusteringFileName SpliceJunctionCoclustering.khc //
6 | OK
7 | CoclusteringAttribute SampleId
8 | PostProcessingSpec.MaxPreservedInformation 0
9 | PostProcessingSpec.MaxCellNumber 0
10 | PostProcessingSpec.MaxTotalPartNumber 0
11 |
12 | // Output settings
13 | ClusterFileName SpliceJunctionClusters.txt //
14 |
15 | // Extract clusters
16 | ExtractClusters
17 | Exit
18 |
19 | // End of scenario for task extract_clusters
20 |
21 | // Exit Khiops
22 | ClassManagement.Quit
23 | OK
24 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/extract_keys_from_data_table/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task extract_keys_from_data_table
2 | // Dictionary file
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Extract keys settings
8 | LearningTools.ExtractKeysFromDataTable
9 | ClassName Adult
10 | SourceDataTable.DatabaseSpec.Data.DatabaseName Adult.csv //
11 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
12 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
13 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | TargetDataTable.DatabaseSpec.Data.DatabaseName ./AdultKeys.csv //
15 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed true
16 | TargetDataTable.DatabaseSpec.Data.FieldSeparator
17 | ExtractKeysFromDataTable
18 | Exit
19 |
20 | // End of scenario for task extract_keys_from_data_table
21 |
22 | // Exit Khiops
23 | ClassManagement.Quit
24 | OK
25 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/extract_keys_from_data_table/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task extract_keys_from_data_table
2 | // Dictionary file
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Extract keys settings
8 | LearningTools.ExtractKeysFromDataTable
9 | ClassName Customer
10 | SourceDataTable.DatabaseSpec.Data.DatabaseName Customer.csv //
11 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
12 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
13 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | TargetDataTable.DatabaseSpec.Data.DatabaseName ./CustomerKeys.csv //
15 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed true
16 | TargetDataTable.DatabaseSpec.Data.FieldSeparator
17 | ExtractKeysFromDataTable
18 | Exit
19 |
20 | // End of scenario for task extract_keys_from_data_table
21 |
22 | // Exit Khiops
23 | ClassManagement.Quit
24 | OK
25 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/extract_keys_from_data_table/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task extract_keys_from_data_table
2 | // Dictionary file
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Extract keys settings
8 | LearningTools.ExtractKeysFromDataTable
9 | ClassName SpliceJunction
10 | SourceDataTable.DatabaseSpec.Data.DatabaseName SpliceJunction.csv //
11 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
12 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
13 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | TargetDataTable.DatabaseSpec.Data.DatabaseName ./SpliceJunctionKeys.csv //
15 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed true
16 | TargetDataTable.DatabaseSpec.Data.FieldSeparator
17 | ExtractKeysFromDataTable
18 | Exit
19 |
20 | // End of scenario for task extract_keys_from_data_table
21 |
22 | // Exit Khiops
23 | ClassManagement.Quit
24 | OK
25 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/prepare_coclustering_deployment/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task prepare_coclustering_deployment
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Prepare deployment window
8 | LearningTools.PrepareDeployment
9 |
10 | // Coclustering file
11 | SelectInputCoclustering
12 | InputCoclusteringFileName Adult._khc //
13 | OK
14 |
15 | // Simplification settings
16 | PostProcessingSpec.MaxPreservedInformation 0
17 | PostProcessingSpec.MaxCellNumber 0
18 | PostProcessingSpec.MaxTotalPartNumber 0
19 | PostProcessingSpec.PostProcessedAttributes.List.Key age
20 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 2
21 | PostProcessingSpec.PostProcessedAttributes.List.Key workclass
22 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 4
23 | PostProcessingSpec.PostProcessedAttributes.List.Key race
24 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 8
25 | PostProcessingSpec.PostProcessedAttributes.List.Key sex
26 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 16
27 |
28 | // Deployment dictionary settings
29 | DeploymentSpec.InputClassName Adult
30 | DeploymentSpec.InputObjectArrayAttributeName age
31 | DeploymentSpec.DeployedAttributeName workclass
32 | DeploymentSpec.BuildPredictedClusterAttribute true
33 | DeploymentSpec.BuildClusterDistanceAttributes false
34 | DeploymentSpec.BuildFrequencyRecodingAttributes false
35 | DeploymentSpec.OutputAttributesPrefix
36 |
37 | // Output settings
38 | CoclusteringDictionaryFileName AdultResults/AdultCoclusteringResults.khcj //
39 |
40 | // Execute prepare deployment
41 | PrepareDeployment
42 | Exit
43 |
44 | // End of scenario for task prepare_coclustering_deployment
45 |
46 | // Exit Khiops
47 | ClassManagement.Quit
48 | OK
49 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/prepare_coclustering_deployment/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task prepare_coclustering_deployment
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Prepare deployment window
8 | LearningTools.PrepareDeployment
9 |
10 | // Coclustering file
11 | SelectInputCoclustering
12 | InputCoclusteringFileName Customer._khc //
13 | OK
14 |
15 | // Simplification settings
16 | PostProcessingSpec.MaxPreservedInformation 0
17 | PostProcessingSpec.MaxCellNumber 0
18 | PostProcessingSpec.MaxTotalPartNumber 0
19 |
20 | // Deployment dictionary settings
21 | DeploymentSpec.InputClassName Customer
22 | DeploymentSpec.InputObjectArrayAttributeName id_customer
23 | DeploymentSpec.DeployedAttributeName Name
24 | DeploymentSpec.BuildPredictedClusterAttribute true
25 | DeploymentSpec.BuildClusterDistanceAttributes false
26 | DeploymentSpec.BuildFrequencyRecodingAttributes false
27 | DeploymentSpec.OutputAttributesPrefix
28 |
29 | // Output settings
30 | CoclusteringDictionaryFileName CustomerResults/CustomerCoclusteringResults.khcj //
31 |
32 | // Execute prepare deployment
33 | PrepareDeployment
34 | Exit
35 |
36 | // End of scenario for task prepare_coclustering_deployment
37 |
38 | // Exit Khiops
39 | ClassManagement.Quit
40 | OK
41 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/prepare_coclustering_deployment/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task prepare_coclustering_deployment
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Prepare deployment window
8 | LearningTools.PrepareDeployment
9 |
10 | // Coclustering file
11 | SelectInputCoclustering
12 | InputCoclusteringFileName SpliceJunction._khc //
13 | OK
14 |
15 | // Simplification settings
16 | PostProcessingSpec.MaxPreservedInformation 0
17 | PostProcessingSpec.MaxCellNumber 0
18 | PostProcessingSpec.MaxTotalPartNumber 0
19 | PostProcessingSpec.PostProcessedAttributes.List.Key SampleId
20 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 32
21 | PostProcessingSpec.PostProcessedAttributes.List.Key NonExistentVar
22 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 64
23 |
24 | // Deployment dictionary settings
25 | DeploymentSpec.InputClassName SpliceJunction
26 | DeploymentSpec.InputObjectArrayAttributeName SampleId
27 | DeploymentSpec.DeployedAttributeName NonExistentVar
28 | DeploymentSpec.BuildPredictedClusterAttribute true
29 | DeploymentSpec.BuildClusterDistanceAttributes false
30 | DeploymentSpec.BuildFrequencyRecodingAttributes false
31 | DeploymentSpec.OutputAttributesPrefix
32 |
33 | // Output settings
34 | CoclusteringDictionaryFileName SpliceJunctionResults/SpliceJunctionCoclusteringResults.khcj //
35 |
36 | // Execute prepare deployment
37 | PrepareDeployment
38 | Exit
39 |
40 | // End of scenario for task prepare_coclustering_deployment
41 |
42 | // Exit Khiops
43 | ClassManagement.Quit
44 | OK
45 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/simplify_coclustering/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task simplify_coclustering
2 | // Simplify coclustering settings
3 | LearningTools.PostProcessCoclustering
4 | SelectInputCoclustering
5 | InputCoclusteringFileName Adult._khc //
6 | OK
7 | PostProcessingSpec.MaxPreservedInformation 0
8 | PostProcessingSpec.MaxCellNumber 0
9 | PostProcessingSpec.MaxTotalPartNumber 0
10 | PostProcessingSpec.PostProcessedAttributes.List.Key age
11 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 2
12 | PostProcessingSpec.PostProcessedAttributes.List.Key workclass
13 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 4
14 | PostProcessingSpec.PostProcessedAttributes.List.Key race
15 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 8
16 | PostProcessingSpec.PostProcessedAttributes.List.Key sex
17 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 16
18 |
19 | // Output settings
20 | PostProcessedCoclusteringFileName AdultResults\AdultSimplifiedCoclusteringResults.khcj //
21 |
22 | // Simplify Coclustering
23 | PostProcessCoclustering
24 | Exit
25 |
26 | // End of scenario for task simplify_coclustering
27 |
28 | // Exit Khiops
29 | ClassManagement.Quit
30 | OK
31 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/simplify_coclustering/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task simplify_coclustering
2 | // Simplify coclustering settings
3 | LearningTools.PostProcessCoclustering
4 | SelectInputCoclustering
5 | InputCoclusteringFileName Customer._khc //
6 | OK
7 | PostProcessingSpec.MaxPreservedInformation 0
8 | PostProcessingSpec.MaxCellNumber 0
9 | PostProcessingSpec.MaxTotalPartNumber 0
10 |
11 | // Output settings
12 | PostProcessedCoclusteringFileName CustomerResults\CustomerSimplifiedCoclusteringResults.khcj //
13 |
14 | // Simplify Coclustering
15 | PostProcessCoclustering
16 | Exit
17 |
18 | // End of scenario for task simplify_coclustering
19 |
20 | // Exit Khiops
21 | ClassManagement.Quit
22 | OK
23 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/simplify_coclustering/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task simplify_coclustering
2 | // Simplify coclustering settings
3 | LearningTools.PostProcessCoclustering
4 | SelectInputCoclustering
5 | InputCoclusteringFileName SpliceJunction._khc //
6 | OK
7 | PostProcessingSpec.MaxPreservedInformation 0
8 | PostProcessingSpec.MaxCellNumber 0
9 | PostProcessingSpec.MaxTotalPartNumber 0
10 | PostProcessingSpec.PostProcessedAttributes.List.Key SampleId
11 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 32
12 | PostProcessingSpec.PostProcessedAttributes.List.Key NonExistentVar
13 | PostProcessingSpec.PostProcessedAttributes.MaxPartNumber 64
14 |
15 | // Output settings
16 | PostProcessedCoclusteringFileName SpliceJunctionResults\SpliceJunctionSimplifiedCoclusteringResults.khcj //
17 |
18 | // Simplify Coclustering
19 | PostProcessCoclustering
20 | Exit
21 |
22 | // End of scenario for task simplify_coclustering
23 |
24 | // Exit Khiops
25 | ClassManagement.Quit
26 | OK
27 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/sort_data_table/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task sort_data_table
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Sort table settings
8 | LearningTools.SortDataTableByKey
9 | ClassName Adult
10 | SortAttributes.SelectDefaultKeyAttributes
11 | SortAttributes.RemoveItem
12 | SortAttributes.RemoveItem
13 | SortAttributes.RemoveItem
14 | SortAttributes.RemoveItem
15 | SortAttributes.RemoveItem
16 | SortAttributes.RemoveItem
17 | SortAttributes.RemoveItem
18 | SortAttributes.RemoveItem
19 | SortAttributes.RemoveItem
20 | SortAttributes.RemoveItem
21 | SortAttributes.InsertItemAfter
22 | SortAttributes.Name Label
23 | SortAttributes.InsertItemAfter
24 | SortAttributes.Name age
25 | SortAttributes.InsertItemAfter
26 | SortAttributes.Name race
27 |
28 | // Source table settings
29 | SourceDataTable.DatabaseSpec.Data.DatabaseName Adult.csv //
30 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
31 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
32 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
33 |
34 | // Target table settings
35 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed true
36 | TargetDataTable.DatabaseSpec.Data.DatabaseName ./AdultSorted.csv //
37 | TargetDataTable.DatabaseSpec.Data.FieldSeparator
38 |
39 | // Sort table
40 | SortDataTableByKey
41 | Exit
42 |
43 | // End of scenario for task sort_data_table
44 |
45 | // Exit Khiops
46 | ClassManagement.Quit
47 | OK
48 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/sort_data_table/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task sort_data_table
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Sort table settings
8 | LearningTools.SortDataTableByKey
9 | ClassName Customer
10 | SortAttributes.SelectDefaultKeyAttributes
11 |
12 | // Source table settings
13 | SourceDataTable.DatabaseSpec.Data.DatabaseName Customer.csv //
14 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
15 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
16 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
17 |
18 | // Target table settings
19 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed true
20 | TargetDataTable.DatabaseSpec.Data.DatabaseName ./CustomerSorted.csv //
21 | TargetDataTable.DatabaseSpec.Data.FieldSeparator
22 |
23 | // Sort table
24 | SortDataTableByKey
25 | Exit
26 |
27 | // End of scenario for task sort_data_table
28 |
29 | // Exit Khiops
30 | ClassManagement.Quit
31 | OK
32 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/sort_data_table/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task sort_data_table
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Sort table settings
8 | LearningTools.SortDataTableByKey
9 | ClassName SpliceJunction
10 | SortAttributes.SelectDefaultKeyAttributes
11 | SortAttributes.RemoveItem
12 | SortAttributes.RemoveItem
13 | SortAttributes.RemoveItem
14 | SortAttributes.RemoveItem
15 | SortAttributes.RemoveItem
16 | SortAttributes.RemoveItem
17 | SortAttributes.RemoveItem
18 | SortAttributes.RemoveItem
19 | SortAttributes.RemoveItem
20 | SortAttributes.RemoveItem
21 | SortAttributes.InsertItemAfter
22 | SortAttributes.Name SampleId
23 |
24 | // Source table settings
25 | SourceDataTable.DatabaseSpec.Data.DatabaseName SpliceJunction.csv //
26 | SourceDataTable.DatabaseSpec.Data.HeaderLineUsed true
27 | SourceDataTable.DatabaseSpec.Data.FieldSeparator
28 | SourceDataTable.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
29 |
30 | // Target table settings
31 | TargetDataTable.DatabaseSpec.Data.HeaderLineUsed true
32 | TargetDataTable.DatabaseSpec.Data.DatabaseName ./SpliceJunctionSorted.csv //
33 | TargetDataTable.DatabaseSpec.Data.FieldSeparator
34 |
35 | // Sort table
36 | SortDataTableByKey
37 | Exit
38 |
39 | // End of scenario for task sort_data_table
40 |
41 | // Exit Khiops
42 | ClassManagement.Quit
43 | OK
44 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_coclustering/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_coclustering
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Train database settings
8 | Database.ClassName Adult
9 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName Adult.csv //
11 | Database.DatabaseSpec.Data.HeaderLineUsed true
12 | Database.DatabaseSpec.Data.FieldSeparator
13 | Database.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | Database.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
15 | Database.DatabaseSpec.Sampling.SamplingMode Include sample
16 | Database.DatabaseSpec.Selection.SelectionAttribute
17 | Database.DatabaseSpec.Selection.SelectionValue
18 |
19 | // Coclustering variables settings
20 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
21 | AnalysisSpec.CoclusteringParameters.Attributes.Name age
22 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
23 | AnalysisSpec.CoclusteringParameters.Attributes.Name workclass
24 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
25 | AnalysisSpec.CoclusteringParameters.Attributes.Name race
26 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
27 | AnalysisSpec.CoclusteringParameters.Attributes.Name sex
28 | AnalysisSpec.CoclusteringParameters.FrequencyAttributeName
29 |
30 | // Minimum optimization time
31 | AnalysisSpec.SystemParameters.OptimizationTime 0
32 |
33 | // Output settings
34 | AnalysisResults.CoclusteringFileName AdultResults/AdultCoclusteringResults._khcj //
35 |
36 | // Train
37 | BuildCoclustering
38 |
39 | // End of scenario for task train_coclustering
40 |
41 | // Exit Khiops
42 | ClassManagement.Quit
43 | OK
44 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_coclustering/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_coclustering
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Train database settings
8 | Database.ClassName Customer
9 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key /City
18 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName CityBidon.csv //
19 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
20 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName CountryBidon.csv //
21 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
22 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName ProductBidon.csv //
23 | Database.DatabaseSpec.Data.HeaderLineUsed true
24 | Database.DatabaseSpec.Data.FieldSeparator
25 | Database.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
26 | Database.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
27 | Database.DatabaseSpec.Sampling.SamplingMode Include sample
28 | Database.DatabaseSpec.Selection.SelectionAttribute
29 | Database.DatabaseSpec.Selection.SelectionValue
30 |
31 | // Coclustering variables settings
32 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
33 | AnalysisSpec.CoclusteringParameters.Attributes.Name id_customer
34 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
35 | AnalysisSpec.CoclusteringParameters.Attributes.Name Name
36 | AnalysisSpec.CoclusteringParameters.FrequencyAttributeName
37 |
38 | // Minimum optimization time
39 | AnalysisSpec.SystemParameters.OptimizationTime 0
40 |
41 | // Output settings
42 | AnalysisResults.CoclusteringFileName CustomerResults/CustomerCoclusteringResults._khcj //
43 |
44 | // Train
45 | BuildCoclustering
46 |
47 | // End of scenario for task train_coclustering
48 |
49 | // Exit Khiops
50 | ClassManagement.Quit
51 | OK
52 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_coclustering/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_coclustering
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Train database settings
8 | Database.ClassName SpliceJunction
9 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunction.csv //
11 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
12 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunctionDNABidon.csv //
13 | Database.DatabaseSpec.Data.HeaderLineUsed true
14 | Database.DatabaseSpec.Data.FieldSeparator
15 | Database.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
16 | Database.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
17 | Database.DatabaseSpec.Sampling.SamplingMode Include sample
18 | Database.DatabaseSpec.Selection.SelectionAttribute
19 | Database.DatabaseSpec.Selection.SelectionValue
20 |
21 | // Coclustering variables settings
22 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
23 | AnalysisSpec.CoclusteringParameters.Attributes.Name SampleId
24 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
25 | AnalysisSpec.CoclusteringParameters.Attributes.Name NonExistentVar
26 | AnalysisSpec.CoclusteringParameters.FrequencyAttributeName
27 |
28 | // Minimum optimization time
29 | AnalysisSpec.SystemParameters.OptimizationTime 0
30 |
31 | // Output settings
32 | AnalysisResults.CoclusteringFileName SpliceJunctionResults/SpliceJunctionCoclusteringResults._khcj //
33 |
34 | // Train
35 | BuildCoclustering
36 |
37 | // End of scenario for task train_coclustering
38 |
39 | // Exit Khiops
40 | ClassManagement.Quit
41 | OK
42 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_predictor/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_predictor
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 |
7 | // Train/test database settings
8 | TrainDatabase.ClassName Adult
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Adult.csv //
11 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
12 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 70.0
15 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
16 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
17 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
18 | TrainDatabase.TestDatabaseSpecificationMode Complementary
19 |
20 | // Target variable
21 | AnalysisSpec.TargetAttributeName class
22 | AnalysisSpec.MainTargetModality
23 |
24 | // Do data preparation only
25 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly false
26 |
27 | // Selective Naive Bayes settings
28 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.TrainParameters.MaxEvaluatedAttributeNumber 0
29 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.SelectionParameters.MaxSelectedAttributeNumber 0
30 |
31 | // Feature engineering
32 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
33 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
34 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
35 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
36 | AllAttributePairs true
37 | SpecificAttributePairs.InsertItemAfter
38 | SpecificAttributePairs.FirstName age
39 | SpecificAttributePairs.SecondName rage
40 | SpecificAttributePairs.InsertItemAfter
41 | SpecificAttributePairs.FirstName Label
42 | SpecificAttributePairs.SecondName
43 | SpecificAttributePairs.InsertItemAfter
44 | SpecificAttributePairs.FirstName
45 | SpecificAttributePairs.SecondName capital_gain
46 | Exit
47 | AnalysisSpec.PredictorsSpec.ConstructionSpec.KeepSelectedAttributesOnly true
48 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 1000
49 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
50 | UnselectAll
51 | Exit
52 |
53 | // Text feature parameters
54 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
55 | TextFeatures words
56 | Exit
57 |
58 |
59 | // Data preparation (discretization & grouping) settings
60 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
61 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
62 | DiscretizerUnsupervisedMethodName MODL
63 | GrouperUnsupervisedMethodName MODL
64 | Exit
65 |
66 | // Max parts
67 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
68 |
69 | // Output settings
70 | AnalysisResults.ReportFileName AdultResults/AdultAnalysisResults._khj //
71 |
72 | // Build model
73 | ComputeStats
74 |
75 | // End of scenario for task train_predictor
76 |
77 | // Exit Khiops
78 | ClassManagement.Quit
79 | OK
80 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_predictor/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_predictor
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Train/test database settings
8 | TrainDatabase.ClassName Customer
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /City
18 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CityBidon.csv //
19 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
20 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CountryBidon.csv //
21 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
22 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ProductBidon.csv //
23 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
24 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
25 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
26 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 70.0
27 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
28 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
29 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
30 | TrainDatabase.TestDatabaseSpecificationMode Complementary
31 |
32 | // Target variable
33 | AnalysisSpec.TargetAttributeName
34 | AnalysisSpec.MainTargetModality
35 |
36 | // Do data preparation only
37 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly false
38 |
39 | // Selective Naive Bayes settings
40 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.TrainParameters.MaxEvaluatedAttributeNumber 0
41 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.SelectionParameters.MaxSelectedAttributeNumber 0
42 |
43 | // Feature engineering
44 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
45 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
46 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
47 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
48 | AllAttributePairs true
49 | Exit
50 | AnalysisSpec.PredictorsSpec.ConstructionSpec.KeepSelectedAttributesOnly true
51 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 1000
52 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
53 | Exit
54 |
55 | // Text feature parameters
56 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
57 | TextFeatures words
58 | Exit
59 |
60 |
61 | // Data preparation (discretization & grouping) settings
62 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
63 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
64 | DiscretizerUnsupervisedMethodName MODL
65 | GrouperUnsupervisedMethodName MODL
66 | Exit
67 |
68 | // Max parts
69 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
70 |
71 | // Output settings
72 | AnalysisResults.ReportFileName CustomerResults/CustomerAnalysisResults._khj //
73 |
74 | // Build model
75 | ComputeStats
76 |
77 | // End of scenario for task train_predictor
78 |
79 | // Exit Khiops
80 | ClassManagement.Quit
81 | OK
82 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_predictor/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_predictor
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 |
7 | // Train/test database settings
8 | TrainDatabase.ClassName SpliceJunction
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunction.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunctionDNABidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
14 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
16 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 70.0
17 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
18 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
19 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
20 | TrainDatabase.TestDatabaseSpecificationMode Complementary
21 |
22 | // Target variable
23 | AnalysisSpec.TargetAttributeName Class
24 | AnalysisSpec.MainTargetModality
25 |
26 | // Do data preparation only
27 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly false
28 |
29 | // Selective Naive Bayes settings
30 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.TrainParameters.MaxEvaluatedAttributeNumber 0
31 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.SelectionParameters.MaxSelectedAttributeNumber 0
32 |
33 | // Feature engineering
34 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
35 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
36 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
37 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
38 | AllAttributePairs true
39 | Exit
40 | AnalysisSpec.PredictorsSpec.ConstructionSpec.KeepSelectedAttributesOnly true
41 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 1000
42 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
43 | UnselectAll
44 | ConstructionRules.List.Key TableMode
45 | ConstructionRules.Used true
46 | ConstructionRules.List.Key TableSelection
47 | ConstructionRules.Used true
48 | Exit
49 |
50 | // Text feature parameters
51 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
52 | TextFeatures words
53 | Exit
54 |
55 |
56 | // Data preparation (discretization & grouping) settings
57 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
58 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
59 | DiscretizerUnsupervisedMethodName MODL
60 | GrouperUnsupervisedMethodName MODL
61 | Exit
62 |
63 | // Max parts
64 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
65 |
66 | // Output settings
67 | AnalysisResults.ReportFileName SpliceJunctionResults/SpliceJunctionAnalysisResults._khj //
68 |
69 | // Build model
70 | ComputeStats
71 |
72 | // End of scenario for task train_predictor
73 |
74 | // Exit Khiops
75 | ClassManagement.Quit
76 | OK
77 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_recoder/ref/Adult._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_recoder
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Adult.kdic //
5 | OK
6 | TrainDatabase.ClassName Adult
7 |
8 | // Train/test database settings
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Adult.csv //
11 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
12 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
14 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
15 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
16 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
17 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
18 |
19 | // Target variable
20 | AnalysisSpec.TargetAttributeName class
21 |
22 | // Disable predictors: do data preparation only
23 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly true
24 |
25 |
26 | // Feature engineering
27 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
28 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
29 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
30 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
31 | AllAttributePairs true
32 | SpecificAttributePairs.InsertItemAfter
33 | SpecificAttributePairs.FirstName age
34 | SpecificAttributePairs.SecondName rage
35 | SpecificAttributePairs.InsertItemAfter
36 | SpecificAttributePairs.FirstName Label
37 | SpecificAttributePairs.SecondName
38 | SpecificAttributePairs.InsertItemAfter
39 | SpecificAttributePairs.FirstName
40 | SpecificAttributePairs.SecondName capital_gain
41 | Exit
42 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 100
43 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
44 | UnselectAll
45 | Exit
46 |
47 | // Text feature parameters
48 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
49 | TextFeatures words
50 | Exit
51 |
52 | // Data preparation (discretization & grouping) settings
53 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
54 |
55 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
56 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
57 | DiscretizerUnsupervisedMethodName MODL
58 | GrouperUnsupervisedMethodName MODL
59 | Exit
60 |
61 |
62 | // Recoder Settings
63 | AnalysisSpec.RecodersSpec.Recoder true
64 | AnalysisSpec.RecodersSpec.RecodingSpec.FilterAttributes true
65 | AnalysisSpec.RecodersSpec.RecodingSpec.MaxFilteredAttributeNumber 0
66 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialSymbolAttributes false
67 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialContinuousAttributes false
68 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeSymbolAttributes part Id
69 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeContinuousAttributes part Id
70 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeBivariateAttributes part Id
71 |
72 | // Output settings
73 | AnalysisResults.ReportFileName AdultResults/AdultAnalysisResults._khj //
74 |
75 | // Train recoder
76 | ComputeStats
77 |
78 | // End of scenario for task train_recoder
79 |
80 | // Exit Khiops
81 | ClassManagement.Quit
82 | OK
83 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_recoder/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_recoder
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 | TrainDatabase.ClassName Customer
7 |
8 | // Train/test database settings
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /City
18 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CityBidon.csv //
19 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Country
20 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName CountryBidon.csv //
21 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key /Product
22 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ProductBidon.csv //
23 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
24 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
25 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
26 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
27 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
28 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
29 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
30 |
31 | // Target variable
32 | AnalysisSpec.TargetAttributeName
33 |
34 | // Disable predictors: do data preparation only
35 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly true
36 |
37 |
38 | // Feature engineering
39 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
40 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
41 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
42 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
43 | AllAttributePairs true
44 | Exit
45 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 100
46 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
47 | Exit
48 |
49 | // Text feature parameters
50 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
51 | TextFeatures words
52 | Exit
53 |
54 | // Data preparation (discretization & grouping) settings
55 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
56 |
57 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
58 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
59 | DiscretizerUnsupervisedMethodName MODL
60 | GrouperUnsupervisedMethodName MODL
61 | Exit
62 |
63 |
64 | // Recoder Settings
65 | AnalysisSpec.RecodersSpec.Recoder true
66 | AnalysisSpec.RecodersSpec.RecodingSpec.FilterAttributes true
67 | AnalysisSpec.RecodersSpec.RecodingSpec.MaxFilteredAttributeNumber 0
68 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialSymbolAttributes false
69 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialContinuousAttributes false
70 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeSymbolAttributes part Id
71 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeContinuousAttributes part Id
72 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeBivariateAttributes part Id
73 |
74 | // Output settings
75 | AnalysisResults.ReportFileName CustomerResults/CustomerAnalysisResults._khj //
76 |
77 | // Train recoder
78 | ComputeStats
79 |
80 | // End of scenario for task train_recoder
81 |
82 | // Exit Khiops
83 | ClassManagement.Quit
84 | OK
85 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/api/train_recoder/ref/SpliceJunction._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_recoder
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName SpliceJunction.kdic //
5 | OK
6 | TrainDatabase.ClassName SpliceJunction
7 |
8 | // Train/test database settings
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunction.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key DNA
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName SpliceJunctionDNABidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
14 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
16 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
17 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
18 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
19 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
20 |
21 | // Target variable
22 | AnalysisSpec.TargetAttributeName Class
23 |
24 | // Disable predictors: do data preparation only
25 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly true
26 |
27 |
28 | // Feature engineering
29 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
30 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
31 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
32 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
33 | AllAttributePairs true
34 | Exit
35 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 100
36 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
37 | UnselectAll
38 | ConstructionRules.List.Key TableMode
39 | ConstructionRules.Used true
40 | ConstructionRules.List.Key TableSelection
41 | ConstructionRules.Used true
42 | Exit
43 |
44 | // Text feature parameters
45 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
46 | TextFeatures words
47 | Exit
48 |
49 | // Data preparation (discretization & grouping) settings
50 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
51 |
52 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
53 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
54 | DiscretizerUnsupervisedMethodName MODL
55 | GrouperUnsupervisedMethodName MODL
56 | Exit
57 |
58 |
59 | // Recoder Settings
60 | AnalysisSpec.RecodersSpec.Recoder true
61 | AnalysisSpec.RecodersSpec.RecodingSpec.FilterAttributes true
62 | AnalysisSpec.RecodersSpec.RecodingSpec.MaxFilteredAttributeNumber 0
63 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialSymbolAttributes false
64 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialContinuousAttributes false
65 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeSymbolAttributes part Id
66 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeContinuousAttributes part Id
67 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeBivariateAttributes part Id
68 |
69 | // Output settings
70 | AnalysisResults.ReportFileName SpliceJunctionResults/SpliceJunctionAnalysisResults._khj //
71 |
72 | // Train recoder
73 | ComputeStats
74 |
75 | // End of scenario for task train_recoder
76 |
77 | // Exit Khiops
78 | ClassManagement.Quit
79 | OK
80 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/data_path_deprecation/check_database/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task check_database
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Train database settings
8 | TrainDatabase.ClassName Customer
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
18 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
19 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
20 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
21 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
22 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
23 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
24 |
25 | // Log messages limit
26 | AnalysisSpec.SystemParameters.MaxErrorMessageNumberInLog 20
27 |
28 | // Execute check database
29 | LearningTools.CheckData
30 |
31 | // End of scenario for task check_database
32 |
33 | // Exit Khiops
34 | ClassManagement.Quit
35 | OK
36 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/data_path_deprecation/deploy_model/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task deploy_model
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Deploy settings
8 | LearningTools.TransferDatabase
9 | ClassName Customer
10 |
11 | // Input database settings
12 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
13 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
14 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
15 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
16 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
17 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
18 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
19 | SourceDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
20 | SourceDatabase.DatabaseSpec.Data.HeaderLineUsed true
21 | SourceDatabase.DatabaseSpec.Data.FieldSeparator
22 | SourceDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
23 | SourceDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
24 | SourceDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
25 | SourceDatabase.DatabaseSpec.Selection.SelectionAttribute
26 | SourceDatabase.DatabaseSpec.Selection.SelectionValue
27 |
28 | // Output database settings
29 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
30 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./CustomerDeployed.csv //
31 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
32 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferServicesBidon.csv //
33 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
34 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferUsagesBidon.csv //
35 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
36 | TargetDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ./TransferAddressBidon.csv //
37 | TargetDatabase.DatabaseSpec.Data.HeaderLineUsed true
38 | TargetDatabase.DatabaseSpec.Data.FieldSeparator
39 |
40 | // Transfer
41 | TransferDatabase
42 | Exit
43 |
44 | // End of scenario for task deploy_model
45 |
46 | // Exit Khiops
47 | ClassManagement.Quit
48 | OK
49 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/data_path_deprecation/evaluate_predictor/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task evaluate_predictor
2 | // Dictionary file settings
3 | ClassManagement.OpenFile
4 | ClassFileName ModelingCustomer.kdic //
5 | OK
6 |
7 | // Evaluate predictor settings
8 | LearningTools.EvaluatePredictors
9 | MainTargetModality
10 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
11 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
12 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
13 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
14 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
15 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
16 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
17 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
18 | EvaluationDatabase.DatabaseSpec.Data.HeaderLineUsed true
19 | EvaluationDatabase.DatabaseSpec.Data.FieldSeparator
20 | EvaluationDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
21 | EvaluationDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
22 | EvaluationDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
23 | EvaluatedPredictors.List.Key Customer
24 | EvaluationDatabase.DatabaseSpec.Selection.SelectionAttribute
25 | EvaluationDatabase.DatabaseSpec.Selection.SelectionValue
26 | ExportAsXls false
27 | EvaluationFileName CustomerResults\CustomerAnalysisResults.khj //
28 |
29 | // Evaluate predictor
30 | EvaluatePredictors
31 | Exit
32 |
33 | // End of scenario for task evaluate_predictor
34 |
35 | // Exit Khiops
36 | ClassManagement.Quit
37 | OK
38 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/data_path_deprecation/train_coclustering/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_coclustering
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Train database settings
8 | Database.ClassName Customer
9 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | Database.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | Database.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | Database.DatabaseSpec.Data.HeaderLineUsed true
18 | Database.DatabaseSpec.Data.FieldSeparator
19 | Database.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
20 | Database.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
21 | Database.DatabaseSpec.Sampling.SamplingMode Include sample
22 | Database.DatabaseSpec.Selection.SelectionAttribute
23 | Database.DatabaseSpec.Selection.SelectionValue
24 |
25 | // Coclustering variables settings
26 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
27 | AnalysisSpec.CoclusteringParameters.Attributes.Name id_customer
28 | AnalysisSpec.CoclusteringParameters.Attributes.InsertItemAfter
29 | AnalysisSpec.CoclusteringParameters.Attributes.Name Name
30 | AnalysisSpec.CoclusteringParameters.FrequencyAttributeName
31 |
32 | // Minimum optimization time
33 | AnalysisSpec.SystemParameters.OptimizationTime 0
34 |
35 | // Output settings
36 | AnalysisResults.CoclusteringFileName CustomerResults/CustomerCoclusteringResults._khcj //
37 |
38 | // Train
39 | BuildCoclustering
40 |
41 | // End of scenario for task train_coclustering
42 |
43 | // Exit Khiops
44 | ClassManagement.Quit
45 | OK
46 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/data_path_deprecation/train_predictor/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_predictor
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 |
7 | // Train/test database settings
8 | TrainDatabase.ClassName Customer
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
18 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
19 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
20 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 70.0
21 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
22 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
23 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
24 | TrainDatabase.TestDatabaseSpecificationMode Complementary
25 |
26 | // Target variable
27 | AnalysisSpec.TargetAttributeName
28 | AnalysisSpec.MainTargetModality
29 |
30 | // Do data preparation only
31 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly false
32 |
33 | // Selective Naive Bayes settings
34 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.TrainParameters.MaxEvaluatedAttributeNumber 0
35 | AnalysisSpec.PredictorsSpec.AdvancedSpec.SelectiveNaiveBayesParameters.SelectionParameters.MaxSelectedAttributeNumber 0
36 |
37 | // Feature engineering
38 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
39 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
40 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
41 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
42 | AllAttributePairs true
43 | Exit
44 | AnalysisSpec.PredictorsSpec.ConstructionSpec.KeepSelectedAttributesOnly true
45 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 1000
46 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
47 | Exit
48 |
49 | // Text feature parameters
50 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
51 | TextFeatures words
52 | Exit
53 |
54 |
55 | // Data preparation (discretization & grouping) settings
56 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
57 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
58 | DiscretizerUnsupervisedMethodName MODL
59 | GrouperUnsupervisedMethodName MODL
60 | Exit
61 |
62 | // Max parts
63 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
64 |
65 | // Output settings
66 | AnalysisResults.ReportFileName CustomerResults/CustomerAnalysisResults._khj //
67 |
68 | // Build model
69 | ComputeStats
70 |
71 | // End of scenario for task train_predictor
72 |
73 | // Exit Khiops
74 | ClassManagement.Quit
75 | OK
76 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/data_path_deprecation/train_recoder/ref/Customer._kh:
--------------------------------------------------------------------------------
1 | // Scenario for task train_recoder
2 | // Dictionary file and class settings
3 | ClassManagement.OpenFile
4 | ClassFileName Customer.kdic //
5 | OK
6 | TrainDatabase.ClassName Customer
7 |
8 | // Train/test database settings
9 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
10 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName Customer.csv //
11 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services
12 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName ServicesBidon.csv //
13 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Services/Usages
14 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName UsagesBidon.csv //
15 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key Address
16 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName AddressBidon.csv //
17 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
18 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
19 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
20 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
21 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
22 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
23 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
24 |
25 | // Target variable
26 | AnalysisSpec.TargetAttributeName
27 |
28 | // Disable predictors: do data preparation only
29 | AnalysisSpec.PredictorsSpec.AdvancedSpec.DataPreparationOnly true
30 |
31 |
32 | // Feature engineering
33 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTextFeatureNumber 10000
34 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxTreeNumber 10
35 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxAttributePairNumber 0
36 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectAttributePairsParameters
37 | AllAttributePairs true
38 | Exit
39 | AnalysisSpec.PredictorsSpec.ConstructionSpec.MaxConstructedAttributeNumber 100
40 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectConstructionDomain
41 | Exit
42 |
43 | // Text feature parameters
44 | AnalysisSpec.PredictorsSpec.AdvancedSpec.InspectTextFeaturesParameters
45 | TextFeatures words
46 | Exit
47 |
48 | // Data preparation (discretization & grouping) settings
49 | AnalysisSpec.PreprocessingSpec.TargetGrouped false
50 |
51 | AnalysisSpec.PreprocessingSpec.MaxPartNumber 0
52 | AnalysisSpec.PreprocessingSpec.InspectAdvancedParameters
53 | DiscretizerUnsupervisedMethodName MODL
54 | GrouperUnsupervisedMethodName MODL
55 | Exit
56 |
57 |
58 | // Recoder Settings
59 | AnalysisSpec.RecodersSpec.Recoder true
60 | AnalysisSpec.RecodersSpec.RecodingSpec.FilterAttributes true
61 | AnalysisSpec.RecodersSpec.RecodingSpec.MaxFilteredAttributeNumber 0
62 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialSymbolAttributes false
63 | AnalysisSpec.RecodersSpec.RecodingSpec.KeepInitialContinuousAttributes false
64 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeSymbolAttributes part Id
65 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeContinuousAttributes part Id
66 | AnalysisSpec.RecodersSpec.RecodingSpec.RecodeBivariateAttributes part Id
67 |
68 | // Output settings
69 | AnalysisResults.ReportFileName CustomerResults/CustomerAnalysisResults._khj //
70 |
71 | // Train recoder
72 | ComputeStats
73 |
74 | // End of scenario for task train_recoder
75 |
76 | // Exit Khiops
77 | ClassManagement.Quit
78 | OK
79 |
--------------------------------------------------------------------------------
/tests/resources/scenario_generation/system_settings/ref/default._kh:
--------------------------------------------------------------------------------
1 | // System settings
2 | AnalysisSpec.SystemParameters.MaxCoreNumber 10
3 | AnalysisSpec.SystemParameters.MemoryLimit 1000
4 | AnalysisSpec.SystemParameters.TemporaryDirectoryName /another/tmp
5 |
6 | // User-defined prologue
7 | // Scenario prologue test
8 |
9 | // Scenario for task check_database
10 | // Dictionary file and class settings
11 | ClassManagement.OpenFile
12 | ClassFileName a.kdic //
13 | OK
14 |
15 | // Train database settings
16 | TrainDatabase.ClassName dict_name
17 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.List.Key
18 | TrainDatabase.DatabaseSpec.Data.DatabaseFiles.DataTableName data.txt //
19 | TrainDatabase.DatabaseSpec.Data.HeaderLineUsed true
20 | TrainDatabase.DatabaseSpec.Data.FieldSeparator
21 | TrainDatabase.DatabaseSpec.Data.DatabaseFormatDetector.DetectFileFormat
22 | TrainDatabase.DatabaseSpec.Sampling.SampleNumberPercentage 100.0
23 | TrainDatabase.DatabaseSpec.Sampling.SamplingMode Include sample
24 | TrainDatabase.DatabaseSpec.Selection.SelectionAttribute
25 | TrainDatabase.DatabaseSpec.Selection.SelectionValue
26 |
27 | // Log messages limit
28 | AnalysisSpec.SystemParameters.MaxErrorMessageNumberInLog 20
29 |
30 | // Execute check database
31 | LearningTools.CheckData
32 |
33 | // End of scenario for task check_database
34 |
35 | // Exit Khiops
36 | ClassManagement.Quit
37 | OK
38 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/khiops.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/sklearn/results/khiops.log
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/khiops_train_cc.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KhiopsML/khiops-python/ea474fbd6bad3ad8adc7af55072fbd7d14b0ad2a/tests/resources/sklearn/results/khiops_train_cc.log
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_models/SpliceJunction/KhiopsCoclustering/tmp_cc_deploy_model.kdic:
--------------------------------------------------------------------------------
1 | #Khiops 10.0
2 |
3 | Dictionary CC_Keys_main_table (SampleId)
4 | {
5 | Categorical SampleId ;
6 | Table(CC_main_table) CC_main_table ;
7 | };
8 |
9 | Dictionary CC_main_table (SampleId)
10 | {
11 | Categorical SampleId ;
12 | Numerical Pos ;
13 | Categorical Char ;
14 | };
15 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/Adult/KhiopsClassifier/predict.txt:
--------------------------------------------------------------------------------
1 | Predictedclass
2 | less
3 | less
4 | less
5 | less
6 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/Adult/KhiopsEncoder/transform.txt:
--------------------------------------------------------------------------------
1 | IdPage IdPworkclass IdPeducation IdPeducation_num IdPmarital_status IdPoccupation IdPrelationship IdPrace IdPsex IdPcapital_gain IdPcapital_loss IdPhours_per_week IdPnative_country IdPTree_1 IdPTree_2 IdPTree_3 IdPTree_4 IdPTree_5 IdPTree_6 IdPTree_7 IdPTree_8 IdPTree_9 IdPTree_10
2 | I4 I1 I3 I5 I2 I3 I2 I1 I1 I1 I1 I5 I1 I7 I9 I3 I1 I3 I4 I1 I5 I9 I1
3 | I2 I1 I3 I5 I2 I2 I3 I1 I1 I1 I1 I5 I1 I2 I7 I3 I1 I2 I4 I1 I1 I2 I1
4 | I1 I1 I2 I3 I2 I6 I3 I1 I2 I1 I1 I1 I1 I2 I1 I2 I4 I1 I3 I2 I2 I1 I4
5 | I1 I1 I2 I3 I2 I1 I5 I1 I1 I1 I1 I2 I1 I2 I1 I2 I4 I1 I3 I2 I2 I1 I4
6 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/Adult/KhiopsRegressor/predict.txt:
--------------------------------------------------------------------------------
1 | Mage
2 | 31.97894262
3 | 28.28002277
4 | 21.16359448
5 | 24.49808313
6 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/SpliceJunction/KhiopsClassifier/predict.txt:
--------------------------------------------------------------------------------
1 | SampleId PredictedClass
2 | AGMRSKPNI-NEG-1141 N
3 | ATRINS-ACCEPTOR-1678 EI
4 | ATRINS-DONOR-521 EI
5 | BABAPOE-ACCEPTOR-2624 IE
6 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/SpliceJunction/KhiopsCoclustering/transform.txt:
--------------------------------------------------------------------------------
1 | SampleId SampleIdPredictedLabel
2 | ATRINS-ACCEPTOR-1678 {HUMMHCW2B-ACCEPTOR-2660, HUMGHCSA-ACCEPTOR-28732, HUMCS1-ACCEPTOR-1814, ...}
3 | ATRINS-DONOR-521 {HUMMHCD8A-DONOR-1781, HUMCFVII-DONOR-4425, HUMMYC3L-DONOR-402, ...}
4 | BABAPOE-ACCEPTOR-2624 {HUMMHCW2B-ACCEPTOR-2660, HUMGHCSA-ACCEPTOR-28732, HUMCS1-ACCEPTOR-1814, ...}
5 | BABAPOE-DONOR-2817 {HUMMHCD8A-DONOR-1781, HUMCFVII-DONOR-4425, HUMMYC3L-DONOR-402, ...}
6 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/SpliceJunction/KhiopsEncoder/transform.txt:
--------------------------------------------------------------------------------
1 | SampleId IdPMode(SpliceJunctionDNA.Char) IdPMode(SpliceJunctionDNA.Char) where Pos <= 30.5 IdPMode(SpliceJunctionDNA.Char) where Pos > 30.5 IdPCount(SpliceJunctionDNA) where Char = C IdPCount(SpliceJunctionDNA) where Char = G IdPCount(SpliceJunctionDNA) where Char not in {C, G} IdPMean(SpliceJunctionDNA.Pos) where Char = C IdPMean(SpliceJunctionDNA.Pos) where Char = G IdPMedian(SpliceJunctionDNA.Pos) where Char = C IdPMedian(SpliceJunctionDNA.Pos) where Char = G IdPMode(SpliceJunctionDNA.Char) where Char not in {C, G} IdPStdDev(SpliceJunctionDNA.Pos) where Char = C IdPSum(SpliceJunctionDNA.Pos) where Char = C IdPSum(SpliceJunctionDNA.Pos) where Char = G IdPSum(SpliceJunctionDNA.Pos) where Char not in {C, G} IdPCount(SpliceJunctionDNA) where Char = T IdPCount(SpliceJunctionDNA) where Char = A IdPMode(SpliceJunctionDNA.Char) where Pos <= 15.5 IdPMode(SpliceJunctionDNA.Char) where Pos in ]15.5, 30.5] IdPMode(SpliceJunctionDNA.Char) where Pos in ]30.5, 45.5] IdPMode(SpliceJunctionDNA.Char) where Pos > 45.5 IdPTree_1 IdPTree_2 IdPTree_3 IdPTree_4 IdPTree_5 IdPTree_6 IdPTree_7 IdPTree_8 IdPTree_9 IdPTree_10
2 | AGMRSKPNI-NEG-1141 I1 I2 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I3 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1 I1
3 | ATRINS-ACCEPTOR-1678 I3 I3 I2 I1 I5 I2 I3 I4 I3 I6 I2 I1 I1 I5 I2 I3 I2 I2 I1 I3 I2 I5 I5 I5 I1 I6 I6 I7 I8 I5 I2
4 | ATRINS-DONOR-521 I2 I3 I3 I2 I4 I2 I4 I3 I3 I4 I1 I2 I2 I3 I3 I2 I2 I2 I2 I3 I2 I3 I4 I1 I2 I2 I5 I3 I4 I2 I2
5 | BABAPOE-ACCEPTOR-2624 I2 I3 I2 I2 I3 I2 I3 I5 I3 I8 I1 I1 I2 I3 I3 I2 I2 I2 I1 I3 I2 I2 I2 I3 I3 I3 I4 I3 I3 I3 I4
6 |
--------------------------------------------------------------------------------
/tests/resources/sklearn/results/ref_predictions/SpliceJunction/KhiopsRegressor/predict.txt:
--------------------------------------------------------------------------------
1 | SampleId MClass
2 | AGMRSKPNI-NEG-1141 2.450247648
3 | ATRINS-ACCEPTOR-1678 1.825746313
4 | ATRINS-DONOR-521 2.028309196
5 | BABAPOE-ACCEPTOR-2624 2.107139932
6 |
--------------------------------------------------------------------------------
/tests/resources/tmp/test_error_y_type_must_be_str_when_x_type_is_tuple/Reviews.csv:
--------------------------------------------------------------------------------
1 | User_ID Age Clothing ID Date New Title Recommended IND Positive Feedback average class
2 | 60B2Xk_3Fw 33 767 2019-03-22 True Awesome 1 0.0 Intimates
3 | J94geVHf_- 34 1080 2019-03-23 False Very lovely 1 4.3 Dresses
4 | jsPsQUdVAL 60 1077 2019-03-24 True Some major design flaws 0 0.0 Dresses
5 | tSSBwAcIvw 50 1049 2019-03-25 False My favorite buy! 1 0.5 Pants
6 | -I-UlX4n-B 47 847 2019-03-26 False Flattering shirt 1 6.0 Blouses
7 | 4TQsd3FX7i 49 1080 2019-03-27 True Not for the very petite 0 4.0 Dresses
8 | 7w824zHOgN 39 858 2019-03-28 True Cagrcoal shimmer fun 1 3.6 Knits
9 | Cm6fu01r99 39 858 2019-03-29 True Shimmer, surprisingly goes with lots 1 4.0 Knits
10 | zbbZRgbqar 24 1077 2019-03-30 False Flattering 1 0.0 Dresses
11 | WfkfYVhQFy 34 1077 2019-03-31 False Such a fun dress! 1 0.0 Dresses
12 |
--------------------------------------------------------------------------------
/tests/test_samples.py:
--------------------------------------------------------------------------------
1 | ######################################################################################
2 | # Copyright (c) 2023-2025 Orange. All rights reserved. #
3 | # This software is distributed under the BSD 3-Clause-clear License, the text of #
4 | # which is available at https://spdx.org/licenses/BSD-3-Clause-Clear.html or #
5 | # see the "LICENSE.md" file for more details. #
6 | ######################################################################################
7 | """Test run all samples"""
8 | import unittest
9 |
10 | from khiops.samples import samples, samples_sklearn
11 | from tests.test_helper import KhiopsTestHelper
12 |
13 |
14 | class KhiopsSamplesTests(unittest.TestCase):
15 | """Test if all samples run without problems"""
16 |
17 | def setUp(self):
18 | KhiopsTestHelper.skip_expensive_test(self)
19 |
20 | def test_samples(self):
21 | """Test if all samples run without problems"""
22 | # Run the samples
23 | for sample in samples.exported_samples:
24 | with self.subTest(sample=sample.__name__):
25 | print(f"\n>>> Testing sample.{sample.__name__}")
26 | sample.__call__()
27 | print("> Done")
28 |
29 | def test_samples_sklearn(self):
30 | """Test if all sklearn samples run without problems"""
31 | # Run the samples
32 | for sample in samples_sklearn.exported_samples:
33 | with self.subTest(sample=sample.__name__):
34 | print(f"\n>>> Testing sample.{sample.__name__}")
35 | sample.__call__()
36 | print("> Done")
37 |
--------------------------------------------------------------------------------