oikan 0.0.3.4__tar.gz → 0.0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oikan
3
- Version: 0.0.3.4
3
+ Version: 0.0.3.5
4
4
  Summary: OIKAN: Neuro-Symbolic ML for Scientific Discovery
5
5
  Author: Arman Zhalgasbayev
6
6
  License: MIT
@@ -34,6 +34,7 @@ OIKAN is a neuro-symbolic machine learning framework inspired by Kolmogorov-Arno
34
34
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
35
35
  [![GitHub issues](https://img.shields.io/github/issues/silvermete0r/OIKAN.svg)](https://github.com/silvermete0r/oikan/issues)
36
36
  [![Docs](https://img.shields.io/badge/docs-passing-brightgreen)](https://silvermete0r.github.io/oikan/)
37
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/silvermete0r/oikan)
37
38
 
38
39
  > **Important Disclaimer**: OIKAN is an experimental research project. It is not intended for production use or real-world applications. This framework is designed for research purposes, experimentation, and academic exploration of neuro-symbolic machine learning concepts.
39
40
 
@@ -62,14 +63,15 @@ OIKAN implements a modern interpretation of the Kolmogorov-Arnold Representation
62
63
  - Automatic pruning of insignificant terms
63
64
 
64
65
  ```python
65
- class OIKANRegressor:
66
- def __init__(self, hidden_sizes=[64, 64], activation='relu',
66
+ class OIKAN:
67
+ def __init__(self, hidden_sizes=[64, 64], activation='relu',
67
68
  polynomial_degree=2, alpha=0.1):
68
- # Neural network for learning complex patterns
69
- self.neural_net = TabularNet(input_size, hidden_sizes, activation)
70
- # Symbolic regression for interpretable formulas
71
- self.symbolic_model = None
72
-
69
+ # Neural network for learning complex patterns
70
+ self.neural_net = TabularNet(input_size, hidden_sizes, activation)
71
+ # Data augmentation for better coverage
72
+ self.augmented_data = self.augment_data(X, y, augmentation_factor=5)
73
+ # Symbolic regression for interpretable formulas
74
+ self.symbolic_regression = SymbolicRegression(alpha=alpha)
73
75
  ```
74
76
 
75
77
  3. **Basis Functions**: Core set of interpretable transformations:
@@ -140,7 +142,7 @@ mse = mean_squared_error(y_test, y_pred)
140
142
  print("Mean Squared Error:", mse)
141
143
 
142
144
  # Get symbolic formula
143
- formula = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympied' -> simplified formula using sympy; 'latex' -> LaTeX format
145
+ formula = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympy' -> simplified formula using sympy; 'latex' -> LaTeX format
144
146
  print("Symbolic Formula:", formula)
145
147
 
146
148
  # Get feature importances
@@ -189,7 +191,7 @@ accuracy = model.score(X_test, y_test)
189
191
  print("Accuracy:", accuracy)
190
192
 
191
193
  # Get symbolic formulas for each class
192
- formulas = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympied' -> simplified formula using sympy; 'latex' -> LaTeX format
194
+ formulas = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympy' -> simplified formula using sympy; 'latex' -> LaTeX format
193
195
  for i, formula in enumerate(formulas):
194
196
  print(f"Class {i} Formula:", formula)
195
197
 
@@ -209,7 +211,7 @@ loaded_model.load("outputs/model.json")
209
211
 
210
212
  ### Architecture Diagram
211
213
 
212
- ![OIKAN v0.0.3(1) Architecture](https://raw.githubusercontent.com/silvermete0r/oikan/main/docs/media/oikan-v0.0.3(1)-architecture-oop.png)
214
+ ![OIKAN v0.0.3(2) Architecture](https://raw.githubusercontent.com/silvermete0r/oikan/main/docs/media/oikan-v0.0.3(2)-architecture-oop.png)
213
215
 
214
216
  ## OIKAN Symbolic Model Compilers
215
217
 
@@ -15,6 +15,7 @@ OIKAN is a neuro-symbolic machine learning framework inspired by Kolmogorov-Arno
15
15
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
16
16
  [![GitHub issues](https://img.shields.io/github/issues/silvermete0r/OIKAN.svg)](https://github.com/silvermete0r/oikan/issues)
17
17
  [![Docs](https://img.shields.io/badge/docs-passing-brightgreen)](https://silvermete0r.github.io/oikan/)
18
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/silvermete0r/oikan)
18
19
 
19
20
  > **Important Disclaimer**: OIKAN is an experimental research project. It is not intended for production use or real-world applications. This framework is designed for research purposes, experimentation, and academic exploration of neuro-symbolic machine learning concepts.
20
21
 
@@ -43,14 +44,15 @@ OIKAN implements a modern interpretation of the Kolmogorov-Arnold Representation
43
44
  - Automatic pruning of insignificant terms
44
45
 
45
46
  ```python
46
- class OIKANRegressor:
47
- def __init__(self, hidden_sizes=[64, 64], activation='relu',
47
+ class OIKAN:
48
+ def __init__(self, hidden_sizes=[64, 64], activation='relu',
48
49
  polynomial_degree=2, alpha=0.1):
49
- # Neural network for learning complex patterns
50
- self.neural_net = TabularNet(input_size, hidden_sizes, activation)
51
- # Symbolic regression for interpretable formulas
52
- self.symbolic_model = None
53
-
50
+ # Neural network for learning complex patterns
51
+ self.neural_net = TabularNet(input_size, hidden_sizes, activation)
52
+ # Data augmentation for better coverage
53
+ self.augmented_data = self.augment_data(X, y, augmentation_factor=5)
54
+ # Symbolic regression for interpretable formulas
55
+ self.symbolic_regression = SymbolicRegression(alpha=alpha)
54
56
  ```
55
57
 
56
58
  3. **Basis Functions**: Core set of interpretable transformations:
@@ -121,7 +123,7 @@ mse = mean_squared_error(y_test, y_pred)
121
123
  print("Mean Squared Error:", mse)
122
124
 
123
125
  # Get symbolic formula
124
- formula = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympied' -> simplified formula using sympy; 'latex' -> LaTeX format
126
+ formula = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympy' -> simplified formula using sympy; 'latex' -> LaTeX format
125
127
  print("Symbolic Formula:", formula)
126
128
 
127
129
  # Get feature importances
@@ -170,7 +172,7 @@ accuracy = model.score(X_test, y_test)
170
172
  print("Accuracy:", accuracy)
171
173
 
172
174
  # Get symbolic formulas for each class
173
- formulas = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympied' -> simplified formula using sympy; 'latex' -> LaTeX format
175
+ formulas = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympy' -> simplified formula using sympy; 'latex' -> LaTeX format
174
176
  for i, formula in enumerate(formulas):
175
177
  print(f"Class {i} Formula:", formula)
176
178
 
@@ -190,7 +192,7 @@ loaded_model.load("outputs/model.json")
190
192
 
191
193
  ### Architecture Diagram
192
194
 
193
- ![OIKAN v0.0.3(1) Architecture](https://raw.githubusercontent.com/silvermete0r/oikan/main/docs/media/oikan-v0.0.3(1)-architecture-oop.png)
195
+ ![OIKAN v0.0.3(2) Architecture](https://raw.githubusercontent.com/silvermete0r/oikan/main/docs/media/oikan-v0.0.3(2)-architecture-oop.png)
194
196
 
195
197
  ## OIKAN Symbolic Model Compilers
196
198
 
@@ -93,11 +93,11 @@ class OIKAN(ABC):
93
93
 
94
94
  Parameter:
95
95
  --------
96
- type : str, optional (default='original') other options: 'sympied', 'latex'
97
- 'original' returns the original formula with coefficients, 'sympied' returns sympy simplified formula.
96
+ type : str, optional (default='original') other options: 'sympy', 'latex'
97
+ 'original' returns the original formula with coefficients, 'sympy' returns sympy simplified formula.
98
98
  """
99
- if type.lower() not in ['original', 'sympied', 'latex']:
100
- raise InvalidParameterError("Invalid type. Choose 'original', 'sympied', 'latex'.")
99
+ if type.lower() not in ['original', 'sympy', 'latex']:
100
+ raise InvalidParameterError("Invalid type. Choose 'original', 'sympy', 'latex'.")
101
101
  if self.symbolic_model is None:
102
102
  raise ValueError("Model not fitted yet.")
103
103
  basis_functions = self.symbolic_model['basis_functions']
@@ -114,7 +114,7 @@ class OIKAN(ABC):
114
114
  for i in range(len(coef)) if coef[i] != 0])
115
115
  formulas.append(f"Class {self.classes_[c]}: {formula if formula else '0'}")
116
116
  return formulas
117
- elif type.lower() == 'sympied':
117
+ elif type.lower() == 'sympy':
118
118
  if 'coefficients' in self.symbolic_model:
119
119
  formula = sympify_formula(self.symbolic_model['basis_functions'], self.symbolic_model['coefficients'], self.symbolic_model['n_features'])
120
120
  return formula
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oikan
3
- Version: 0.0.3.4
3
+ Version: 0.0.3.5
4
4
  Summary: OIKAN: Neuro-Symbolic ML for Scientific Discovery
5
5
  Author: Arman Zhalgasbayev
6
6
  License: MIT
@@ -34,6 +34,7 @@ OIKAN is a neuro-symbolic machine learning framework inspired by Kolmogorov-Arno
34
34
  [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
35
35
  [![GitHub issues](https://img.shields.io/github/issues/silvermete0r/OIKAN.svg)](https://github.com/silvermete0r/oikan/issues)
36
36
  [![Docs](https://img.shields.io/badge/docs-passing-brightgreen)](https://silvermete0r.github.io/oikan/)
37
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/silvermete0r/oikan)
37
38
 
38
39
  > **Important Disclaimer**: OIKAN is an experimental research project. It is not intended for production use or real-world applications. This framework is designed for research purposes, experimentation, and academic exploration of neuro-symbolic machine learning concepts.
39
40
 
@@ -62,14 +63,15 @@ OIKAN implements a modern interpretation of the Kolmogorov-Arnold Representation
62
63
  - Automatic pruning of insignificant terms
63
64
 
64
65
  ```python
65
- class OIKANRegressor:
66
- def __init__(self, hidden_sizes=[64, 64], activation='relu',
66
+ class OIKAN:
67
+ def __init__(self, hidden_sizes=[64, 64], activation='relu',
67
68
  polynomial_degree=2, alpha=0.1):
68
- # Neural network for learning complex patterns
69
- self.neural_net = TabularNet(input_size, hidden_sizes, activation)
70
- # Symbolic regression for interpretable formulas
71
- self.symbolic_model = None
72
-
69
+ # Neural network for learning complex patterns
70
+ self.neural_net = TabularNet(input_size, hidden_sizes, activation)
71
+ # Data augmentation for better coverage
72
+ self.augmented_data = self.augment_data(X, y, augmentation_factor=5)
73
+ # Symbolic regression for interpretable formulas
74
+ self.symbolic_regression = SymbolicRegression(alpha=alpha)
73
75
  ```
74
76
 
75
77
  3. **Basis Functions**: Core set of interpretable transformations:
@@ -140,7 +142,7 @@ mse = mean_squared_error(y_test, y_pred)
140
142
  print("Mean Squared Error:", mse)
141
143
 
142
144
  # Get symbolic formula
143
- formula = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympied' -> simplified formula using sympy; 'latex' -> LaTeX format
145
+ formula = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympy' -> simplified formula using sympy; 'latex' -> LaTeX format
144
146
  print("Symbolic Formula:", formula)
145
147
 
146
148
  # Get feature importances
@@ -189,7 +191,7 @@ accuracy = model.score(X_test, y_test)
189
191
  print("Accuracy:", accuracy)
190
192
 
191
193
  # Get symbolic formulas for each class
192
- formulas = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympied' -> simplified formula using sympy; 'latex' -> LaTeX format
194
+ formulas = model.get_formula() # default: type='original' -> returns all formula without pruning | other options: 'sympy' -> simplified formula using sympy; 'latex' -> LaTeX format
193
195
  for i, formula in enumerate(formulas):
194
196
  print(f"Class {i} Formula:", formula)
195
197
 
@@ -209,7 +211,7 @@ loaded_model.load("outputs/model.json")
209
211
 
210
212
  ### Architecture Diagram
211
213
 
212
- ![OIKAN v0.0.3(1) Architecture](https://raw.githubusercontent.com/silvermete0r/oikan/main/docs/media/oikan-v0.0.3(1)-architecture-oop.png)
214
+ ![OIKAN v0.0.3(2) Architecture](https://raw.githubusercontent.com/silvermete0r/oikan/main/docs/media/oikan-v0.0.3(2)-architecture-oop.png)
213
215
 
214
216
  ## OIKAN Symbolic Model Compilers
215
217
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "oikan"
7
- version = "0.0.3.4"
7
+ version = "0.0.3.5"
8
8
  description = "OIKAN: Neuro-Symbolic ML for Scientific Discovery"
9
9
  readme = "README.md"
10
10
  authors = [{name = "Arman Zhalgasbayev"}]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes