oikan 0.0.1.3__tar.gz → 0.0.1.5__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.
oikan-0.0.1.5/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Arman Zhalgasbayev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
oikan-0.0.1.5/PKG-INFO ADDED
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.2
2
+ Name: oikan
3
+ Version: 0.0.1.5
4
+ Summary: OIKAN: Optimized Interpretable Kolmogorov-Arnold Networks
5
+ Author: Arman Zhalgasbayev
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: torch
14
+ Requires-Dist: numpy
15
+ Requires-Dist: sympy
16
+ Requires-Dist: scipy
17
+ Requires-Dist: matplotlib
18
+
19
+ # OIKAN
20
+
21
+ Optimized Interpretable Kolmogorov-Arnold Networks (OIKAN)
22
+ A deep learning framework for interpretable neural networks using advanced basis functions.
23
+
24
+ [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
25
+ [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
26
+
27
+ ## Key Features
28
+ - EfficientKAN layer implementation
29
+ - Built-in visualization tools
30
+ - Support for both regression and classification tasks
31
+ - Symbolic formula extraction
32
+ - Easy-to-use training interface
33
+ - LaTeX-formatted formula extraction
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ git clone https://github.com/silvermete0r/OIKAN.git
39
+ cd OIKAN
40
+ pip install -e . # Install in development mode
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ ### Regression Example
46
+ ```python
47
+ from oikan.model import OIKAN
48
+ from oikan.trainer import train
49
+ from oikan.symbolic import extract_symbolic_formula
50
+
51
+ model = OIKAN(input_dim=2, output_dim=1)
52
+ train(model, (X_train, y_train))
53
+
54
+ visualize_regression(model, X, y)
55
+
56
+ formula = extract_symbolic_formula(model, X_test, mode='regression')
57
+ print("Extracted formula:", formula)
58
+
59
+ plot_symbolic_formula(model, X_test, mode='regression')
60
+
61
+ latex_formula = extract_latex_formula(model, X_test, mode='regression')
62
+ print("LaTeX:", latex_formula)
63
+ ```
64
+
65
+ ### Classification Example
66
+ ```python
67
+ from oikan.model import OIKAN
68
+ from oikan.trainer import train_classification
69
+ from oikan.visualize import visualize_classification
70
+ from oikan.symbolic import extract_symbolic_formula, plot_symbolic_formula, extract_latex_formula
71
+
72
+ model = OIKAN(input_dim=2, output_dim=2)
73
+ train_classification(model, (X_train, y_train))
74
+
75
+ visualize_classification(model, X_test, y_test)
76
+
77
+ formula = extract_symbolic_formula(model, X_test, mode='classification')
78
+ print("Extracted formula:", formula)
79
+
80
+ plot_symbolic_formula(model, X_test, mode='classification')
81
+
82
+ latex_formula = extract_latex_formula(model, X_test, mode='classification')
83
+ print("LaTeX:", latex_formula)
84
+ ```
85
+
86
+ ## Usage
87
+ - Explore the `oikan/` folder for model architectures, training routines, and symbolic extraction.
88
+ - Check the `examples/` directory for complete usage examples for both regression and classification.
89
+
90
+ ## Contributing
91
+ Contributions are welcome! Submit a Pull Request with your improvements.
92
+
93
+ ## License
94
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,76 @@
1
+ # OIKAN
2
+
3
+ Optimized Interpretable Kolmogorov-Arnold Networks (OIKAN)
4
+ A deep learning framework for interpretable neural networks using advanced basis functions.
5
+
6
+ [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
7
+ [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
8
+
9
+ ## Key Features
10
+ - EfficientKAN layer implementation
11
+ - Built-in visualization tools
12
+ - Support for both regression and classification tasks
13
+ - Symbolic formula extraction
14
+ - Easy-to-use training interface
15
+ - LaTeX-formatted formula extraction
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ git clone https://github.com/silvermete0r/OIKAN.git
21
+ cd OIKAN
22
+ pip install -e . # Install in development mode
23
+ ```
24
+
25
+ ## Quick Start
26
+
27
+ ### Regression Example
28
+ ```python
29
+ from oikan.model import OIKAN
30
+ from oikan.trainer import train
31
+ from oikan.symbolic import extract_symbolic_formula
32
+
33
+ model = OIKAN(input_dim=2, output_dim=1)
34
+ train(model, (X_train, y_train))
35
+
36
+ visualize_regression(model, X, y)
37
+
38
+ formula = extract_symbolic_formula(model, X_test, mode='regression')
39
+ print("Extracted formula:", formula)
40
+
41
+ plot_symbolic_formula(model, X_test, mode='regression')
42
+
43
+ latex_formula = extract_latex_formula(model, X_test, mode='regression')
44
+ print("LaTeX:", latex_formula)
45
+ ```
46
+
47
+ ### Classification Example
48
+ ```python
49
+ from oikan.model import OIKAN
50
+ from oikan.trainer import train_classification
51
+ from oikan.visualize import visualize_classification
52
+ from oikan.symbolic import extract_symbolic_formula, plot_symbolic_formula, extract_latex_formula
53
+
54
+ model = OIKAN(input_dim=2, output_dim=2)
55
+ train_classification(model, (X_train, y_train))
56
+
57
+ visualize_classification(model, X_test, y_test)
58
+
59
+ formula = extract_symbolic_formula(model, X_test, mode='classification')
60
+ print("Extracted formula:", formula)
61
+
62
+ plot_symbolic_formula(model, X_test, mode='classification')
63
+
64
+ latex_formula = extract_latex_formula(model, X_test, mode='classification')
65
+ print("LaTeX:", latex_formula)
66
+ ```
67
+
68
+ ## Usage
69
+ - Explore the `oikan/` folder for model architectures, training routines, and symbolic extraction.
70
+ - Check the `examples/` directory for complete usage examples for both regression and classification.
71
+
72
+ ## Contributing
73
+ Contributions are welcome! Submit a Pull Request with your improvements.
74
+
75
+ ## License
76
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
@@ -122,6 +122,9 @@ def extract_latex_formula(model, X, mode='regression'):
122
122
  expr = term.strip("()")
123
123
  coeff_str, basis = expr.split("*", 1) if "*" in expr else (expr, "")
124
124
  coeff = float(coeff_str)
125
+ missing = basis.count("(") - basis.count(")")
126
+ if missing > 0:
127
+ basis = basis + ")" * missing
125
128
  coeff_latex = f"{abs(coeff):.2f}".rstrip("0").rstrip(".")
126
129
  term_latex = coeff_latex if basis.strip() == "1" else f"{coeff_latex} \\cdot {basis.strip()}"
127
130
  latex_terms.append(f"- {term_latex}" if coeff < 0 else f"+ {term_latex}")
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.2
2
+ Name: oikan
3
+ Version: 0.0.1.5
4
+ Summary: OIKAN: Optimized Interpretable Kolmogorov-Arnold Networks
5
+ Author: Arman Zhalgasbayev
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: torch
14
+ Requires-Dist: numpy
15
+ Requires-Dist: sympy
16
+ Requires-Dist: scipy
17
+ Requires-Dist: matplotlib
18
+
19
+ # OIKAN
20
+
21
+ Optimized Interpretable Kolmogorov-Arnold Networks (OIKAN)
22
+ A deep learning framework for interpretable neural networks using advanced basis functions.
23
+
24
+ [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
25
+ [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
26
+
27
+ ## Key Features
28
+ - EfficientKAN layer implementation
29
+ - Built-in visualization tools
30
+ - Support for both regression and classification tasks
31
+ - Symbolic formula extraction
32
+ - Easy-to-use training interface
33
+ - LaTeX-formatted formula extraction
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ git clone https://github.com/silvermete0r/OIKAN.git
39
+ cd OIKAN
40
+ pip install -e . # Install in development mode
41
+ ```
42
+
43
+ ## Quick Start
44
+
45
+ ### Regression Example
46
+ ```python
47
+ from oikan.model import OIKAN
48
+ from oikan.trainer import train
49
+ from oikan.symbolic import extract_symbolic_formula
50
+
51
+ model = OIKAN(input_dim=2, output_dim=1)
52
+ train(model, (X_train, y_train))
53
+
54
+ visualize_regression(model, X, y)
55
+
56
+ formula = extract_symbolic_formula(model, X_test, mode='regression')
57
+ print("Extracted formula:", formula)
58
+
59
+ plot_symbolic_formula(model, X_test, mode='regression')
60
+
61
+ latex_formula = extract_latex_formula(model, X_test, mode='regression')
62
+ print("LaTeX:", latex_formula)
63
+ ```
64
+
65
+ ### Classification Example
66
+ ```python
67
+ from oikan.model import OIKAN
68
+ from oikan.trainer import train_classification
69
+ from oikan.visualize import visualize_classification
70
+ from oikan.symbolic import extract_symbolic_formula, plot_symbolic_formula, extract_latex_formula
71
+
72
+ model = OIKAN(input_dim=2, output_dim=2)
73
+ train_classification(model, (X_train, y_train))
74
+
75
+ visualize_classification(model, X_test, y_test)
76
+
77
+ formula = extract_symbolic_formula(model, X_test, mode='classification')
78
+ print("Extracted formula:", formula)
79
+
80
+ plot_symbolic_formula(model, X_test, mode='classification')
81
+
82
+ latex_formula = extract_latex_formula(model, X_test, mode='classification')
83
+ print("LaTeX:", latex_formula)
84
+ ```
85
+
86
+ ## Usage
87
+ - Explore the `oikan/` folder for model architectures, training routines, and symbolic extraction.
88
+ - Check the `examples/` directory for complete usage examples for both regression and classification.
89
+
90
+ ## Contributing
91
+ Contributions are welcome! Submit a Pull Request with your improvements.
92
+
93
+ ## License
94
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  setup.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "oikan"
7
- version = "0.0.1.3"
7
+ version = "0.0.1.5"
8
8
  description = "OIKAN: Optimized Interpretable Kolmogorov-Arnold Networks"
9
9
  authors = [{name = "Arman Zhalgasbayev"}]
10
10
  dependencies = [
oikan-0.0.1.3/PKG-INFO DELETED
@@ -1,65 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: oikan
3
- Version: 0.0.1.3
4
- Summary: OIKAN: Optimized Interpretable Kolmogorov-Arnold Networks
5
- Author: Arman Zhalgasbayev
6
- License: MIT
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.7
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: torch
13
- Requires-Dist: numpy
14
- Requires-Dist: sympy
15
- Requires-Dist: scipy
16
- Requires-Dist: matplotlib
17
-
18
- # OIKAN Library
19
-
20
- [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
21
- [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
22
-
23
- OIKAN (Optimized Implementation of Kolmogorov-Arnold Networks) is a PyTorch-based library for creating interpretable neural networks. It implements the KAN architecture to provide both accurate predictions and interpretable results.
24
-
25
- ## Key Features
26
-
27
- - EfficientKAN layer implementation
28
- - Built-in visualization tools
29
- - Support for both regression and classification tasks
30
- - Symbolic formula extraction
31
- - Easy-to-use training interface
32
-
33
- ## Installation
34
-
35
- ```bash
36
- git clone https://github.com/silvermete0r/OIKAN.git
37
- cd OIKAN
38
- pip install -e . # Install in development mode
39
- ```
40
-
41
- ## Quick Start
42
-
43
- ### Regression Example
44
- ```python
45
- from oikan.model import OIKAN
46
- from oikan.trainer import train
47
-
48
- # Create and train model
49
- model = OIKAN(input_dim=2, output_dim=1)
50
- train(model, train_loader)
51
-
52
- # Extract interpretable formula
53
- formula = extract_symbolic_formula_regression(model, X)
54
- ```
55
-
56
- ### Classification Example
57
- ```python
58
- model = OIKAN(input_dim=2, output_dim=2)
59
- train_classification(model, train_loader)
60
- visualize_classification(model, X, y)
61
- ```
62
-
63
- ## Contributing
64
-
65
- Contributions are welcome! Please feel free to submit a Pull Request.
oikan-0.0.1.3/README.md DELETED
@@ -1,48 +0,0 @@
1
- # OIKAN Library
2
-
3
- [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
4
- [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
5
-
6
- OIKAN (Optimized Implementation of Kolmogorov-Arnold Networks) is a PyTorch-based library for creating interpretable neural networks. It implements the KAN architecture to provide both accurate predictions and interpretable results.
7
-
8
- ## Key Features
9
-
10
- - EfficientKAN layer implementation
11
- - Built-in visualization tools
12
- - Support for both regression and classification tasks
13
- - Symbolic formula extraction
14
- - Easy-to-use training interface
15
-
16
- ## Installation
17
-
18
- ```bash
19
- git clone https://github.com/silvermete0r/OIKAN.git
20
- cd OIKAN
21
- pip install -e . # Install in development mode
22
- ```
23
-
24
- ## Quick Start
25
-
26
- ### Regression Example
27
- ```python
28
- from oikan.model import OIKAN
29
- from oikan.trainer import train
30
-
31
- # Create and train model
32
- model = OIKAN(input_dim=2, output_dim=1)
33
- train(model, train_loader)
34
-
35
- # Extract interpretable formula
36
- formula = extract_symbolic_formula_regression(model, X)
37
- ```
38
-
39
- ### Classification Example
40
- ```python
41
- model = OIKAN(input_dim=2, output_dim=2)
42
- train_classification(model, train_loader)
43
- visualize_classification(model, X, y)
44
- ```
45
-
46
- ## Contributing
47
-
48
- Contributions are welcome! Please feel free to submit a Pull Request.
@@ -1,65 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: oikan
3
- Version: 0.0.1.3
4
- Summary: OIKAN: Optimized Interpretable Kolmogorov-Arnold Networks
5
- Author: Arman Zhalgasbayev
6
- License: MIT
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.7
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: torch
13
- Requires-Dist: numpy
14
- Requires-Dist: sympy
15
- Requires-Dist: scipy
16
- Requires-Dist: matplotlib
17
-
18
- # OIKAN Library
19
-
20
- [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
21
- [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
22
-
23
- OIKAN (Optimized Implementation of Kolmogorov-Arnold Networks) is a PyTorch-based library for creating interpretable neural networks. It implements the KAN architecture to provide both accurate predictions and interpretable results.
24
-
25
- ## Key Features
26
-
27
- - EfficientKAN layer implementation
28
- - Built-in visualization tools
29
- - Support for both regression and classification tasks
30
- - Symbolic formula extraction
31
- - Easy-to-use training interface
32
-
33
- ## Installation
34
-
35
- ```bash
36
- git clone https://github.com/silvermete0r/OIKAN.git
37
- cd OIKAN
38
- pip install -e . # Install in development mode
39
- ```
40
-
41
- ## Quick Start
42
-
43
- ### Regression Example
44
- ```python
45
- from oikan.model import OIKAN
46
- from oikan.trainer import train
47
-
48
- # Create and train model
49
- model = OIKAN(input_dim=2, output_dim=1)
50
- train(model, train_loader)
51
-
52
- # Extract interpretable formula
53
- formula = extract_symbolic_formula_regression(model, X)
54
- ```
55
-
56
- ### Classification Example
57
- ```python
58
- model = OIKAN(input_dim=2, output_dim=2)
59
- train_classification(model, train_loader)
60
- visualize_classification(model, X, y)
61
- ```
62
-
63
- ## Contributing
64
-
65
- Contributions are welcome! Please feel free to submit a Pull Request.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes