oikan 0.0.1.3__tar.gz → 0.0.1.4__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.4/PKG-INFO ADDED
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.2
2
+ Name: oikan
3
+ Version: 0.0.1.4
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
19
+
20
+ Optimized Interpretable Kolmogorov-Arnold Networks (OIKAN)
21
+ A deep learning framework for interpretable neural networks using advanced basis functions.
22
+
23
+ [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
24
+ [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
25
+
26
+ ## Key Features
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
+ - LaTeX-formatted formula extraction
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ git clone https://github.com/silvermete0r/OIKAN.git
38
+ cd OIKAN
39
+ pip install -e . # Install in development mode
40
+ ```
41
+
42
+ ## Quick Start
43
+
44
+ ### Regression Example
45
+ ```python
46
+ from oikan.model import OIKAN
47
+ from oikan.trainer import train
48
+ from oikan.symbolic import extract_symbolic_formula
49
+
50
+ model = OIKAN(input_dim=2, output_dim=1)
51
+ train(model, (X_train, y_train))
52
+ formula = extract_symbolic_formula(model, X_test, mode='regression')
53
+ print("Extracted formula:", formula)
54
+ ```
55
+
56
+ ### Classification Example
57
+ ```python
58
+ from oikan.model import OIKAN
59
+ from oikan.trainer import train_classification
60
+ from oikan.visualize import visualize_classification
61
+ from oikan.symbolic import extract_symbolic_formula, plot_symbolic_formula, extract_latex_formula
62
+
63
+ model = OIKAN(input_dim=2, output_dim=2)
64
+ train_classification(model, (X_train, y_train))
65
+ visualize_classification(model, X_test, y_test)
66
+ formula = extract_symbolic_formula(model, X_test, mode='classification')
67
+ print("Extracted formula:", formula)
68
+ plot_symbolic_formula(model, X_test, mode='classification')
69
+ latex_formula = extract_latex_formula(model, X_test, mode='classification')
70
+ print("LaTeX:", latex_formula)
71
+ ```
72
+
73
+ ## Usage
74
+ - Explore the `oikan/` folder for model architectures, training routines, and symbolic extraction.
75
+ - Check the `examples/` directory for complete usage examples for both regression and classification.
76
+
77
+ ## Contributing
78
+ Contributions are welcome! Submit a Pull Request with your improvements.
79
+
80
+ ## License
81
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,64 @@
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
+ formula = extract_symbolic_formula(model, X_test, mode='regression')
36
+ print("Extracted formula:", formula)
37
+ ```
38
+
39
+ ### Classification Example
40
+ ```python
41
+ from oikan.model import OIKAN
42
+ from oikan.trainer import train_classification
43
+ from oikan.visualize import visualize_classification
44
+ from oikan.symbolic import extract_symbolic_formula, plot_symbolic_formula, extract_latex_formula
45
+
46
+ model = OIKAN(input_dim=2, output_dim=2)
47
+ train_classification(model, (X_train, y_train))
48
+ visualize_classification(model, X_test, y_test)
49
+ formula = extract_symbolic_formula(model, X_test, mode='classification')
50
+ print("Extracted formula:", formula)
51
+ plot_symbolic_formula(model, X_test, mode='classification')
52
+ latex_formula = extract_latex_formula(model, X_test, mode='classification')
53
+ print("LaTeX:", latex_formula)
54
+ ```
55
+
56
+ ## Usage
57
+ - Explore the `oikan/` folder for model architectures, training routines, and symbolic extraction.
58
+ - Check the `examples/` directory for complete usage examples for both regression and classification.
59
+
60
+ ## Contributing
61
+ Contributions are welcome! Submit a Pull Request with your improvements.
62
+
63
+ ## License
64
+ 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,81 @@
1
+ Metadata-Version: 2.2
2
+ Name: oikan
3
+ Version: 0.0.1.4
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
19
+
20
+ Optimized Interpretable Kolmogorov-Arnold Networks (OIKAN)
21
+ A deep learning framework for interpretable neural networks using advanced basis functions.
22
+
23
+ [![PyPI version](https://badge.fury.io/py/oikan.svg)](https://badge.fury.io/py/oikan)
24
+ [![PyPI downloads](https://img.shields.io/pypi/dm/oikan.svg)](https://pypistats.org/packages/oikan)
25
+
26
+ ## Key Features
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
+ - LaTeX-formatted formula extraction
33
+
34
+ ## Installation
35
+
36
+ ```bash
37
+ git clone https://github.com/silvermete0r/OIKAN.git
38
+ cd OIKAN
39
+ pip install -e . # Install in development mode
40
+ ```
41
+
42
+ ## Quick Start
43
+
44
+ ### Regression Example
45
+ ```python
46
+ from oikan.model import OIKAN
47
+ from oikan.trainer import train
48
+ from oikan.symbolic import extract_symbolic_formula
49
+
50
+ model = OIKAN(input_dim=2, output_dim=1)
51
+ train(model, (X_train, y_train))
52
+ formula = extract_symbolic_formula(model, X_test, mode='regression')
53
+ print("Extracted formula:", formula)
54
+ ```
55
+
56
+ ### Classification Example
57
+ ```python
58
+ from oikan.model import OIKAN
59
+ from oikan.trainer import train_classification
60
+ from oikan.visualize import visualize_classification
61
+ from oikan.symbolic import extract_symbolic_formula, plot_symbolic_formula, extract_latex_formula
62
+
63
+ model = OIKAN(input_dim=2, output_dim=2)
64
+ train_classification(model, (X_train, y_train))
65
+ visualize_classification(model, X_test, y_test)
66
+ formula = extract_symbolic_formula(model, X_test, mode='classification')
67
+ print("Extracted formula:", formula)
68
+ plot_symbolic_formula(model, X_test, mode='classification')
69
+ latex_formula = extract_latex_formula(model, X_test, mode='classification')
70
+ print("LaTeX:", latex_formula)
71
+ ```
72
+
73
+ ## Usage
74
+ - Explore the `oikan/` folder for model architectures, training routines, and symbolic extraction.
75
+ - Check the `examples/` directory for complete usage examples for both regression and classification.
76
+
77
+ ## Contributing
78
+ Contributions are welcome! Submit a Pull Request with your improvements.
79
+
80
+ ## License
81
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
@@ -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.4"
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