Skip to content

Commit c2f6677

Browse files
committed
init
1 parent 91a2f63 commit c2f6677

File tree

2 files changed

+2
-55
lines changed

2 files changed

+2
-55
lines changed

pykan.egg-info/PKG-INFO

+2-52
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: pykan
3-
Version: 0.2.4
3+
Version: 0.2.6
44
Summary: Kolmogorov Arnold Networks
55
Author: Ziming Liu
66
Author-email: [email protected]
@@ -13,62 +13,12 @@ License-File: LICENSE
1313

1414
<img width="600" alt="kan_plot" src="https://github.com/KindXiaoming/pykan/assets/23551623/a2d2d225-b4d2-4c1e-823e-bc45c7ea96f9">
1515

16-
# !! Major Updates on July 13, 2024
17-
18-
* `model.train()` has been changed to `model.fit()`
19-
* Some other small features are changed (e.g., create_dataset has been moved to kan.utils). I have updated and checked the notebooks in `./tutorials` are runnable on CPUs, so please refer to those tutorials for updated/new functionalities. Documentation hasn't been updated yet but will be updated soon.
20-
21-
For pypi users, this is the most recent version 0.2.1.
22-
23-
New functionalities include (documentation later):
24-
* including multiplications in KANs. [Tutorial](https://github.com/KindXiaoming/pykan/blob/master/tutorials/Interp_1_Hello%2C%20MultKAN.ipynb)
25-
* the speed mode. Speed up your KAN using `model = model.speed()` if you never use the symbolic functionalities. [Tutorial](https://github.com/KindXiaoming/pykan/blob/master/tutorials/Example_2_speed_up.ipynb)
26-
* Compiling symbolic formulas into KANs. [Tutorial](https://github.com/KindXiaoming/pykan/blob/master/tutorials/Interp_3_KAN_Compiler.ipynb)
27-
* Feature attribution and pruning inputs. [Tutorial](https://github.com/KindXiaoming/pykan/blob/master/tutorials/Interp_4_feature_attribution.ipynb)
28-
2916
# Kolmogorov-Arnold Networks (KANs)
3017

31-
This is the github repo for the paper ["KAN: Kolmogorov-Arnold Networks"](https://arxiv.org/abs/2404.19756). Find the documentation [here](https://kindxiaoming.github.io/pykan/). Here's [author's note](https://github.com/KindXiaoming/pykan?tab=readme-ov-file#authors-note) responding to current hype of KANs.
18+
This is the github repo for the paper ["KAN: Kolmogorov-Arnold Networks"](https://arxiv.org/abs/2404.19756) and ["KAN 2.0: Kolmogorov-Arnold Networks Meet Science"](https://arxiv.org/abs/2408.10205). You may want to quickstart with [hellokan](https://github.com/KindXiaoming/pykan/blob/master/hellokan.ipynb), try more examples in [tutorials](https://github.com/KindXiaoming/pykan/tree/master/tutorials), or read the documentation [here](https://kindxiaoming.github.io/pykan/).
3219

3320
Kolmogorov-Arnold Networks (KANs) are promising alternatives of Multi-Layer Perceptrons (MLPs). KANs have strong mathematical foundations just like MLPs: MLPs are based on the universal approximation theorem, while KANs are based on Kolmogorov-Arnold representation theorem. KANs and MLPs are dual: KANs have activation functions on edges, while MLPs have activation functions on nodes. This simple change makes KANs better (sometimes much better!) than MLPs in terms of both model **accuracy** and **interpretability**. A quick intro of KANs [here](https://kindxiaoming.github.io/pykan/intro.html).
3421

35-
<img width="1163" alt="mlp_kan_compare" src="https://github.com/KindXiaoming/pykan/assets/23551623/695adc2d-0d0b-4e4b-bcff-db2c8070f841">
36-
37-
## Accuracy
38-
**KANs have faster scaling than MLPs. KANs have better accuracy than MLPs with fewer parameters.**
39-
40-
Please set `torch.set_default_dtype(torch.float64)` if you want high precision.
41-
42-
**Example 1: fitting symbolic formulas**
43-
<img width="1824" alt="Screenshot 2024-04-30 at 10 55 30" src="https://github.com/KindXiaoming/pykan/assets/23551623/e1fc3dcc-c1f6-49d5-b58e-79ff7b98a49b">
44-
45-
**Example 2: fitting special functions**
46-
<img width="1544" alt="Screenshot 2024-04-30 at 11 07 20" src="https://github.com/KindXiaoming/pykan/assets/23551623/b2124337-cabf-4e00-9690-938e84058a91">
47-
48-
**Example 3: PDE solving**
49-
<img width="1665" alt="Screenshot 2024-04-30 at 10 57 25" src="https://github.com/KindXiaoming/pykan/assets/23551623/5da94412-c409-45d1-9a60-9086e11d6ccc">
50-
51-
**Example 4: avoid catastrophic forgetting**
52-
<img width="1652" alt="Screenshot 2024-04-30 at 11 04 36" src="https://github.com/KindXiaoming/pykan/assets/23551623/57d81de6-7cff-4e55-b8f9-c4768ace2c77">
53-
54-
## Interpretability
55-
**KANs can be intuitively visualized. KANs offer interpretability and interactivity that MLPs cannot provide. We can use KANs to potentially discover new scientific laws.**
56-
57-
**Example 1: Symbolic formulas**
58-
<img width="1510" alt="Screenshot 2024-04-30 at 11 04 56" src="https://github.com/KindXiaoming/pykan/assets/23551623/3cfd1ca2-cd3e-4396-845e-ef8f3a7c55ef">
59-
60-
**Example 2: Discovering mathematical laws of knots**
61-
<img width="1443" alt="Screenshot 2024-04-30 at 11 05 25" src="https://github.com/KindXiaoming/pykan/assets/23551623/80451ac2-c5fd-45b9-89a7-1637ba8145af">
62-
63-
**Example 3: Discovering physical laws of Anderson localization**
64-
<img width="1295" alt="Screenshot 2024-04-30 at 11 05 53" src="https://github.com/KindXiaoming/pykan/assets/23551623/8ee507a0-d194-44a9-8837-15d7f5984301">
65-
66-
**Example 4: Training of a three-layer KAN**
67-
68-
![kan_training_low_res](https://github.com/KindXiaoming/pykan/assets/23551623/e9f215c7-a393-46b9-8528-c906878f015e)
69-
70-
71-
7222
## Installation
7323
Pykan can be installed via PyPI or directly from GitHub.
7424

pykan.egg-info/SOURCES.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
LICENSE
22
README.md
33
setup.py
4-
kan/KAN.py
54
kan/KANLayer.py
65
kan/LBFGS.py
76
kan/MLP.py
87
kan/MultKAN.py
98
kan/Symbolic_KANLayer.py
109
kan/__init__.py
11-
kan/ckpt.py
1210
kan/compiler.py
1311
kan/experiment.py
1412
kan/feynman.py
@@ -17,7 +15,6 @@ kan/spline.py
1715
kan/utils.py
1816
kan/assets/img/mult_symbol.png
1917
kan/assets/img/sum_symbol.png
20-
kan/figures/lock.png
2118
pykan.egg-info/PKG-INFO
2219
pykan.egg-info/SOURCES.txt
2320
pykan.egg-info/dependency_links.txt

0 commit comments

Comments
 (0)