khiops 10.3.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. khiops-10.3.2.1/LICENSE.md +32 -0
  2. khiops-10.3.2.1/PKG-INFO +26 -0
  3. khiops-10.3.2.1/README.md +62 -0
  4. khiops-10.3.2.1/khiops/__init__.py +62 -0
  5. khiops-10.3.2.1/khiops/_version.py +21 -0
  6. khiops-10.3.2.1/khiops/core/__init__.py +14 -0
  7. khiops-10.3.2.1/khiops/core/analysis_results.py +3026 -0
  8. khiops-10.3.2.1/khiops/core/api.py +1980 -0
  9. khiops-10.3.2.1/khiops/core/coclustering_results.py +1350 -0
  10. khiops-10.3.2.1/khiops/core/dictionary.py +1435 -0
  11. khiops-10.3.2.1/khiops/core/exceptions.py +22 -0
  12. khiops-10.3.2.1/khiops/core/helpers.py +532 -0
  13. khiops-10.3.2.1/khiops/core/internals/__init__.py +9 -0
  14. khiops-10.3.2.1/khiops/core/internals/common.py +354 -0
  15. khiops-10.3.2.1/khiops/core/internals/filesystems.py +715 -0
  16. khiops-10.3.2.1/khiops/core/internals/io.py +460 -0
  17. khiops-10.3.2.1/khiops/core/internals/runner.py +1221 -0
  18. khiops-10.3.2.1/khiops/core/internals/scenario.py +327 -0
  19. khiops-10.3.2.1/khiops/core/internals/task.py +690 -0
  20. khiops-10.3.2.1/khiops/core/internals/tasks/__init__.py +59 -0
  21. khiops-10.3.2.1/khiops/core/internals/tasks/build_deployed_dictionary.py +42 -0
  22. khiops-10.3.2.1/khiops/core/internals/tasks/build_dictionary_from_data_table.py +51 -0
  23. khiops-10.3.2.1/khiops/core/internals/tasks/build_multi_table_dictionary.py +43 -0
  24. khiops-10.3.2.1/khiops/core/internals/tasks/check_database.py +76 -0
  25. khiops-10.3.2.1/khiops/core/internals/tasks/deploy_model.py +95 -0
  26. khiops-10.3.2.1/khiops/core/internals/tasks/detect_data_table_format.py +33 -0
  27. khiops-10.3.2.1/khiops/core/internals/tasks/detect_data_table_format_with_dictionary.py +41 -0
  28. khiops-10.3.2.1/khiops/core/internals/tasks/evaluate_predictor.py +76 -0
  29. khiops-10.3.2.1/khiops/core/internals/tasks/export_dictionary_as_json.py +36 -0
  30. khiops-10.3.2.1/khiops/core/internals/tasks/extract_clusters.py +53 -0
  31. khiops-10.3.2.1/khiops/core/internals/tasks/extract_keys_from_data_table.py +61 -0
  32. khiops-10.3.2.1/khiops/core/internals/tasks/prepare_coclustering_deployment.py +84 -0
  33. khiops-10.3.2.1/khiops/core/internals/tasks/simplify_coclustering.py +62 -0
  34. khiops-10.3.2.1/khiops/core/internals/tasks/sort_data_table.py +84 -0
  35. khiops-10.3.2.1/khiops/core/internals/tasks/train_coclustering.py +98 -0
  36. khiops-10.3.2.1/khiops/core/internals/tasks/train_predictor.py +158 -0
  37. khiops-10.3.2.1/khiops/core/internals/tasks/train_recoder.py +161 -0
  38. khiops-10.3.2.1/khiops/core/internals/types.py +447 -0
  39. khiops-10.3.2.1/khiops/core/internals/version.py +201 -0
  40. khiops-10.3.2.1/khiops/extras/__init__.py +7 -0
  41. khiops-10.3.2.1/khiops/extras/docker.py +249 -0
  42. khiops-10.3.2.1/khiops/samples/__init__.py +6 -0
  43. khiops-10.3.2.1/khiops/samples/samples-min.py +200 -0
  44. khiops-10.3.2.1/khiops/samples/samples.ipynb +1950 -0
  45. khiops-10.3.2.1/khiops/samples/samples.py +1774 -0
  46. khiops-10.3.2.1/khiops/samples/samples_sklearn.ipynb +1159 -0
  47. khiops-10.3.2.1/khiops/samples/samples_sklearn.py +1140 -0
  48. khiops-10.3.2.1/khiops/sklearn/__init__.py +14 -0
  49. khiops-10.3.2.1/khiops/sklearn/dataset.py +1573 -0
  50. khiops-10.3.2.1/khiops/sklearn/estimators.py +3190 -0
  51. khiops-10.3.2.1/khiops/sklearn/helpers.py +150 -0
  52. khiops-10.3.2.1/khiops/tools.py +179 -0
  53. khiops-10.3.2.1/khiops.egg-info/PKG-INFO +26 -0
  54. khiops-10.3.2.1/khiops.egg-info/SOURCES.txt +60 -0
  55. khiops-10.3.2.1/khiops.egg-info/dependency_links.txt +1 -0
  56. khiops-10.3.2.1/khiops.egg-info/entry_points.txt +5 -0
  57. khiops-10.3.2.1/khiops.egg-info/requires.txt +9 -0
  58. khiops-10.3.2.1/khiops.egg-info/top_level.txt +1 -0
  59. khiops-10.3.2.1/setup.cfg +12 -0
  60. khiops-10.3.2.1/setup.py +62 -0
  61. khiops-10.3.2.1/versioneer.py +1926 -0
@@ -0,0 +1,32 @@
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.
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.1
2
+ Name: khiops
3
+ Version: 10.3.2.1
4
+ Summary: Python library for the Khiops AutoML suite
5
+ Home-page: https://khiops.org
6
+ Maintainer: The Khiops Team
7
+ Maintainer-email: khiops.team@orange.com
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: License :: Other/Proprietary License
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: Unix
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Requires-Python: >=3.8
19
+ License-File: LICENSE.md
20
+ Requires-Dist: pandas>=0.25.3
21
+ Requires-Dist: scikit-learn>=0.22.2
22
+ Provides-Extra: s3
23
+ Requires-Dist: boto3<=1.35.69,>=1.17.39; extra == "s3"
24
+ Requires-Dist: pyopenssl<25.0.0,>=24.0.0; extra == "s3"
25
+ Provides-Extra: gcs
26
+ Requires-Dist: google-cloud-storage>=1.37.0; extra == "gcs"
@@ -0,0 +1,62 @@
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/
@@ -0,0 +1,62 @@
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
+ )
@@ -0,0 +1,21 @@
1
+
2
+ # This file was generated by 'versioneer.py' (0.19) from
3
+ # revision-control system data, or from the parent directory name of an
4
+ # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
+ # of this file.
6
+
7
+ import json
8
+
9
+ version_json = '''
10
+ {
11
+ "date": "2025-08-08T11:39:20+0200",
12
+ "dirty": false,
13
+ "error": null,
14
+ "full-revisionid": "888280dc01c90128e02761363cd53d41386a47a2",
15
+ "version": "10.3.2.1"
16
+ }
17
+ ''' # END VERSION_JSON
18
+
19
+
20
+ def get_versions():
21
+ return json.loads(version_json)
@@ -0,0 +1,14 @@
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