scikit-learn-intelex 2024.0.1__py312-none-win_amd64.whl

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.

Potentially problematic release.


This version of scikit-learn-intelex might be problematic. Click here for more details.

Files changed (90) hide show
  1. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/__init__.py +61 -0
  2. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/__main__.py +59 -0
  3. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/_config.py +110 -0
  4. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/_device_offload.py +223 -0
  5. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/_utils.py +95 -0
  6. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/basic_statistics/__init__.py +20 -0
  7. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/basic_statistics/basic_statistics.py +17 -0
  8. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/cluster/__init__.py +21 -0
  9. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/cluster/dbscan.py +187 -0
  10. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/cluster/k_means.py +18 -0
  11. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/cluster/tests/test_dbscan.py +37 -0
  12. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/cluster/tests/test_kmeans.py +31 -0
  13. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/decomposition/__init__.py +20 -0
  14. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/decomposition/pca.py +18 -0
  15. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/decomposition/tests/test_pca.py +28 -0
  16. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/dispatcher.py +329 -0
  17. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/doc/third-party-programs.txt +424 -0
  18. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/ensemble/__init__.py +30 -0
  19. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/ensemble/_forest.py +1947 -0
  20. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/ensemble/tests/test_forest.py +118 -0
  21. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/glob/__main__.py +73 -0
  22. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/glob/dispatcher.py +88 -0
  23. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/__init__.py +30 -0
  24. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/coordinate_descent.py +18 -0
  25. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/linear.py +373 -0
  26. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/logistic_path.py +18 -0
  27. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/ridge.py +18 -0
  28. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_linear.py +77 -0
  29. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/linear_model/tests/test_logreg.py +29 -0
  30. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/manifold/__init__.py +20 -0
  31. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/manifold/t_sne.py +18 -0
  32. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/manifold/tests/test_tsne.py +27 -0
  33. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/metrics/__init__.py +24 -0
  34. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/metrics/pairwise.py +18 -0
  35. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/metrics/ranking.py +18 -0
  36. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/metrics/tests/test_metrics.py +40 -0
  37. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/model_selection/__init__.py +22 -0
  38. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/model_selection/split.py +18 -0
  39. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/model_selection/tests/test_model_selection.py +35 -0
  40. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/__init__.py +28 -0
  41. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/common.py +264 -0
  42. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/knn_classification.py +331 -0
  43. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/knn_regression.py +307 -0
  44. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/knn_unsupervised.py +220 -0
  45. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/lof.py +437 -0
  46. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/neighbors/tests/test_neighbors.py +85 -0
  47. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/__init__.py +18 -0
  48. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/cluster/__init__.py +20 -0
  49. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/cluster/_common.py +84 -0
  50. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/cluster/k_means.py +370 -0
  51. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/decomposition/__init__.py +20 -0
  52. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/decomposition/pca.py +376 -0
  53. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/preview/decomposition/tests/test_preview_pca.py +38 -0
  54. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/__init__.py +24 -0
  55. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/__init__.py +19 -0
  56. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/basic_statistics/basic_statistics.py +21 -0
  57. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/cluster/__init__.py +30 -0
  58. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/cluster/dbscan.py +50 -0
  59. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/cluster/kmeans.py +21 -0
  60. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/decomposition/__init__.py +19 -0
  61. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/decomposition/pca.py +21 -0
  62. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/ensemble/__init__.py +19 -0
  63. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/ensemble/forest.py +79 -0
  64. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/linear_model/__init__.py +19 -0
  65. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/linear_model/linear_model.py +21 -0
  66. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/neighbors/__init__.py +19 -0
  67. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/spmd/neighbors/neighbors.py +25 -0
  68. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/__init__.py +30 -0
  69. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/_common.py +188 -0
  70. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/nusvc.py +272 -0
  71. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/nusvr.py +163 -0
  72. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/svc.py +301 -0
  73. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/svr.py +164 -0
  74. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/svm/tests/test_svm.py +102 -0
  75. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/_models_info.py +170 -0
  76. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/test_config.py +39 -0
  77. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/test_memory_usage.py +225 -0
  78. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/test_monkeypatch.py +210 -0
  79. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/test_parallel.py +50 -0
  80. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/test_patching.py +122 -0
  81. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/test_run_to_run_stability_tests.py +428 -0
  82. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/tests/utils/_launch_algorithms.py +118 -0
  83. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/utils/__init__.py +19 -0
  84. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/utils/parallel.py +59 -0
  85. scikit_learn_intelex-2024.0.1.data/data/Lib/site-packages/sklearnex/utils/validation.py +18 -0
  86. scikit_learn_intelex-2024.0.1.dist-info/LICENSE.txt +202 -0
  87. scikit_learn_intelex-2024.0.1.dist-info/METADATA +230 -0
  88. scikit_learn_intelex-2024.0.1.dist-info/RECORD +90 -0
  89. scikit_learn_intelex-2024.0.1.dist-info/WHEEL +5 -0
  90. scikit_learn_intelex-2024.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,118 @@
1
+ #!/usr/bin/env python
2
+ # ===============================================================================
3
+ # Copyright 2023 Intel Corporation
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ # ===============================================================================
17
+
18
+ import pytest
19
+ from numpy.testing import assert_allclose
20
+ from sklearn.datasets import make_classification, make_regression
21
+
22
+ from daal4py.sklearn._utils import daal_check_version
23
+ from onedal.tests.utils._dataframes_support import (
24
+ _as_numpy,
25
+ _convert_to_dataframe,
26
+ get_dataframes_and_queues,
27
+ )
28
+
29
+
30
+ @pytest.mark.parametrize("dataframe,queue", get_dataframes_and_queues())
31
+ def test_sklearnex_import_rf_classifier(dataframe, queue):
32
+ from sklearnex.ensemble import RandomForestClassifier
33
+
34
+ X, y = make_classification(
35
+ n_samples=1000,
36
+ n_features=4,
37
+ n_informative=2,
38
+ n_redundant=0,
39
+ random_state=0,
40
+ shuffle=False,
41
+ )
42
+ X = _convert_to_dataframe(X, sycl_queue=queue, target_df=dataframe)
43
+ y = _convert_to_dataframe(y, sycl_queue=queue, target_df=dataframe)
44
+ rf = RandomForestClassifier(max_depth=2, random_state=0).fit(X, y)
45
+ assert "sklearnex" in rf.__module__
46
+ assert_allclose([1], _as_numpy(rf.predict([[0, 0, 0, 0]])))
47
+
48
+
49
+ # TODO:
50
+ # investigate failure for `dpnp.ndarrays` and `dpctl.tensors` on `GPU`
51
+ @pytest.mark.parametrize(
52
+ "dataframe,queue", get_dataframes_and_queues(device_filter_="cpu")
53
+ )
54
+ def test_sklearnex_import_rf_regression(dataframe, queue):
55
+ from sklearnex.ensemble import RandomForestRegressor
56
+
57
+ X, y = make_regression(n_features=4, n_informative=2, random_state=0, shuffle=False)
58
+ X = _convert_to_dataframe(X, sycl_queue=queue, target_df=dataframe)
59
+ y = _convert_to_dataframe(y, sycl_queue=queue, target_df=dataframe)
60
+ rf = RandomForestRegressor(max_depth=2, random_state=0).fit(X, y)
61
+ assert "sklearnex" in rf.__module__
62
+ pred = _as_numpy(rf.predict([[0, 0, 0, 0]]))
63
+ if daal_check_version((2024, "P", 0)):
64
+ assert_allclose([-6.971], pred, atol=1e-2)
65
+ else:
66
+ assert_allclose([-6.839], pred, atol=1e-2)
67
+
68
+
69
+ # TODO:
70
+ # investigate failure for `dpnp.ndarrays` and `dpctl.tensors` on `GPU`
71
+ @pytest.mark.parametrize(
72
+ "dataframe,queue", get_dataframes_and_queues(device_filter_="cpu")
73
+ )
74
+ def test_sklearnex_import_et_classifier(dataframe, queue):
75
+ from sklearnex.ensemble import ExtraTreesClassifier
76
+
77
+ X, y = make_classification(
78
+ n_samples=1000,
79
+ n_features=4,
80
+ n_informative=2,
81
+ n_redundant=0,
82
+ random_state=0,
83
+ shuffle=False,
84
+ )
85
+ X = _convert_to_dataframe(X, sycl_queue=queue, target_df=dataframe)
86
+ y = _convert_to_dataframe(y, sycl_queue=queue, target_df=dataframe)
87
+ # For the 2023.2 release, random_state is not supported
88
+ # defaults to seed=777, although it is set to 0
89
+ rf = ExtraTreesClassifier(max_depth=2, random_state=0).fit(X, y)
90
+ assert "sklearnex" in rf.__module__
91
+ assert_allclose([1], _as_numpy(rf.predict([[0, 0, 0, 0]])))
92
+
93
+
94
+ # TODO:
95
+ # investigate failure for `dpnp.ndarrays` and `dpctl.tensors` on `GPU`
96
+ @pytest.mark.parametrize(
97
+ "dataframe,queue", get_dataframes_and_queues(device_filter_="cpu")
98
+ )
99
+ def test_sklearnex_import_et_regression(dataframe, queue):
100
+ from sklearnex.ensemble import ExtraTreesRegressor
101
+
102
+ X, y = make_regression(n_features=1, random_state=0, shuffle=False)
103
+ X = _convert_to_dataframe(X, sycl_queue=queue, target_df=dataframe)
104
+ y = _convert_to_dataframe(y, sycl_queue=queue, target_df=dataframe)
105
+ # For the 2023.2 release, random_state is not supported
106
+ # defaults to seed=777, although it is set to 0
107
+ rf = ExtraTreesRegressor(random_state=0).fit(X, y)
108
+ assert "sklearnex" in rf.__module__
109
+ pred = _as_numpy(
110
+ rf.predict(
111
+ [
112
+ [
113
+ 0,
114
+ ]
115
+ ]
116
+ )
117
+ )
118
+ assert_allclose([0.445], pred, atol=1e-2)
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env python
2
+ # ===============================================================================
3
+ # Copyright 2021 Intel Corporation
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ # ===============================================================================
17
+
18
+ from sklearnex import patch_sklearn, unpatch_sklearn
19
+
20
+
21
+ def _main():
22
+ import argparse
23
+
24
+ # Adding custom extend action for support all python versions
25
+ class ExtendAction(argparse.Action):
26
+ def __call__(self, parser, namespace, values, option_string=None):
27
+ items = getattr(namespace, self.dest) or []
28
+ items.extend(values)
29
+ setattr(namespace, self.dest, items)
30
+
31
+ parser = argparse.ArgumentParser(
32
+ prog="python -m sklearnex.glob",
33
+ description="""
34
+ Patch all your Scikit-learn applications using Intel(R) Extension for
35
+ scikit-learn.""",
36
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,
37
+ )
38
+
39
+ parser.register("action", "extend", ExtendAction)
40
+ parser.add_argument(
41
+ "action",
42
+ choices=["patch_sklearn", "unpatch_sklearn"],
43
+ help="Enable or Disable patching",
44
+ )
45
+ parser.add_argument(
46
+ "--no-verbose",
47
+ "-nv",
48
+ action="store_false",
49
+ help="Disable additional information about enabling patching",
50
+ )
51
+ parser.add_argument(
52
+ "--algorithm",
53
+ "-a",
54
+ action="extend",
55
+ type=str,
56
+ nargs="+",
57
+ help="The name of an algorithm to be patched globally",
58
+ )
59
+ args = parser.parse_args()
60
+
61
+ if args.action == "patch_sklearn":
62
+ patch_sklearn(name=args.algorithm, verbose=args.no_verbose, global_patch=True)
63
+ elif args.action == "unpatch_sklearn":
64
+ unpatch_sklearn(global_unpatch=True)
65
+ else:
66
+ raise RuntimeError(
67
+ "Invalid choice for the action attribute."
68
+ " Expected: patch_sklearn or unpatch_sklearn."
69
+ f" Got {args.action}"
70
+ )
71
+
72
+
73
+ _main()
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env python
2
+ # ===============================================================================
3
+ # Copyright 2021 Intel Corporation
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ # ===============================================================================
17
+
18
+
19
+ def get_patch_str(name=None, verbose=True):
20
+ return f"""try:
21
+ from sklearnex import patch_sklearn
22
+ patch_sklearn(name={str(name)}, verbose={str(verbose)})
23
+ del patch_sklearn
24
+ except ImportError:
25
+ pass"""
26
+
27
+
28
+ def get_patch_str_re():
29
+ return r"""\ntry:
30
+ from sklearnex import patch_sklearn
31
+ patch_sklearn\(name=.*, verbose=.*\)
32
+ del patch_sklearn
33
+ except ImportError:
34
+ pass\n"""
35
+
36
+
37
+ def patch_sklearn_global(name=None, verbose=True):
38
+ import os
39
+ import re
40
+
41
+ try:
42
+ import sklearn
43
+ except ImportError:
44
+ raise ImportError("Scikit-learn could not be imported. Nothing to patch\n")
45
+
46
+ init_file_path = sklearn.__file__
47
+ distributor_file_path = os.path.join(
48
+ os.path.dirname(init_file_path), "_distributor_init.py"
49
+ )
50
+
51
+ with open(distributor_file_path, "r", encoding="utf-8") as distributor_file:
52
+ lines = distributor_file.read()
53
+ if re.search(get_patch_str_re(), lines):
54
+ lines = re.sub(get_patch_str_re(), "", lines)
55
+
56
+ with open(distributor_file_path, "w", encoding="utf-8") as distributor_file:
57
+ distributor_file.write(lines + "\n" + get_patch_str(name, verbose) + "\n")
58
+ print(
59
+ "Scikit-learn was successfully globally patched"
60
+ " by Intel(R) Extension for Scikit-learn"
61
+ )
62
+ return
63
+
64
+
65
+ def unpatch_sklearn_global():
66
+ import os
67
+ import re
68
+
69
+ try:
70
+ import sklearn
71
+ except ImportError:
72
+ raise ImportError("Scikit-learn could not be imported. Nothing to unpatch\n")
73
+
74
+ init_file_path = sklearn.__file__
75
+ distributor_file_path = os.path.join(
76
+ os.path.dirname(init_file_path), "_distributor_init.py"
77
+ )
78
+
79
+ with open(distributor_file_path, "r", encoding="utf-8") as distributor_file:
80
+ lines = distributor_file.read()
81
+ if not re.search(get_patch_str_re(), lines):
82
+ print("Nothing to unpatch: Scikit-learn is not patched\n")
83
+ return
84
+ lines = re.sub(get_patch_str_re(), "", lines)
85
+
86
+ with open(distributor_file_path, "w", encoding="utf-8") as distributor_file:
87
+ distributor_file.write(lines)
88
+ print("Scikit-learn was successfully globally unpatched")
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env python
2
+ # ===============================================================================
3
+ # Copyright 2021 Intel Corporation
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ # ===============================================================================
17
+
18
+ from .coordinate_descent import ElasticNet, Lasso
19
+ from .linear import LinearRegression
20
+ from .logistic_path import LogisticRegression, logistic_regression_path
21
+ from .ridge import Ridge
22
+
23
+ __all__ = [
24
+ "Ridge",
25
+ "LinearRegression",
26
+ "LogisticRegression",
27
+ "logistic_regression_path",
28
+ "ElasticNet",
29
+ "Lasso",
30
+ ]
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env python
2
+ # ===============================================================================
3
+ # Copyright 2021 Intel Corporation
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ # ===============================================================================
17
+
18
+ from daal4py.sklearn.linear_model import ElasticNet, Lasso