diff --git a/.ipynb_checkpoints/intro-checkpoint.html b/.ipynb_checkpoints/intro-checkpoint.html new file mode 100644 index 00000000..d3cbdb37 --- /dev/null +++ b/.ipynb_checkpoints/intro-checkpoint.html @@ -0,0 +1,253 @@ + + + + + + + Hello, KAN! — Kolmogorov Arnold Network documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Hello, KAN!

+
+

Kolmogorov-Arnold representation theorem

+

Kolmogorov-Arnold representation theorem states that if \(f\) is a +multivariate continuous function on a bounded domain, then it can be +written as a finite composition of continuous functions of a single +variable and the binary operation of addition. More specifically, for a +smooth \(f : [0,1]^n \to \mathbb{R}\),

+
+\[f(x) = f(x_1,...,x_n)=\sum_{q=1}^{2n+1}\Phi_q(\sum_{p=1}^n \phi_{q,p}(x_p))\]
+

where \(\phi_{q,p}:[0,1]\to\mathbb{R}\) and +\(\Phi_q:\mathbb{R}\to\mathbb{R}\). In a sense, they showed that the +only true multivariate function is addition, since every other function +can be written using univariate functions and sum. However, this 2-Layer +width-\((2n+1)\) Kolmogorov-Arnold representation may not be smooth +due to its limited expressive power. We augment its expressive power by +generalizing it to arbitrary depths and widths.

+
+
+

Kolmogorov-Arnold Network (KAN)

+

The Kolmogorov-Arnold representation can be written in matrix form

+
+\[f(x)={\bf \Phi}_{\rm out}\circ{\bf \Phi}_{\rm in}\circ {\bf x}\]
+

where

+
+\[\begin{split}{\bf \Phi}_{\rm in}= \begin{pmatrix} \phi_{1,1}(\cdot) & \cdots & \phi_{1,n}(\cdot) \\ \vdots & & \vdots \\ \phi_{2n+1,1}(\cdot) & \cdots & \phi_{2n+1,n}(\cdot) \end{pmatrix},\quad {\bf \Phi}_{\rm out}=\begin{pmatrix} \Phi_1(\cdot) & \cdots & \Phi_{2n+1}(\cdot)\end{pmatrix}\end{split}\]
+

We notice that both \({\bf \Phi}_{\rm in}\) and +\({\bf \Phi}_{\rm out}\) are special cases of the following function +matrix \({\bf \Phi}\) (with \(n_{\rm in}\) inputs, and +\(n_{\rm out}\) outputs), we call a Kolmogorov-Arnold layer:

+
+\[\begin{split}{\bf \Phi}= \begin{pmatrix} \phi_{1,1}(\cdot) & \cdots & \phi_{1,n_{\rm in}}(\cdot) \\ \vdots & & \vdots \\ \phi_{n_{\rm out},1}(\cdot) & \cdots & \phi_{n_{\rm out},n_{\rm in}}(\cdot) \end{pmatrix}\end{split}\]
+

\({\bf \Phi}_{\rm in}\) corresponds to +\(n_{\rm in}=n, n_{\rm out}=2n+1\), and \({\bf \Phi}_{\rm out}\) +corresponds to \(n_{\rm in}=2n+1, n_{\rm out}=1\).

+

After defining the layer, we can construct a Kolmogorov-Arnold network +simply by stacking layers! Let’s say we have \(L\) layers, with the +\(l^{\rm th}\) layer \({\bf \Phi}_l\) have shape +\((n_{l+1}, n_{l})\). Then the whole network is

+
+\[{\rm KAN}({\bf x})={\bf \Phi}_{L-1}\circ\cdots \circ{\bf \Phi}_1\circ{\bf \Phi}_0\circ {\bf x}\]
+

In constrast, a Multi-Layer Perceptron is interleaved by linear layers +\({\bf W}_l\) and nonlinearities \(\sigma\):

+
+\[{\rm MLP}({\bf x})={\bf W}_{L-1}\circ\sigma\circ\cdots\circ {\bf W}_1\circ\sigma\circ {\bf W}_0\circ {\bf x}\]
+

A KAN can be easily visualized. (1) A KAN is simply stack of KAN layers. +(2) Each KAN layer can be visualized as a fully-connected layer, with a +1D function placed on each edge. Let’s see an example below.

+
+
+

Get started with KANs

+

Initialize KAN

+
from kan import *
+# create a KAN: 2D inputs, 1D output, and 5 hidden neurons. cubic spline (k=3), 5 grid intervals (grid=5).
+model = KAN(width=[2,5,1], grid=5, k=3, seed=0)
+
+
+

Create dataset

+
# create dataset f(x,y) = exp(sin(pi*x)+y^2)
+f = lambda x: torch.exp(torch.sin(torch.pi*x[:,[0]]) + x[:,[1]]**2)
+dataset = create_dataset(f, n_var=2)
+dataset['train_input'].shape, dataset['train_label'].shape
+
+
+
(torch.Size([1000, 2]), torch.Size([1000, 1]))
+
+
+

Plot KAN at initialization

+
# plot KAN at initialization
+model(dataset['train_input']);
+model.plot(beta=100)
+
+
+.ipynb_checkpoints/intro_files/intro_15_0.png +

Train KAN with sparsity regularization

+
# train the model
+model.train(dataset, opt="LBFGS", steps=20, lamb=0.01, lamb_entropy=10.);
+
+
+
train loss: 1.57e-01 | test loss: 1.31e-01 | reg: 2.05e+01 : 100%|██| 20/20 [00:18<00:00,  1.06it/s]
+
+
+

Plot trained KAN

+
model.plot()
+
+
+.ipynb_checkpoints/intro_files/intro_19_0.png +

Prune KAN and replot (keep the original shape)

+
model.prune()
+model.plot(mask=True)
+
+
+.ipynb_checkpoints/intro_files/intro_21_0.png +

Prune KAN and replot (get a smaller shape)

+
model = model.prune()
+model(dataset['train_input'])
+model.plot()
+
+
+.ipynb_checkpoints/intro_files/intro_23_0.png +

Continue training and replot

+
model.train(dataset, opt="LBFGS", steps=50);
+
+
+
train loss: 4.74e-03 | test loss: 4.80e-03 | reg: 2.98e+00 : 100%|██| 50/50 [00:07<00:00,  7.03it/s]
+
+
+
model.plot()
+
+
+.ipynb_checkpoints/intro_files/intro_26_0.png +

Automatically or manually set activation functions to be symbolic

+
mode = "auto" # "manual"
+
+if mode == "manual":
+    # manual mode
+    model.fix_symbolic(0,0,0,'sin');
+    model.fix_symbolic(0,1,0,'x^2');
+    model.fix_symbolic(1,0,0,'exp');
+elif mode == "auto":
+    # automatic mode
+    lib = ['x','x^2','x^3','x^4','exp','log','sqrt','tanh','sin','abs']
+    model.auto_symbolic(lib=lib)
+
+
+
fixing (0,0,0) with sin, r2=0.999987252534279
+fixing (0,1,0) with x^2, r2=0.9999996536741071
+fixing (1,0,0) with exp, r2=0.9999988529417926
+
+
+

Continue training to almost machine precision

+
model.train(dataset, opt="LBFGS", steps=50);
+
+
+
train loss: 2.02e-10 | test loss: 1.13e-10 | reg: 2.98e+00 : 100%|██| 50/50 [00:02<00:00, 22.59it/s]
+
+
+

Obtain the symbolic formula

+
model.symbolic_formula()[0][0]
+
+
+
+\[\displaystyle 1.0 e^{1.0 x_{2}^{2} + 1.0 \sin{\left(3.14 x_{1} \right)}}\]
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/.ipynb_checkpoints/kan-checkpoint.html b/.ipynb_checkpoints/kan-checkpoint.html new file mode 100644 index 00000000..8d69e426 --- /dev/null +++ b/.ipynb_checkpoints/kan-checkpoint.html @@ -0,0 +1,1074 @@ + + + + + + + kan package — Kolmogorov Arnold Network documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

kan package

+
+

Submodules

+
+
+

kan.KAN module

+
+
+

kan.KANLayer module

+
+
+class kan.KANLayer.KANLayer(*args: Any, **kwargs: Any)
+

Bases: Module

+

KANLayer class

+
+

Attributes:

+
+
+
in_dim: int

input dimension

+
+
out_dim: int

output dimension

+
+
size: int

the number of splines = input dimension * output dimension

+
+
k: int

the piecewise polynomial order of splines

+
+
grid: 2D torch.float

grid points

+
+
noises: 2D torch.float

injected noises to splines at initialization (to break degeneracy)

+
+
coef: 2D torch.tensor

coefficients of B-spline bases

+
+
scale_base: 1D torch.float

magnitude of the residual function b(x)

+
+
scale_sp: 1D torch.float

mangitude of the spline function spline(x)

+
+
base_fun: fun

residual function b(x)

+
+
mask: 1D torch.float

mask of spline functions. setting some element of the mask to zero means setting the corresponding activation to zero function.

+
+
grid_eps: float in [0,1]

a hyperparameter used in update_grid_from_samples. When grid_eps = 0, the grid is uniform; when grid_eps = 1, the grid is partitioned using percentiles of samples. 0 < grid_eps < 1 interpolates between the two extremes.

+
+
weight_sharing: 1D tensor int

allow spline activations to share parameters

+
+
lock_counter: int

counter how many activation functions are locked (weight sharing)

+
+
lock_id: 1D torch.int

the id of activation functions that are locked

+
+
device: str

device

+
+
+
+
+
+

Methods:

+
+
+
__init__():

initialize a KANLayer

+
+
forward():

forward

+
+
update_grid_from_samples():

update grids based on samples’ incoming activations

+
+
initialize_grid_from_parent():

initialize grids from another model

+
+
get_subset():

get subset of the KANLayer (used for pruning)

+
+
lock():

lock several activation functions to share parameters

+
+
unlock():

unlock already locked activation functions

+
+
+
+
+
+__init__(in_dim=3, out_dim=2, num=5, k=3, noise_scale=0.5, scale_base_mu=0.0, scale_base_sigma=1.0, scale_sp=1.0, base_fun=torch.nn.SiLU, grid_eps=0.02, grid_range=[-1, 1], sp_trainable=True, sb_trainable=True, save_plot_data=True, device='cpu', sparse_init=False)
+

‘ +initialize a KANLayer

+
+

Args:

+
+
+
in_dimint

input dimension. Default: 2.

+
+
out_dimint

output dimension. Default: 3.

+
+
numint

the number of grid intervals = G. Default: 5.

+
+
kint

the order of piecewise polynomial. Default: 3.

+
+
noise_scalefloat

the scale of noise injected at initialization. Default: 0.1.

+
+
scale_basefloat

the scale of the residual function b(x). Default: 1.0.

+
+
scale_spfloat

the scale of the base function spline(x). Default: 1.0.

+
+
base_funfunction

residual function b(x). Default: torch.nn.SiLU()

+
+
grid_epsfloat

When grid_eps = 0, the grid is uniform; when grid_eps = 1, the grid is partitioned using percentiles of samples. 0 < grid_eps < 1 interpolates between the two extremes. Default: 0.02.

+
+
grid_rangelist/np.array of shape (2,)

setting the range of grids. Default: [-1,1].

+
+
sp_trainablebool

If true, scale_sp is trainable. Default: True.

+
+
sb_trainablebool

If true, scale_base is trainable. Default: True.

+
+
devicestr

device

+
+
+
+
+
+

Returns:

+
+

self

+
+
+
+

Example

+
>>> model = KANLayer(in_dim=3, out_dim=5)
+>>> (model.in_dim, model.out_dim)
+(3, 5)
+
+
+
+
+ +
+
+forward(x)
+

KANLayer forward given input x

+
+

Args:

+
+
+
x2D torch.float

inputs, shape (number of samples, input dimension)

+
+
+
+
+
+

Returns:

+
+
+
y2D torch.float

outputs, shape (number of samples, output dimension)

+
+
preacts3D torch.float

fan out x into activations, shape (number of sampels, output dimension, input dimension)

+
+
postacts3D torch.float

the outputs of activation functions with preacts as inputs

+
+
postspline3D torch.float

the outputs of spline functions with preacts as inputs

+
+
+
+
+
+

Example

+
>>> model = KANLayer(in_dim=3, out_dim=5)
+>>> x = torch.normal(0,1,size=(100,3))
+>>> y, preacts, postacts, postspline = model(x)
+>>> y.shape, preacts.shape, postacts.shape, postspline.shape
+(torch.Size([100, 5]),
+ torch.Size([100, 5, 3]),
+ torch.Size([100, 5, 3]),
+ torch.Size([100, 5, 3]))
+
+
+
+
+ +
+
+get_subset(in_id, out_id)
+

get a smaller KANLayer from a larger KANLayer (used for pruning)

+
+

Args:

+
+
+
in_idlist

id of selected input neurons

+
+
out_idlist

id of selected output neurons

+
+
+
+
+
+

Returns:

+
+

spb : KANLayer

+
+
+
+

Example

+
>>> kanlayer_large = KANLayer(in_dim=10, out_dim=10, num=5, k=3)
+>>> kanlayer_small = kanlayer_large.get_subset([0,9],[1,2,3])
+>>> kanlayer_small.in_dim, kanlayer_small.out_dim
+(2, 3)
+
+
+
+
+ +
+
+initialize_grid_from_parent(parent, x, mode='sample')
+

update grid from a parent KANLayer & samples

+
+

Args:

+
+
+
parentKANLayer

a parent KANLayer (whose grid is usually coarser than the current model)

+
+
x2D torch.float

inputs, shape (number of samples, input dimension)

+
+
+
+
+
+

Returns:

+
+

None

+
+
+
+

Example

+
>>> batch = 100
+>>> parent_model = KANLayer(in_dim=1, out_dim=1, num=5, k=3)
+>>> print(parent_model.grid.data)
+>>> model = KANLayer(in_dim=1, out_dim=1, num=10, k=3)
+>>> x = torch.normal(0,1,size=(batch, 1))
+>>> model.initialize_grid_from_parent(parent_model, x)
+>>> print(model.grid.data)
+tensor([[-1.0000, -0.6000, -0.2000,  0.2000,  0.6000,  1.0000]])
+tensor([[-1.0000, -0.8000, -0.6000, -0.4000, -0.2000,  0.0000,  0.2000,  0.4000,
+  0.6000,  0.8000,  1.0000]])
+
+
+
+
+ +
+
+swap(i1, i2, mode='in')
+
+ +
+
+to(device)
+
+ +
+
+update_grid_from_samples(x, mode='sample')
+

update grid from samples

+
+

Args:

+
+
+
x2D torch.float

inputs, shape (number of samples, input dimension)

+
+
+
+
+
+

Returns:

+
+

None

+
+
+
+

Example

+
>>> model = KANLayer(in_dim=1, out_dim=1, num=5, k=3)
+>>> print(model.grid.data)
+>>> x = torch.linspace(-3,3,steps=100)[:,None]
+>>> model.update_grid_from_samples(x)
+>>> print(model.grid.data)
+tensor([[-1.0000, -0.6000, -0.2000,  0.2000,  0.6000,  1.0000]])
+tensor([[-3.0002, -1.7882, -0.5763,  0.6357,  1.8476,  3.0002]])
+
+
+
+
+ +
+
+ +
+
+

kan.LBFGS module

+
+
+class kan.LBFGS.LBFGS(*args: Any, **kwargs: Any)
+

Bases: Optimizer

+

Implements L-BFGS algorithm.

+

Heavily inspired by minFunc.

+
+

Warning

+

This optimizer doesn’t support per-parameter options and parameter +groups (there can be only one).

+
+
+

Warning

+

Right now all parameters have to be on a single device. This will be +improved in the future.

+
+
+

Note

+

This is a very memory intensive optimizer (it requires additional +param_bytes * (history_size + 1) bytes). If it doesn’t fit in memory +try reducing the history size, or use a different algorithm.

+
+
+
Args:

lr (float): learning rate (default: 1) +max_iter (int): maximal number of iterations per optimization step

+
+

(default: 20)

+
+
+
max_eval (int): maximal number of function evaluations per optimization

step (default: max_iter * 1.25).

+
+
tolerance_grad (float): termination tolerance on first order optimality

(default: 1e-7).

+
+
tolerance_change (float): termination tolerance on function

value/parameter changes (default: 1e-9).

+
+
+

history_size (int): update history size (default: 100). +line_search_fn (str): either ‘strong_wolfe’ or None (default: None).

+
+
+
+
+__init__(params, lr=1, max_iter=20, max_eval=None, tolerance_grad=1e-07, tolerance_change=1e-09, tolerance_ys=1e-32, history_size=100, line_search_fn=None)
+
+ +
+
+step(closure)
+

Perform a single optimization step.

+
+
Args:
+
closure (Callable): A closure that reevaluates the model

and returns the loss.

+
+
+
+
+
+ +
+ +
+
+

kan.Symbolic_KANLayer module

+
+
+class kan.Symbolic_KANLayer.Symbolic_KANLayer(*args: Any, **kwargs: Any)
+

Bases: Module

+

KANLayer class

+
+

Attributes:

+
+
+
in_dim: int

input dimension

+
+
out_dim: int

output dimension

+
+
funs: 2D array of torch functions (or lambda functions)

symbolic functions (torch)

+
+
funs_name: 2D arry of str

names of symbolic functions

+
+
funs_sympy: 2D array of sympy functions (or lambda functions)

symbolic functions (sympy)

+
+
affine: 3D array of floats

affine transformations of inputs and outputs

+
+
+
+
+
+

Methods:

+
+
+
__init__():

initialize a Symbolic_KANLayer

+
+
forward():

forward

+
+
get_subset():

get subset of the KANLayer (used for pruning)

+
+
fix_symbolic():

fix an activation function to be symbolic

+
+
+
+
+
+__init__(in_dim=3, out_dim=2, device='cpu')
+

initialize a Symbolic_KANLayer (activation functions are initialized to be identity functions)

+
+

Args:

+
+
+
in_dimint

input dimension

+
+
out_dimint

output dimension

+
+
devicestr

device

+
+
+
+
+
+

Returns:

+
+

self

+
+
+
+

Example

+
>>> sb = Symbolic_KANLayer(in_dim=3, out_dim=3)
+>>> len(sb.funs), len(sb.funs[0])
+(3, 3)
+
+
+
+
+ +
+
+fix_symbolic(i, j, fun_name, x=None, y=None, random=False, a_range=(-10, 10), b_range=(-10, 10), verbose=True)
+

fix an activation function to be symbolic

+
+

Args:

+
+
+
iint

the id of input neuron

+
+
jint

the id of output neuron

+
+
fun_namestr

the name of the symbolic functions

+
+
x1D array

preactivations

+
+
y1D array

postactivations

+
+
a_rangetuple

sweeping range of a

+
+
b_rangetuple

sweeping range of a

+
+
verbosebool

print more information if True

+
+
+
+
+
+

Returns:

+
+

r2 (coefficient of determination)

+
+
+
+

Example 1

+
>>> # when x & y are not provided. Affine parameters are set to a = 1, b = 0, c = 1, d = 0
+>>> sb = Symbolic_KANLayer(in_dim=3, out_dim=2)
+>>> sb.fix_symbolic(2,1,'sin')
+>>> print(sb.funs_name)
+>>> print(sb.affine)
+[['', '', ''], ['', '', 'sin']]
+Parameter containing:
+tensor([[0., 0., 0., 0.],
+         [0., 0., 0., 0.],
+         [1., 0., 1., 0.]], requires_grad=True)
+Example 2
+---------
+>>> # when x & y are provided, fit_params() is called to find the best fit coefficients
+>>> sb = Symbolic_KANLayer(in_dim=3, out_dim=2)
+>>> batch = 100
+>>> x = torch.linspace(-1,1,steps=batch)
+>>> noises = torch.normal(0,1,(batch,)) * 0.02
+>>> y = 5.0*torch.sin(3.0*x + 2.0) + 0.7 + noises
+>>> sb.fix_symbolic(2,1,'sin',x,y)
+>>> print(sb.funs_name)
+>>> print(sb.affine[1,2,:].data)
+r2 is 0.9999701976776123
+[['', '', ''], ['', '', 'sin']]
+tensor([2.9981, 1.9997, 5.0039, 0.6978])
+
+
+
+
+ +
+
+forward(x, singularity_avoiding=False, y_th=10.0)
+
+

Args:

+
+
+
x2D array

inputs, shape (batch, input dimension)

+
+
+
+
+
+

Returns:

+
+
+
y2D array

outputs, shape (batch, output dimension)

+
+
postacts3D array

activations after activation functions but before summing on nodes

+
+
+
+
+
+

Example

+
>>> sb = Symbolic_KANLayer(in_dim=3, out_dim=5)
+>>> x = torch.normal(0,1,size=(100,3))
+>>> y, postacts = sb(x)
+>>> y.shape, postacts.shape
+(torch.Size([100, 5]), torch.Size([100, 5, 3]))
+
+
+
+
+ +
+
+get_subset(in_id, out_id)
+

get a smaller Symbolic_KANLayer from a larger Symbolic_KANLayer (used for pruning)

+
+

Args:

+
+
+
in_idlist

id of selected input neurons

+
+
out_idlist

id of selected output neurons

+
+
+
+
+
+

Returns:

+
+

spb : Symbolic_KANLayer

+
+
+
+

Example

+
>>> sb_large = Symbolic_KANLayer(in_dim=10, out_dim=10)
+>>> sb_small = sb_large.get_subset([0,9],[1,2,3])
+>>> sb_small.in_dim, sb_small.out_dim
+(2, 3)
+
+
+
+
+ +
+
+swap(i1, i2, mode='in')
+
+ +
+
+to(device)
+
+ +
+
+ +
+
+

kan.spline module

+
+
+kan.spline.B_batch(x, grid, k=0, extend=True, device='cpu')
+

evaludate x on B-spline bases

+
+

Args:

+
+
+
x2D torch.tensor

inputs, shape (number of splines, number of samples)

+
+
grid2D torch.tensor

grids, shape (number of splines, number of grid points)

+
+
kint

the piecewise polynomial order of splines.

+
+
extendbool

If True, k points are extended on both ends. If False, no extension (zero boundary condition). Default: True

+
+
devicestr

devicde

+
+
+
+
+
+

Returns:

+
+
+
spline values3D torch.tensor

shape (number of splines, number of B-spline bases (coeffcients), number of samples). The numbef of B-spline bases = number of grid points + k - 1.

+
+
+
+
+
+

Example

+
>>> num_spline = 5
+>>> num_sample = 100
+>>> num_grid_interval = 10
+>>> k = 3
+>>> x = torch.normal(0,1,size=(num_spline, num_sample))
+>>> grids = torch.einsum('i,j->ij', torch.ones(num_spline,), torch.linspace(-1,1,steps=num_grid_interval+1))
+>>> B_batch(x, grids, k=k).shape
+torch.Size([5, 13, 100])
+
+
+
+
+ +
+
+kan.spline.coef2curve(x_eval, grid, coef, k, device='cpu')
+

converting B-spline coefficients to B-spline curves. Evaluate x on B-spline curves (summing up B_batch results over B-spline basis).

+
+

Args:

+
+
+
x_eval2D torch.tensor)

shape (number of splines, number of samples)

+
+
grid2D torch.tensor)

shape (number of splines, number of grid points)

+
+
coef2D torch.tensor)

shape (number of splines, number of coef params). number of coef params = number of grid intervals + k

+
+
kint

the piecewise polynomial order of splines.

+
+
devicestr

devicde

+
+
+
+
+
+

Returns:

+
+
+
y_eval2D torch.tensor

shape (number of splines, number of samples)

+
+
+
+
+
+

Example

+
>>> num_spline = 5
+>>> num_sample = 100
+>>> num_grid_interval = 10
+>>> k = 3
+>>> x_eval = torch.normal(0,1,size=(num_spline, num_sample))
+>>> grids = torch.einsum('i,j->ij', torch.ones(num_spline,), torch.linspace(-1,1,steps=num_grid_interval+1))
+>>> coef = torch.normal(0,1,size=(num_spline, num_grid_interval+k))
+>>> coef2curve(x_eval, grids, coef, k=k).shape
+torch.Size([5, 100])
+
+
+
+
+ +
+
+kan.spline.curve2coef(x_eval, y_eval, grid, k, lamb=1e-08)
+

converting B-spline curves to B-spline coefficients using least squares.

+
+

Args:

+
+
+
x_eval2D torch.tensor

shape (number of splines, number of samples)

+
+
y_eval2D torch.tensor

shape (number of splines, number of samples)

+
+
grid2D torch.tensor

shape (number of splines, number of grid points)

+
+
kint

the piecewise polynomial order of splines.

+
+
devicestr

devicde

+
+
+
+
+
+

Example

+
>>> num_spline = 5
+>>> num_sample = 100
+>>> num_grid_interval = 10
+>>> k = 3
+>>> x_eval = torch.normal(0,1,size=(num_spline, num_sample))
+>>> y_eval = torch.normal(0,1,size=(num_spline, num_sample))
+>>> grids = torch.einsum('i,j->ij', torch.ones(num_spline,), torch.linspace(-1,1,steps=num_grid_interval+1))
+torch.Size([5, 13])
+
+
+
+
+ +
+
+kan.spline.extend_grid(grid, k_extend=0)
+
+ +
+
+

kan.utils module

+
+
+kan.utils.add_symbolic(name, fun, c=1, fun_singularity=None)
+

add a symbolic function to library

+
+

Args:

+
+
+
namestr

name of the function

+
+
funfun

torch function or lambda function

+
+
+
+
+
+

Returns:

+
+

None

+
+
+
+

Example

+
>>> print(SYMBOLIC_LIB['Bessel'])
+KeyError: 'Bessel'
+>>> add_symbolic('Bessel', torch.special.bessel_j0)
+>>> print(SYMBOLIC_LIB['Bessel'])
+(<built-in function special_bessel_j0>, Bessel)
+
+
+
+
+ +
+
+kan.utils.augment_input(orig_vars, aux_vars, x)
+
+ +
+
+kan.utils.batch_hessian(model, x, create_graph=False)
+
+ +
+
+kan.utils.batch_jacobian(func, x, create_graph=False)
+
+ +
+
+kan.utils.create_dataset(f, n_var=2, f_mode='col', ranges=[-1, 1], train_num=1000, test_num=1000, normalize_input=False, normalize_label=False, device='cpu', seed=0)
+

create dataset

+
+

Args:

+
+
+
ffunction

the symbolic formula used to create the synthetic dataset

+
+
rangeslist or np.array; shape (2,) or (n_var, 2)

the range of input variables. Default: [-1,1].

+
+
train_numint

the number of training samples. Default: 1000.

+
+
test_numint

the number of test samples. Default: 1000.

+
+
normalize_inputbool

If True, apply normalization to inputs. Default: False.

+
+
normalize_labelbool

If True, apply normalization to labels. Default: False.

+
+
devicestr

device. Default: ‘cpu’.

+
+
seedint

random seed. Default: 0.

+
+
+
+
+
+

Returns:

+
+
+
datasetdic
+
Train/test inputs/labels are dataset[‘train_input’], dataset[‘train_label’],

dataset[‘test_input’], dataset[‘test_label’]

+
+
+
+
+
+
+
+

Example

+
>>> f = lambda x: torch.exp(torch.sin(torch.pi*x[:,[0]]) + x[:,[1]]**2)
+>>> dataset = create_dataset(f, n_var=2, train_num=100)
+>>> dataset['train_input'].shape
+torch.Size([100, 2])
+
+
+
+
+ +
+
+kan.utils.create_dataset_from_data(inputs, labels, train_ratio=0.8, device='cpu')
+
+ +
+
+kan.utils.ex_round(ex1, n_digit)
+
+ +
+
+kan.utils.f_arccos(x, y_th)
+
+ +
+
+kan.utils.f_arcsin(x, y_th)
+
+ +
+
+kan.utils.f_arctanh(x, y_th)
+
+ +
+
+kan.utils.f_exp(x, y_th)
+
+ +
+
+kan.utils.f_inv(x, y_th)
+
+ +
+
+kan.utils.f_inv2(x, y_th)
+
+ +
+
+kan.utils.f_inv3(x, y_th)
+
+ +
+
+kan.utils.f_inv4(x, y_th)
+
+ +
+
+kan.utils.f_inv5(x, y_th)
+
+ +
+
+kan.utils.f_invsqrt(x, y_th)
+
+ +
+
+kan.utils.f_log(x, y_th)
+
+ +
+
+kan.utils.f_power1d5(x, y_th)
+
+ +
+
+kan.utils.f_sqrt(x, y_th)
+
+ +
+
+kan.utils.f_tan(x, y_th)
+
+ +
+
+kan.utils.fit_params(x, y, fun, a_range=(-10, 10), b_range=(-10, 10), grid_number=101, iteration=3, verbose=True, device='cpu')
+

fit a, b, c, d such that

+
+\[|y-(cf(ax+b)+d)|^2\]
+

is minimized. Both x and y are 1D array. Sweep a and b, find the best fitted model.

+
+

Args:

+
+
+
x1D array

x values

+
+
y1D array

y values

+
+
funfunction

symbolic function

+
+
a_rangetuple

sweeping range of a

+
+
b_rangetuple

sweeping range of b

+
+
grid_numint

number of steps along a and b

+
+
iterationint

number of zooming in

+
+
verbosebool

print extra information if True

+
+
devicestr

device

+
+
+
+
+
+

Returns:

+
+
+
a_bestfloat

best fitted a

+
+
b_bestfloat

best fitted b

+
+
c_bestfloat

best fitted c

+
+
d_bestfloat

best fitted d

+
+
r2_bestfloat

best r2 (coefficient of determination)

+
+
+
+
+
+

Example

+
>>> num = 100
+>>> x = torch.linspace(-1,1,steps=num)
+>>> noises = torch.normal(0,1,(num,)) * 0.02
+>>> y = 5.0*torch.sin(3.0*x + 2.0) + 0.7 + noises
+>>> fit_params(x, y, torch.sin)
+r2 is 0.9999727010726929
+(tensor([2.9982, 1.9996, 5.0053, 0.7011]), tensor(1.0000))
+
+
+
+
+ +
+
+kan.utils.get_derivative(model, inputs, labels, derivative='hessian', loss_mode='pred', reg_metric='w', lamb=0.0, lamb_l1=1.0, lamb_entropy=0.0)
+
+ +
+
+kan.utils.model2param(model)
+
+ +
+
+kan.utils.sparse_mask(in_dim, out_dim)
+
+ +
+
+

Module contents

+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/.ipynb_checkpoints/modules-checkpoint.html b/.ipynb_checkpoints/modules-checkpoint.html new file mode 100644 index 00000000..9aa89cf8 --- /dev/null +++ b/.ipynb_checkpoints/modules-checkpoint.html @@ -0,0 +1,111 @@ + + + + + + + API — Kolmogorov Arnold Network documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

API

+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/_sources/.ipynb_checkpoints/intro-checkpoint.rst.txt b/_sources/.ipynb_checkpoints/intro-checkpoint.rst.txt new file mode 100644 index 00000000..cafbe96f --- /dev/null +++ b/_sources/.ipynb_checkpoints/intro-checkpoint.rst.txt @@ -0,0 +1,224 @@ +.. _hello-kan: + +Hello, KAN! +=========== + +Kolmogorov-Arnold representation theorem +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Kolmogorov-Arnold representation theorem states that if :math:`f` is a +multivariate continuous function on a bounded domain, then it can be +written as a finite composition of continuous functions of a single +variable and the binary operation of addition. More specifically, for a +smooth :math:`f : [0,1]^n \to \mathbb{R}`, + +.. math:: f(x) = f(x_1,...,x_n)=\sum_{q=1}^{2n+1}\Phi_q(\sum_{p=1}^n \phi_{q,p}(x_p)) + +where :math:`\phi_{q,p}:[0,1]\to\mathbb{R}` and +:math:`\Phi_q:\mathbb{R}\to\mathbb{R}`. In a sense, they showed that the +only true multivariate function is addition, since every other function +can be written using univariate functions and sum. However, this 2-Layer +width-:math:`(2n+1)` Kolmogorov-Arnold representation may not be smooth +due to its limited expressive power. We augment its expressive power by +generalizing it to arbitrary depths and widths. + +Kolmogorov-Arnold Network (KAN) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Kolmogorov-Arnold representation can be written in matrix form + +.. math:: f(x)={\bf \Phi}_{\rm out}\circ{\bf \Phi}_{\rm in}\circ {\bf x} + +where + +.. math:: {\bf \Phi}_{\rm in}= \begin{pmatrix} \phi_{1,1}(\cdot) & \cdots & \phi_{1,n}(\cdot) \\ \vdots & & \vdots \\ \phi_{2n+1,1}(\cdot) & \cdots & \phi_{2n+1,n}(\cdot) \end{pmatrix},\quad {\bf \Phi}_{\rm out}=\begin{pmatrix} \Phi_1(\cdot) & \cdots & \Phi_{2n+1}(\cdot)\end{pmatrix} + +We notice that both :math:`{\bf \Phi}_{\rm in}` and +:math:`{\bf \Phi}_{\rm out}` are special cases of the following function +matrix :math:`{\bf \Phi}` (with :math:`n_{\rm in}` inputs, and +:math:`n_{\rm out}` outputs), we call a Kolmogorov-Arnold layer: + +.. math:: {\bf \Phi}= \begin{pmatrix} \phi_{1,1}(\cdot) & \cdots & \phi_{1,n_{\rm in}}(\cdot) \\ \vdots & & \vdots \\ \phi_{n_{\rm out},1}(\cdot) & \cdots & \phi_{n_{\rm out},n_{\rm in}}(\cdot) \end{pmatrix} + +:math:`{\bf \Phi}_{\rm in}` corresponds to +:math:`n_{\rm in}=n, n_{\rm out}=2n+1`, and :math:`{\bf \Phi}_{\rm out}` +corresponds to :math:`n_{\rm in}=2n+1, n_{\rm out}=1`. + +After defining the layer, we can construct a Kolmogorov-Arnold network +simply by stacking layers! Let’s say we have :math:`L` layers, with the +:math:`l^{\rm th}` layer :math:`{\bf \Phi}_l` have shape +:math:`(n_{l+1}, n_{l})`. Then the whole network is + +.. math:: {\rm KAN}({\bf x})={\bf \Phi}_{L-1}\circ\cdots \circ{\bf \Phi}_1\circ{\bf \Phi}_0\circ {\bf x} + +In constrast, a Multi-Layer Perceptron is interleaved by linear layers +:math:`{\bf W}_l` and nonlinearities :math:`\sigma`: + +.. math:: {\rm MLP}({\bf x})={\bf W}_{L-1}\circ\sigma\circ\cdots\circ {\bf W}_1\circ\sigma\circ {\bf W}_0\circ {\bf x} + +A KAN can be easily visualized. (1) A KAN is simply stack of KAN layers. +(2) Each KAN layer can be visualized as a fully-connected layer, with a +1D function placed on each edge. Let’s see an example below. + +Get started with KANs +~~~~~~~~~~~~~~~~~~~~~ + +Initialize KAN + +.. code:: ipython3 + + from kan import * + # create a KAN: 2D inputs, 1D output, and 5 hidden neurons. cubic spline (k=3), 5 grid intervals (grid=5). + model = KAN(width=[2,5,1], grid=5, k=3, seed=0) + +Create dataset + +.. code:: ipython3 + + # create dataset f(x,y) = exp(sin(pi*x)+y^2) + f = lambda x: torch.exp(torch.sin(torch.pi*x[:,[0]]) + x[:,[1]]**2) + dataset = create_dataset(f, n_var=2) + dataset['train_input'].shape, dataset['train_label'].shape + + + + +.. parsed-literal:: + + (torch.Size([1000, 2]), torch.Size([1000, 1])) + + + +Plot KAN at initialization + +.. code:: ipython3 + + # plot KAN at initialization + model(dataset['train_input']); + model.plot(beta=100) + + + +.. image:: intro_files/intro_15_0.png + + +Train KAN with sparsity regularization + +.. code:: ipython3 + + # train the model + model.train(dataset, opt="LBFGS", steps=20, lamb=0.01, lamb_entropy=10.); + + +.. parsed-literal:: + + train loss: 1.57e-01 | test loss: 1.31e-01 | reg: 2.05e+01 : 100%|██| 20/20 [00:18<00:00, 1.06it/s] + + +Plot trained KAN + +.. code:: ipython3 + + model.plot() + + + +.. image:: intro_files/intro_19_0.png + + +Prune KAN and replot (keep the original shape) + +.. code:: ipython3 + + model.prune() + model.plot(mask=True) + + + +.. image:: intro_files/intro_21_0.png + + +Prune KAN and replot (get a smaller shape) + +.. code:: ipython3 + + model = model.prune() + model(dataset['train_input']) + model.plot() + + + +.. image:: intro_files/intro_23_0.png + + +Continue training and replot + +.. code:: ipython3 + + model.train(dataset, opt="LBFGS", steps=50); + + +.. parsed-literal:: + + train loss: 4.74e-03 | test loss: 4.80e-03 | reg: 2.98e+00 : 100%|██| 50/50 [00:07<00:00, 7.03it/s] + + +.. code:: ipython3 + + model.plot() + + + +.. image:: intro_files/intro_26_0.png + + +Automatically or manually set activation functions to be symbolic + +.. code:: ipython3 + + mode = "auto" # "manual" + + if mode == "manual": + # manual mode + model.fix_symbolic(0,0,0,'sin'); + model.fix_symbolic(0,1,0,'x^2'); + model.fix_symbolic(1,0,0,'exp'); + elif mode == "auto": + # automatic mode + lib = ['x','x^2','x^3','x^4','exp','log','sqrt','tanh','sin','abs'] + model.auto_symbolic(lib=lib) + + +.. parsed-literal:: + + fixing (0,0,0) with sin, r2=0.999987252534279 + fixing (0,1,0) with x^2, r2=0.9999996536741071 + fixing (1,0,0) with exp, r2=0.9999988529417926 + + +Continue training to almost machine precision + +.. code:: ipython3 + + model.train(dataset, opt="LBFGS", steps=50); + + +.. parsed-literal:: + + train loss: 2.02e-10 | test loss: 1.13e-10 | reg: 2.98e+00 : 100%|██| 50/50 [00:02<00:00, 22.59it/s] + + +Obtain the symbolic formula + +.. code:: ipython3 + + model.symbolic_formula()[0][0] + + + + +.. math:: + + \displaystyle 1.0 e^{1.0 x_{2}^{2} + 1.0 \sin{\left(3.14 x_{1} \right)}} + + diff --git a/_sources/.ipynb_checkpoints/kan-checkpoint.rst.txt b/_sources/.ipynb_checkpoints/kan-checkpoint.rst.txt new file mode 100644 index 00000000..cfa263b5 --- /dev/null +++ b/_sources/.ipynb_checkpoints/kan-checkpoint.rst.txt @@ -0,0 +1,61 @@ +kan package +=========== + +Submodules +---------- + +kan.KAN module +-------------- + +.. automodule:: kan.MultKAN + :members: + :undoc-members: + :show-inheritance: + +kan.KANLayer module +------------------- + +.. automodule:: kan.KANLayer + :members: + :undoc-members: + :show-inheritance: + +kan.LBFGS module +---------------- + +.. automodule:: kan.LBFGS + :members: + :undoc-members: + :show-inheritance: + +kan.Symbolic\_KANLayer module +----------------------------- + +.. automodule:: kan.Symbolic_KANLayer + :members: + :undoc-members: + :show-inheritance: + +kan.spline module +----------------- + +.. automodule:: kan.spline + :members: + :undoc-members: + :show-inheritance: + +kan.utils module +---------------- + +.. automodule:: kan.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: kan + :members: + :undoc-members: + :show-inheritance: diff --git a/_sources/.ipynb_checkpoints/modules-checkpoint.rst.txt b/_sources/.ipynb_checkpoints/modules-checkpoint.rst.txt new file mode 100644 index 00000000..7c3ced85 --- /dev/null +++ b/_sources/.ipynb_checkpoints/modules-checkpoint.rst.txt @@ -0,0 +1,9 @@ +.. _api: + +API +=== + +.. toctree:: + :maxdepth: 4 + + kan diff --git a/_sources/kan.rst.txt b/_sources/kan.rst.txt index ae0c61ce..cfa263b5 100644 --- a/_sources/kan.rst.txt +++ b/_sources/kan.rst.txt @@ -7,7 +7,7 @@ Submodules kan.KAN module -------------- -.. automodule:: kan.KAN +.. automodule:: kan.MultKAN :members: :undoc-members: :show-inheritance: diff --git a/genindex.html b/genindex.html index f73bdd12..3cf8e423 100644 --- a/genindex.html +++ b/genindex.html @@ -76,17 +76,58 @@

Index

- B + _ + | A + | B | C | E + | F + | G + | I | K + | L | M + | S + | T + | U
+

_

+ + +
+ +

A

+ + + +
+

B

+
@@ -94,11 +135,15 @@

B

C

@@ -106,7 +151,81 @@

C

E

+ +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

I

+ +
@@ -115,25 +234,115 @@

K

+ +
+ +

L

+ +

M

+
+ +

S

+ + + +
+ +

T

+ + +
+ +

U

+ +
diff --git a/index.html b/index.html index 205e5148..fa8b8fdb 100644 --- a/index.html +++ b/index.html @@ -107,9 +107,9 @@

Requirements

Get started

Contents:

diff --git a/kan.html b/kan.html index cde95760..9c17c450 100644 --- a/kan.html +++ b/kan.html @@ -18,6 +18,7 @@ + @@ -51,9 +52,18 @@
  • kan package
  • @@ -104,14 +141,566 @@

    Submodules

    kan.KAN module

    -
    -

    kan.KANLayer module

    +
    +

    kan.KANLayer module

    +
    +
    +class kan.KANLayer.KANLayer(*args: Any, **kwargs: Any)
    +

    Bases: Module

    +

    KANLayer class

    +
    +

    Attributes:

    +
    +
    +
    in_dim: int

    input dimension

    +
    +
    out_dim: int

    output dimension

    +
    +
    size: int

    the number of splines = input dimension * output dimension

    +
    +
    k: int

    the piecewise polynomial order of splines

    +
    +
    grid: 2D torch.float

    grid points

    +
    +
    noises: 2D torch.float

    injected noises to splines at initialization (to break degeneracy)

    +
    +
    coef: 2D torch.tensor

    coefficients of B-spline bases

    +
    +
    scale_base: 1D torch.float

    magnitude of the residual function b(x)

    +
    +
    scale_sp: 1D torch.float

    mangitude of the spline function spline(x)

    +
    +
    base_fun: fun

    residual function b(x)

    +
    +
    mask: 1D torch.float

    mask of spline functions. setting some element of the mask to zero means setting the corresponding activation to zero function.

    +
    +
    grid_eps: float in [0,1]

    a hyperparameter used in update_grid_from_samples. When grid_eps = 0, the grid is uniform; when grid_eps = 1, the grid is partitioned using percentiles of samples. 0 < grid_eps < 1 interpolates between the two extremes.

    +
    +
    weight_sharing: 1D tensor int

    allow spline activations to share parameters

    +
    +
    lock_counter: int

    counter how many activation functions are locked (weight sharing)

    +
    +
    lock_id: 1D torch.int

    the id of activation functions that are locked

    +
    +
    device: str

    device

    +
    +
    +
    -
    -

    kan.LBFGS module

    +
    +

    Methods:

    +
    +
    +
    __init__():

    initialize a KANLayer

    +
    +
    forward():

    forward

    +
    +
    update_grid_from_samples():

    update grids based on samples’ incoming activations

    +
    +
    initialize_grid_from_parent():

    initialize grids from another model

    +
    +
    get_subset():

    get subset of the KANLayer (used for pruning)

    +
    +
    lock():

    lock several activation functions to share parameters

    +
    +
    unlock():

    unlock already locked activation functions

    +
    +
    +
    +
    +
    +__init__(in_dim=3, out_dim=2, num=5, k=3, noise_scale=0.5, scale_base_mu=0.0, scale_base_sigma=1.0, scale_sp=1.0, base_fun=torch.nn.SiLU, grid_eps=0.02, grid_range=[-1, 1], sp_trainable=True, sb_trainable=True, save_plot_data=True, device='cpu', sparse_init=False)
    +

    ‘ +initialize a KANLayer

    +
    +

    Args:

    +
    +
    +
    in_dimint

    input dimension. Default: 2.

    +
    +
    out_dimint

    output dimension. Default: 3.

    +
    +
    numint

    the number of grid intervals = G. Default: 5.

    +
    +
    kint

    the order of piecewise polynomial. Default: 3.

    +
    +
    noise_scalefloat

    the scale of noise injected at initialization. Default: 0.1.

    +
    +
    scale_basefloat

    the scale of the residual function b(x). Default: 1.0.

    +
    +
    scale_spfloat

    the scale of the base function spline(x). Default: 1.0.

    +
    +
    base_funfunction

    residual function b(x). Default: torch.nn.SiLU()

    +
    +
    grid_epsfloat

    When grid_eps = 0, the grid is uniform; when grid_eps = 1, the grid is partitioned using percentiles of samples. 0 < grid_eps < 1 interpolates between the two extremes. Default: 0.02.

    +
    +
    grid_rangelist/np.array of shape (2,)

    setting the range of grids. Default: [-1,1].

    +
    +
    sp_trainablebool

    If true, scale_sp is trainable. Default: True.

    +
    +
    sb_trainablebool

    If true, scale_base is trainable. Default: True.

    +
    +
    devicestr

    device

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    self

    +
    +
    +
    +

    Example

    +
    >>> model = KANLayer(in_dim=3, out_dim=5)
    +>>> (model.in_dim, model.out_dim)
    +(3, 5)
    +
    +
    -
    -

    kan.Symbolic_KANLayer module

    +
    + +
    +
    +forward(x)
    +

    KANLayer forward given input x

    +
    +

    Args:

    +
    +
    +
    x2D torch.float

    inputs, shape (number of samples, input dimension)

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +
    +
    y2D torch.float

    outputs, shape (number of samples, output dimension)

    +
    +
    preacts3D torch.float

    fan out x into activations, shape (number of sampels, output dimension, input dimension)

    +
    +
    postacts3D torch.float

    the outputs of activation functions with preacts as inputs

    +
    +
    postspline3D torch.float

    the outputs of spline functions with preacts as inputs

    +
    +
    +
    +
    +
    +

    Example

    +
    >>> model = KANLayer(in_dim=3, out_dim=5)
    +>>> x = torch.normal(0,1,size=(100,3))
    +>>> y, preacts, postacts, postspline = model(x)
    +>>> y.shape, preacts.shape, postacts.shape, postspline.shape
    +(torch.Size([100, 5]),
    + torch.Size([100, 5, 3]),
    + torch.Size([100, 5, 3]),
    + torch.Size([100, 5, 3]))
    +
    +
    +
    +
    + +
    +
    +get_subset(in_id, out_id)
    +

    get a smaller KANLayer from a larger KANLayer (used for pruning)

    +
    +

    Args:

    +
    +
    +
    in_idlist

    id of selected input neurons

    +
    +
    out_idlist

    id of selected output neurons

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    spb : KANLayer

    +
    +
    +
    +

    Example

    +
    >>> kanlayer_large = KANLayer(in_dim=10, out_dim=10, num=5, k=3)
    +>>> kanlayer_small = kanlayer_large.get_subset([0,9],[1,2,3])
    +>>> kanlayer_small.in_dim, kanlayer_small.out_dim
    +(2, 3)
    +
    +
    +
    +
    + +
    +
    +initialize_grid_from_parent(parent, x, mode='sample')
    +

    update grid from a parent KANLayer & samples

    +
    +

    Args:

    +
    +
    +
    parentKANLayer

    a parent KANLayer (whose grid is usually coarser than the current model)

    +
    +
    x2D torch.float

    inputs, shape (number of samples, input dimension)

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    None

    +
    +
    +
    +

    Example

    +
    >>> batch = 100
    +>>> parent_model = KANLayer(in_dim=1, out_dim=1, num=5, k=3)
    +>>> print(parent_model.grid.data)
    +>>> model = KANLayer(in_dim=1, out_dim=1, num=10, k=3)
    +>>> x = torch.normal(0,1,size=(batch, 1))
    +>>> model.initialize_grid_from_parent(parent_model, x)
    +>>> print(model.grid.data)
    +tensor([[-1.0000, -0.6000, -0.2000,  0.2000,  0.6000,  1.0000]])
    +tensor([[-1.0000, -0.8000, -0.6000, -0.4000, -0.2000,  0.0000,  0.2000,  0.4000,
    +  0.6000,  0.8000,  1.0000]])
    +
    +
    +
    +
    + +
    +
    +swap(i1, i2, mode='in')
    +
    + +
    +
    +to(device)
    +
    + +
    +
    +update_grid_from_samples(x, mode='sample')
    +

    update grid from samples

    +
    +

    Args:

    +
    +
    +
    x2D torch.float

    inputs, shape (number of samples, input dimension)

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    None

    +
    +
    +
    +

    Example

    +
    >>> model = KANLayer(in_dim=1, out_dim=1, num=5, k=3)
    +>>> print(model.grid.data)
    +>>> x = torch.linspace(-3,3,steps=100)[:,None]
    +>>> model.update_grid_from_samples(x)
    +>>> print(model.grid.data)
    +tensor([[-1.0000, -0.6000, -0.2000,  0.2000,  0.6000,  1.0000]])
    +tensor([[-3.0002, -1.7882, -0.5763,  0.6357,  1.8476,  3.0002]])
    +
    +
    +
    +
    + +
    +
    + +
    +
    +

    kan.LBFGS module

    +
    +
    +class kan.LBFGS.LBFGS(*args: Any, **kwargs: Any)
    +

    Bases: Optimizer

    +

    Implements L-BFGS algorithm.

    +

    Heavily inspired by minFunc.

    +
    +

    Warning

    +

    This optimizer doesn’t support per-parameter options and parameter +groups (there can be only one).

    +
    +
    +

    Warning

    +

    Right now all parameters have to be on a single device. This will be +improved in the future.

    +
    +
    +

    Note

    +

    This is a very memory intensive optimizer (it requires additional +param_bytes * (history_size + 1) bytes). If it doesn’t fit in memory +try reducing the history size, or use a different algorithm.

    +
    +
    +
    Args:

    lr (float): learning rate (default: 1) +max_iter (int): maximal number of iterations per optimization step

    +
    +

    (default: 20)

    +
    +
    +
    max_eval (int): maximal number of function evaluations per optimization

    step (default: max_iter * 1.25).

    +
    +
    tolerance_grad (float): termination tolerance on first order optimality

    (default: 1e-7).

    +
    +
    tolerance_change (float): termination tolerance on function

    value/parameter changes (default: 1e-9).

    +
    +
    +

    history_size (int): update history size (default: 100). +line_search_fn (str): either ‘strong_wolfe’ or None (default: None).

    +
    +
    +
    +
    +__init__(params, lr=1, max_iter=20, max_eval=None, tolerance_grad=1e-07, tolerance_change=1e-09, tolerance_ys=1e-32, history_size=100, line_search_fn=None)
    +
    + +
    +
    +step(closure)
    +

    Perform a single optimization step.

    +
    +
    Args:
    +
    closure (Callable): A closure that reevaluates the model

    and returns the loss.

    +
    +
    +
    +
    +
    + +
    + +
    +
    +

    kan.Symbolic_KANLayer module

    +
    +
    +class kan.Symbolic_KANLayer.Symbolic_KANLayer(*args: Any, **kwargs: Any)
    +

    Bases: Module

    +

    KANLayer class

    +
    +

    Attributes:

    +
    +
    +
    in_dim: int

    input dimension

    +
    +
    out_dim: int

    output dimension

    +
    +
    funs: 2D array of torch functions (or lambda functions)

    symbolic functions (torch)

    +
    +
    funs_name: 2D arry of str

    names of symbolic functions

    +
    +
    funs_sympy: 2D array of sympy functions (or lambda functions)

    symbolic functions (sympy)

    +
    +
    affine: 3D array of floats

    affine transformations of inputs and outputs

    +
    +
    +
    +
    +
    +

    Methods:

    +
    +
    +
    __init__():

    initialize a Symbolic_KANLayer

    +
    +
    forward():

    forward

    +
    +
    get_subset():

    get subset of the KANLayer (used for pruning)

    +
    +
    fix_symbolic():

    fix an activation function to be symbolic

    +
    +
    +
    +
    +
    +__init__(in_dim=3, out_dim=2, device='cpu')
    +

    initialize a Symbolic_KANLayer (activation functions are initialized to be identity functions)

    +
    +

    Args:

    +
    +
    +
    in_dimint

    input dimension

    +
    +
    out_dimint

    output dimension

    +
    +
    devicestr

    device

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    self

    +
    +
    +
    +

    Example

    +
    >>> sb = Symbolic_KANLayer(in_dim=3, out_dim=3)
    +>>> len(sb.funs), len(sb.funs[0])
    +(3, 3)
    +
    +
    +
    +
    + +
    +
    +fix_symbolic(i, j, fun_name, x=None, y=None, random=False, a_range=(-10, 10), b_range=(-10, 10), verbose=True)
    +

    fix an activation function to be symbolic

    +
    +

    Args:

    +
    +
    +
    iint

    the id of input neuron

    +
    +
    jint

    the id of output neuron

    +
    +
    fun_namestr

    the name of the symbolic functions

    +
    +
    x1D array

    preactivations

    +
    +
    y1D array

    postactivations

    +
    +
    a_rangetuple

    sweeping range of a

    +
    +
    b_rangetuple

    sweeping range of a

    +
    +
    verbosebool

    print more information if True

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    r2 (coefficient of determination)

    +
    +
    +
    +

    Example 1

    +
    >>> # when x & y are not provided. Affine parameters are set to a = 1, b = 0, c = 1, d = 0
    +>>> sb = Symbolic_KANLayer(in_dim=3, out_dim=2)
    +>>> sb.fix_symbolic(2,1,'sin')
    +>>> print(sb.funs_name)
    +>>> print(sb.affine)
    +[['', '', ''], ['', '', 'sin']]
    +Parameter containing:
    +tensor([[0., 0., 0., 0.],
    +         [0., 0., 0., 0.],
    +         [1., 0., 1., 0.]], requires_grad=True)
    +Example 2
    +---------
    +>>> # when x & y are provided, fit_params() is called to find the best fit coefficients
    +>>> sb = Symbolic_KANLayer(in_dim=3, out_dim=2)
    +>>> batch = 100
    +>>> x = torch.linspace(-1,1,steps=batch)
    +>>> noises = torch.normal(0,1,(batch,)) * 0.02
    +>>> y = 5.0*torch.sin(3.0*x + 2.0) + 0.7 + noises
    +>>> sb.fix_symbolic(2,1,'sin',x,y)
    +>>> print(sb.funs_name)
    +>>> print(sb.affine[1,2,:].data)
    +r2 is 0.9999701976776123
    +[['', '', ''], ['', '', 'sin']]
    +tensor([2.9981, 1.9997, 5.0039, 0.6978])
    +
    +
    +
    +
    + +
    +
    +forward(x, singularity_avoiding=False, y_th=10.0)
    +
    +

    Args:

    +
    +
    +
    x2D array

    inputs, shape (batch, input dimension)

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +
    +
    y2D array

    outputs, shape (batch, output dimension)

    +
    +
    postacts3D array

    activations after activation functions but before summing on nodes

    +
    +
    +
    +
    +
    +

    Example

    +
    >>> sb = Symbolic_KANLayer(in_dim=3, out_dim=5)
    +>>> x = torch.normal(0,1,size=(100,3))
    +>>> y, postacts = sb(x)
    +>>> y.shape, postacts.shape
    +(torch.Size([100, 5]), torch.Size([100, 5, 3]))
    +
    +
    +
    +
    + +
    +
    +get_subset(in_id, out_id)
    +

    get a smaller Symbolic_KANLayer from a larger Symbolic_KANLayer (used for pruning)

    +
    +

    Args:

    +
    +
    +
    in_idlist

    id of selected input neurons

    +
    +
    out_idlist

    id of selected output neurons

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    spb : Symbolic_KANLayer

    +
    +
    +
    +

    Example

    +
    >>> sb_large = Symbolic_KANLayer(in_dim=10, out_dim=10)
    +>>> sb_small = sb_large.get_subset([0,9],[1,2,3])
    +>>> sb_small.in_dim, sb_small.out_dim
    +(2, 3)
    +
    +
    +
    +
    + +
    +
    +swap(i1, i2, mode='in')
    +
    + +
    +
    +to(device)
    +
    + +
    +
    +

    kan.spline module

    @@ -119,8 +708,8 @@

    kan.Symbolic_KANLayer module kan.spline.B_batch(x, grid, k=0, extend=True, device='cpu')

    evaludate x on B-spline bases

    -
    -

    Args:

    +
    +

    Args:

    x2D torch.tensor

    inputs, shape (number of splines, number of samples)

    @@ -136,8 +725,8 @@

    Args:

    -
    -

    Returns:

    +
    +

    Returns:

    spline values3D torch.tensor

    shape (number of splines, number of B-spline bases (coeffcients), number of samples). The numbef of B-spline bases = number of grid points + k - 1.

    @@ -145,8 +734,8 @@

    Returns:

    -
    -

    Example

    +
    +

    Example

    >>> num_spline = 5
     >>> num_sample = 100
     >>> num_grid_interval = 10
    @@ -164,8 +753,8 @@ 

    Example
    kan.spline.coef2curve(x_eval, grid, coef, k, device='cpu')

    converting B-spline coefficients to B-spline curves. Evaluate x on B-spline curves (summing up B_batch results over B-spline basis).

    -
    -

    Args:

    +
    +

    Args:

    x_eval2D torch.tensor)

    shape (number of splines, number of samples)

    @@ -181,8 +770,8 @@

    Args:<

    -
    -

    Returns:

    +
    +

    Returns:

    y_eval2D torch.tensor

    shape (number of splines, number of samples)

    @@ -190,8 +779,8 @@

    Returns:

    -
    -

    Example

    +
    +

    Example

    >>> num_spline = 5
     >>> num_sample = 100
     >>> num_grid_interval = 10
    @@ -210,8 +799,8 @@ 

    Example kan.spline.curve2coef(x_eval, y_eval, grid, k, lamb=1e-08)

    converting B-spline curves to B-spline coefficients using least squares.

    -
    -

    Args:

    +
    +

    Args:

    x_eval2D torch.tensor

    shape (number of splines, number of samples)

    @@ -227,8 +816,8 @@

    Args:<

    -
    -

    Example

    +
    +

    Example

    >>> num_spline = 5
     >>> num_sample = 100
     >>> num_grid_interval = 10
    @@ -248,8 +837,264 @@ 

    Example

    -
    -

    kan.utils module

    +
    +

    kan.utils module

    +
    +
    +kan.utils.add_symbolic(name, fun, c=1, fun_singularity=None)
    +

    add a symbolic function to library

    +
    +

    Args:

    +
    +
    +
    namestr

    name of the function

    +
    +
    funfun

    torch function or lambda function

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +

    None

    +
    +
    +
    +

    Example

    +
    >>> print(SYMBOLIC_LIB['Bessel'])
    +KeyError: 'Bessel'
    +>>> add_symbolic('Bessel', torch.special.bessel_j0)
    +>>> print(SYMBOLIC_LIB['Bessel'])
    +(<built-in function special_bessel_j0>, Bessel)
    +
    +
    +
    +
    + +
    +
    +kan.utils.augment_input(orig_vars, aux_vars, x)
    +
    + +
    +
    +kan.utils.batch_hessian(model, x, create_graph=False)
    +
    + +
    +
    +kan.utils.batch_jacobian(func, x, create_graph=False)
    +
    + +
    +
    +kan.utils.create_dataset(f, n_var=2, f_mode='col', ranges=[-1, 1], train_num=1000, test_num=1000, normalize_input=False, normalize_label=False, device='cpu', seed=0)
    +

    create dataset

    +
    +

    Args:

    +
    +
    +
    ffunction

    the symbolic formula used to create the synthetic dataset

    +
    +
    rangeslist or np.array; shape (2,) or (n_var, 2)

    the range of input variables. Default: [-1,1].

    +
    +
    train_numint

    the number of training samples. Default: 1000.

    +
    +
    test_numint

    the number of test samples. Default: 1000.

    +
    +
    normalize_inputbool

    If True, apply normalization to inputs. Default: False.

    +
    +
    normalize_labelbool

    If True, apply normalization to labels. Default: False.

    +
    +
    devicestr

    device. Default: ‘cpu’.

    +
    +
    seedint

    random seed. Default: 0.

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +
    +
    datasetdic
    +
    Train/test inputs/labels are dataset[‘train_input’], dataset[‘train_label’],

    dataset[‘test_input’], dataset[‘test_label’]

    +
    +
    +
    +
    +
    +
    +
    +

    Example

    +
    >>> f = lambda x: torch.exp(torch.sin(torch.pi*x[:,[0]]) + x[:,[1]]**2)
    +>>> dataset = create_dataset(f, n_var=2, train_num=100)
    +>>> dataset['train_input'].shape
    +torch.Size([100, 2])
    +
    +
    +
    +
    + +
    +
    +kan.utils.create_dataset_from_data(inputs, labels, train_ratio=0.8, device='cpu')
    +
    + +
    +
    +kan.utils.ex_round(ex1, n_digit)
    +
    + +
    +
    +kan.utils.f_arccos(x, y_th)
    +
    + +
    +
    +kan.utils.f_arcsin(x, y_th)
    +
    + +
    +
    +kan.utils.f_arctanh(x, y_th)
    +
    + +
    +
    +kan.utils.f_exp(x, y_th)
    +
    + +
    +
    +kan.utils.f_inv(x, y_th)
    +
    + +
    +
    +kan.utils.f_inv2(x, y_th)
    +
    + +
    +
    +kan.utils.f_inv3(x, y_th)
    +
    + +
    +
    +kan.utils.f_inv4(x, y_th)
    +
    + +
    +
    +kan.utils.f_inv5(x, y_th)
    +
    + +
    +
    +kan.utils.f_invsqrt(x, y_th)
    +
    + +
    +
    +kan.utils.f_log(x, y_th)
    +
    + +
    +
    +kan.utils.f_power1d5(x, y_th)
    +
    + +
    +
    +kan.utils.f_sqrt(x, y_th)
    +
    + +
    +
    +kan.utils.f_tan(x, y_th)
    +
    + +
    +
    +kan.utils.fit_params(x, y, fun, a_range=(-10, 10), b_range=(-10, 10), grid_number=101, iteration=3, verbose=True, device='cpu')
    +

    fit a, b, c, d such that

    +
    +\[|y-(cf(ax+b)+d)|^2\]
    +

    is minimized. Both x and y are 1D array. Sweep a and b, find the best fitted model.

    +
    +

    Args:

    +
    +
    +
    x1D array

    x values

    +
    +
    y1D array

    y values

    +
    +
    funfunction

    symbolic function

    +
    +
    a_rangetuple

    sweeping range of a

    +
    +
    b_rangetuple

    sweeping range of b

    +
    +
    grid_numint

    number of steps along a and b

    +
    +
    iterationint

    number of zooming in

    +
    +
    verbosebool

    print extra information if True

    +
    +
    devicestr

    device

    +
    +
    +
    +
    +
    +

    Returns:

    +
    +
    +
    a_bestfloat

    best fitted a

    +
    +
    b_bestfloat

    best fitted b

    +
    +
    c_bestfloat

    best fitted c

    +
    +
    d_bestfloat

    best fitted d

    +
    +
    r2_bestfloat

    best r2 (coefficient of determination)

    +
    +
    +
    +
    +
    +

    Example

    +
    >>> num = 100
    +>>> x = torch.linspace(-1,1,steps=num)
    +>>> noises = torch.normal(0,1,(num,)) * 0.02
    +>>> y = 5.0*torch.sin(3.0*x + 2.0) + 0.7 + noises
    +>>> fit_params(x, y, torch.sin)
    +r2 is 0.9999727010726929
    +(tensor([2.9982, 1.9996, 5.0053, 0.7011]), tensor(1.0000))
    +
    +
    +
    +
    + +
    +
    +kan.utils.get_derivative(model, inputs, labels, derivative='hessian', loss_mode='pred', reg_metric='w', lamb=0.0, lamb_l1=1.0, lamb_entropy=0.0)
    +
    + +
    +
    +kan.utils.model2param(model)
    +
    + +
    +
    +kan.utils.sparse_mask(in_dim, out_dim)
    +
    +

    Module contents

    diff --git a/modules.html b/modules.html index e5343a32..25ad635f 100644 --- a/modules.html +++ b/modules.html @@ -18,6 +18,7 @@ + @@ -86,9 +87,39 @@
  • kan package
  • diff --git a/objects.inv b/objects.inv index 757ab051..13c09d4f 100644 Binary files a/objects.inv and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html index 43e31c8a..af157d29 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -92,11 +92,31 @@

    Python Module Index

    kan + + +     + kan.KANLayer + + + +     + kan.LBFGS +     kan.spline + + +     + kan.Symbolic_KANLayer + + + +     + kan.utils + diff --git a/searchindex.js b/searchindex.js index 89515a1a..11eb8793 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"1D example: Adding noise to a bounded region sine": [[19, "d-example-adding-noise-to-a-bounded-region-sine"]], "API": [[30, null]], "API Demos": [[0, null], [25, null]], "Args:": [[29, "args"], [29, "id1"], [29, "id4"]], "Automatic pruning": [[9, "automatic-pruning"]], "Case 1: 1D function": [[13, "case-1-1d-function"]], "Case 2: 2D function": [[13, "case-2-2d-function"]], "Classification formulation": [[18, "classification-formulation"]], "Contents:": [[27, null]], "Demo 10: Device": [[2, null]], "Demo 1: Indexing": [[3, null]], "Demo 2: Plotting": [[4, null]], "Demo 3: Grid": [[5, null]], "Demo 4: Extracting activation functions": [[6, null]], "Demo 5: Initialization Hyperparamters": [[7, null]], "Demo 6: Training Hyperparamters": [[8, null]], "Demo 7: Pruning": [[9, null]], "Demo 8: Checkpoint": [[10, null]], "Demo 9: Videos": [[11, null]], "Example": [[29, "example"], [29, "id3"], [29, "id5"]], "Example 10: Use of lock for Relativity Addition": [[12, null]], "Example 11: Encouraging linearity": [[13, null]], "Example 12: Unsupervised learning": [[14, null]], "Example 13: Phase transition": [[15, null]], "Example 1: Function Fitting": [[16, null]], "Example 2: Deep Formulas": [[17, null]], "Example 3: Classification": [[18, null]], "Example 4: Symbolic Regression": [[19, null]], "Example 5: Special functions": [[20, null]], "Example 6: Solving Partial Differential Equation (PDE)": [[21, null]], "Example 7: Continual Learning": [[22, null]], "Example 8: KANs\u2019 Scaling Laws": [[23, null]], "Example 9: Singularity": [[24, null]], "Examples": [[26, null]], "Get started": [[27, "get-started"]], "Get started with KANs": [[28, "get-started-with-kans"]], "Hello, KAN!": [[28, null]], "Indexing of edges (activation functions)": [[3, "indexing-of-edges-activation-functions"]], "Indexing of layers": [[3, "indexing-of-layers"]], "Indexing of nodes (neurons)": [[3, "indexing-of-nodes-neurons"]], "Indices and tables": [[1, "indices-and-tables"], [27, "indices-and-tables"]], "Installation": [[27, "installation"]], "Installation via PyPI": [[27, "installation-via-pypi"]], "Installation via github": [[27, "installation-via-github"]], "Kolmogorov-Arnold Network (KAN)": [[28, "kolmogorov-arnold-network-kan"]], "Kolmogorov-Arnold representation theorem": [[28, "kolmogorov-arnold-representation-theorem"]], "Manual pruning": [[9, "manual-pruning"]], "Module contents": [[29, "module-contents"]], "Parameter 1: \\lambda, overall penalty strength.": [[8, "parameter-1-lambda-overall-penalty-strength"]], "Parameter 2: (relative) penalty strength of entropy \\lambda_{\\rm ent}.": [[8, "parameter-2-relative-penalty-strength-of-entropy-lambda-rm-ent"]], "Parameter 3: Grid size G.": [[8, "parameter-3-grid-size-g"]], "Parameter 4: seed.": [[8, "parameter-4-seed"]], "Part I: Automated vs manual symbolic regression (How can we know that we get the exact formula?)": [[19, "part-i-automated-vs-manual-symbolic-regression-how-can-we-know-that-we-get-the-exact-formula"]], "Part II: How hard (ill-defined) is symbolic regression, really?": [[19, "part-ii-how-hard-ill-defined-is-symbolic-regression-really"]], "Phase diagram of symbolic regression (how fratcal/chaotic is my phase diagram?)": [[19, "phase-diagram-of-symbolic-regression-how-fratcal-chaotic-is-my-phase-diagram"]], "Regression formulation": [[18, "regression-formulation"]], "Requirements": [[27, "requirements"]], "Returns:": [[29, "returns"], [29, "id2"]], "Submodules": [[29, "submodules"]], "Three-layer KAN": [[17, "three-layer-kan"]], "Train KAN": [[18, "train-kan"]], "Two-layer KAN": [[17, "two-layer-kan"]], "Welcome to Kolmogorov Aarnold Network (KAN) documentation!": [[1, null]], "Welcome to Kolmogorov Arnold Network (KAN) documentation!": [[27, null]], "kan package": [[29, null]], "kan.KAN module": [[29, "kan-kan-module"]], "kan.KANLayer module": [[29, "kan-kanlayer-module"]], "kan.LBFGS module": [[29, "kan-lbfgs-module"]], "kan.Symbolic_KANLayer module": [[29, "kan-symbolic-kanlayer-module"]], "kan.spline module": [[29, "module-kan.spline"]], "kan.utils module": [[29, "kan-utils-module"]], "mix three functions f_1(x)={\\rm sin}(x), f_2(x)=x^2, and f_3(x)={\\rm exp}(x) such that f(x)=af_1(x)+bf_2(x)+(1-a-b)f_3(x). Symbolically regress f(x).": [[19, "mix-three-functions-f-1-x-rm-sin-x-f-2-x-x-2-and-f-3-x-rm-exp-x-such-that-f-x-af-1-x-bf-2-x-1-a-b-f-3-x-symbolically-regress-f-x"]]}, "docnames": [".ipynb_checkpoints/demos-checkpoint", ".ipynb_checkpoints/index-checkpoint", "API_demo/API_10_device", "API_demo/API_1_indexing", "API_demo/API_2_plotting", "API_demo/API_3_grid", "API_demo/API_4_extract_activations", "API_demo/API_5_initialization_hyperparameter", "API_demo/API_6_training_hyperparameter", "API_demo/API_7_pruning", "API_demo/API_8_checkpoint", "API_demo/API_9_video", "Examples/Example_10_relativity-addition", "Examples/Example_11_encouraing_linear", "Examples/Example_12_unsupervised_learning", "Examples/Example_13_phase_transition", "Examples/Example_1_function_fitting", "Examples/Example_2_deep_formula", "Examples/Example_3_classfication", "Examples/Example_4_symbolic_regression", "Examples/Example_5_special_functions", "Examples/Example_6_PDE", "Examples/Example_7_continual_learning", "Examples/Example_8_scaling", "Examples/Example_9_singularity", "demos", "examples", "index", "intro", "kan", "modules"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": [".ipynb_checkpoints/demos-checkpoint.rst", ".ipynb_checkpoints/index-checkpoint.rst", "API_demo/API_10_device.rst", "API_demo/API_1_indexing.rst", "API_demo/API_2_plotting.rst", "API_demo/API_3_grid.rst", "API_demo/API_4_extract_activations.rst", "API_demo/API_5_initialization_hyperparameter.rst", "API_demo/API_6_training_hyperparameter.rst", "API_demo/API_7_pruning.rst", "API_demo/API_8_checkpoint.rst", "API_demo/API_9_video.rst", "Examples/Example_10_relativity-addition.rst", "Examples/Example_11_encouraing_linear.rst", "Examples/Example_12_unsupervised_learning.rst", "Examples/Example_13_phase_transition.rst", "Examples/Example_1_function_fitting.rst", "Examples/Example_2_deep_formula.rst", "Examples/Example_3_classfication.rst", "Examples/Example_4_symbolic_regression.rst", "Examples/Example_5_special_functions.rst", "Examples/Example_6_PDE.rst", "Examples/Example_7_continual_learning.rst", "Examples/Example_8_scaling.rst", "Examples/Example_9_singularity.rst", "demos.rst", "examples.rst", "index.rst", "intro.rst", "kan.rst", "modules.rst"], "indexentries": {"b_batch() (in module kan.spline)": [[29, "kan.spline.B_batch", false]], "coef2curve() (in module kan.spline)": [[29, "kan.spline.coef2curve", false]], "curve2coef() (in module kan.spline)": [[29, "kan.spline.curve2coef", false]], "extend_grid() (in module kan.spline)": [[29, "kan.spline.extend_grid", false]], "kan.spline": [[29, "module-kan.spline", false]], "module": [[29, "module-kan.spline", false]]}, "objects": {"kan": [[29, 0, 0, "-", "spline"]], "kan.spline": [[29, 1, 1, "", "B_batch"], [29, 1, 1, "", "coef2curve"], [29, 1, 1, "", "curve2coef"], [29, 1, 1, "", "extend_grid"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:function"}, "terms": {"": [2, 3, 4, 5, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 28], "0": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29], "00": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28], "0000": [5, 12, 19, 20], "00014685209697567987": 17, "00015569770964015761": 17, "001": [14, 15, 17], "001766220055347071": 17, "0017847731212278354": 17, "0018364543204432066": 17, "002": 14, "0020": 5, "00294601553725477": 17, "0037939843087960545": 17, "004566344580739028": 17, "004774762578012783": 17, "00485182714170569": 17, "0060": 5, "007622899974849284": 17, "00e": [8, 12, 16, 17, 19, 23, 24], "00it": 19, "01": [4, 5, 8, 9, 10, 11, 13, 14, 17, 18, 19, 20, 22, 23, 24, 28], "0100": 5, "01183480890790476": 17, "0175788804953916": 17, "01e": [8, 13, 16, 17, 19, 23], "01it": [16, 19, 23], "02": [8, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 28], "020098020933420547": 17, "027514415570597788": 17, "029668332328004216": 17, "02e": [8, 9, 13, 19, 28], "02it": 19, "03": [2, 8, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 28], "03e": [8, 10, 19], "03it": 28, "04": [12, 13, 16, 17, 20, 23], "0454170453671914e": 17, "04e": [16, 17, 19], "04it": [19, 22], "05": [16, 17, 20, 23], "05e": [17, 19, 23, 28], "05it": [19, 22], "06": [8, 16, 17, 19, 22, 23], "06e": [19, 23], "06it": [19, 28], "07": [16, 17, 18, 19, 21, 23, 28], "074556425958742e": 17, "07e": [4, 17, 19, 21, 23], "07it": [17, 19], "08": [15, 18, 19, 20, 23, 29], "08315973336762218": 20, "08366297315238909": 20, "08e": [8, 19, 23, 24], "08it": 19, "09": 19, "09e": [8, 13, 19, 20], "09it": 19, "0x7f9211d28310": 18, "0x7f92658ae130": 18, "0x7fa93e7676a0": 6, "0x7fd438377a90": 19, "0x7fd49dd97160": 19, "0x7ff40b9ea430": 22, "1": [2, 4, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 20, 21, 22, 23, 24, 25, 26, 28, 29], "10": [4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 28, 29], "100": [2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29], "1000": [4, 5, 8, 18, 19, 23, 28], "10000": 17, "100000": 4, "1001": 5, "101": 19, "1020": 5, "10407480103502795": 20, "10e": [18, 19], "10it": [19, 23], "11": [8, 9, 12, 19, 23, 24, 26], "11e": 19, "11it": 19, "12": [4, 8, 10, 12, 16, 26], "120": 18, "1218": 5, "12418544555819415": 20, "12435207425739554": 20, "1261090479694874e": 17, "12e": [8, 19, 20, 23], "12it": 19, "13": [8, 18, 19, 26, 29], "1382": 5, "13e": [12, 17, 19, 28], "13it": [19, 24], "14": [14, 19, 23, 28], "14013671875": 19, "14159": 21, "14e": [8, 19, 23], "14it": 19, "15": [19, 22, 23, 24], "15e": [14, 16, 17, 19, 23], "15it": 19, "16": [8, 17, 21, 23, 24], "16e": [8, 10, 19], "16it": 19, "17": [19, 23], "172": 18, "17e": [16, 19, 20], "17it": 19, "18": [21, 28], "1822506022370818": 20, "18e": [8, 16, 17, 19, 24], "18it": 19, "19": [10, 18, 19], "1954": 6, "19e": [13, 16, 19, 23], "19it": [17, 19], "1d": [4, 5, 6, 9, 10, 11, 17, 20, 22, 24, 28], "1e": [2, 9, 11, 13, 19, 21, 24, 29], "1e5": 23, "1e8": 23, "2": [2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 23, 24, 25, 26, 28], "20": [2, 4, 6, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 23, 24, 28], "200": 22, "2000": 5, "2024": 8, "20e": [17, 19, 23], "20it": 19, "20x": 20, "21": [12, 17, 18, 21], "21051195154680438": 20, "21051195158162733": 20, "21e": [19, 23], "21it": [19, 24], "22": 28, "2272": 5, "22e": [13, 19, 23], "22it": 19, "23": 19, "23e": 19, "23it": [8, 19, 23], "24": [17, 19], "24e": [8, 13, 19], "24it": [16, 19], "25": [14, 21], "25e": [8, 19], "25it": [19, 20], "26": [2, 23], "2667": 5, "2681378679614782": 20, "2695851370154267": 19, "26e": [17, 19, 22], "26it": 19, "27": [17, 19], "27e": [19, 23], "27it": 19, "28": 19, "2814546223704926": 19, "28e": [12, 19], "28it": [13, 16, 19], "29": [13, 18, 19], "2948244018433414": 19, "29e": [13, 14, 16, 19], "29it": 19, "2d": [4, 6, 9, 10, 11, 17, 19, 20, 21, 24, 28, 29], "2e": 21, "2n": 28, "3": [2, 3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29], "30": [16, 17, 19, 20, 23], "300": [17, 22, 23], "3000": [2, 11, 17, 23], "3027": 18, "3060": 5, "30997176980589874": 19, "30e": [9, 10, 19, 23], "30it": 19, "31": 19, "3113": 18, "31e": [4, 19, 28], "31it": [19, 23], "32": [17, 21], "3272398323990947": 19, "32e": [2, 16, 17, 19, 23], "32it": 19, "33": [13, 19], "3393": 5, "33e": [8, 19], "33it": [12, 19], "34": [17, 19, 23], "34705555016523576": 19, "3493": 5, "34e": [19, 23], "35": 19, "35e": [13, 19, 23], "35it": [19, 23], "36": [11, 18, 19], "3699525677002401": 19, "36e": [17, 19], "36it": 19, "37": [18, 19], "37e": [8, 12, 13, 19, 21], "37it": [14, 19, 23], "38": [17, 19, 23, 24], "38e": [19, 20, 21], "38it": [19, 20], "39": [18, 19], "3965991904252684": 19, "39e": [8, 12, 19], "39it": 19, "3d": 29, "4": [2, 9, 11, 13, 14, 16, 17, 18, 20, 21, 23, 25, 26, 28], "40": [16, 19, 20], "40e": [8, 13, 19, 20], "40it": 19, "41": [17, 19], "41e": [8, 17, 19, 23], "41it": [12, 19], "42": [8, 14, 17, 18, 19], "42783037973898724": 19, "42e": [19, 24], "42it": 19, "43": 19, "43e": [8, 19], "43it": 19, "44": 19, "44e": [19, 23], "44it": [8, 19, 23], "45": 19, "45e": [14, 19, 23, 24], "45it": [16, 19, 23], "46": [17, 19], "4646785423849215": 19, "46e": [19, 24], "46it": 19, "47": [13, 19], "4796": 5, "47e": [8, 17, 19], "47it": [19, 22], "48": [17, 19], "4870": 15, "4896": 5, "48e": [8, 19], "48it": [19, 23], "49": [19, 23], "49679878395526067": 20, "49e": 19, "49it": 19, "5": [2, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 19, 21, 22, 23, 24, 25, 26, 28, 29], "50": [2, 11, 14, 15, 16, 17, 19, 20, 21, 23, 28], "500": 14, "508387788052642": 19, "50e": [8, 14, 16, 19], "50it": [8, 19], "51": [18, 19, 23], "5100": 5, "51e": [16, 19, 20], "51it": [8, 19], "52": 19, "52e": [8, 19], "52it": 19, "53": 19, "5376": 6, "53e": 19, "53it": 19, "54": 6, "54e": [8, 9, 12, 16, 19], "54it": [19, 23], "55": [17, 19], "55e": [10, 19], "55it": 19, "56": [18, 19], "56e": [4, 10, 17, 18, 19], "57": 18, "5708": 21, "5737221152646913": 20, "57e": [17, 19, 28], "57it": [8, 19], "58e": [8, 18, 19], "58it": [8, 19], "59": 22, "59e": [10, 16, 19], "59it": [8, 19, 28], "5e": [2, 11], "6": [5, 6, 12, 13, 14, 16, 17, 18, 19, 22, 23, 24, 25, 26], "6000": 5, "60e": [8, 19], "60it": 19, "6101756259771707": 20, "6137": 5, "61e": [19, 23], "61it": [10, 19], "62": 24, "62e": [16, 17, 19], "62it": 19, "63": 17, "63e": 19, "63it": [16, 19], "64e": 19, "64it": [4, 19], "65e": [8, 19, 23], "65it": [8, 10, 19], "66e": [8, 19], "66it": 19, "67e": [8, 15, 19, 20], "67it": [8, 19, 23], "68e": [8, 14, 19, 20], "68it": [9, 12, 19], "69": 17, "69e": [8, 12, 19, 23], "69it": [19, 22], "7": [2, 8, 11, 13, 14, 15, 16, 17, 19, 21, 23, 25, 26, 28], "70": [13, 22], "7090268761989152": 20, "70e": [8, 19], "70it": [9, 12, 19, 24], "71e": [18, 19, 23], "71it": 19, "72e": [19, 23, 24], "72it": [19, 23], "73": 17, "73e": [12, 16, 17, 19], "73it": [19, 23], "74": [17, 22], "7494106253678943": 20, "74e": [17, 19, 28], "74it": 19, "7541": 5, "75e": [17, 19, 24], "75it": 19, "76": 22, "76e": [12, 15, 17, 19, 20, 23], "76it": [8, 19], "77e": [8, 13, 17, 19, 23], "77it": 19, "7801497677237067": 18, "78e": [2, 8, 13, 17, 19, 23, 24], "78it": [13, 19, 24], "79": 18, "7906888762229085": 19, "79e": [17, 19, 23], "79it": [15, 19], "8": [8, 13, 16, 19, 20, 24, 25, 26], "80011712829603": 19, "807": 18, "8094804211038418": 19, "8099064637358544": 19, "80e": [19, 20, 23, 28], "80it": 19, "81": 22, "81e": [17, 19, 23], "81it": 19, "8200102819209695": 19, "82e": 19, "82it": 19, "8303506225546471": 19, "8303828486153692": 18, "83e": 19, "83it": [19, 23], "8408048845759444": 19, "8428622193038047": 19, "8440367634049246": 19, "845004037750832": 19, "8450040982073312": 19, "8475": 6, "8493986649063162": 19, "84e": [17, 19], "84it": [18, 19], "85": [6, 24], "851363652171008": 19, "8529": 5, "8535224650797281": 19, "85398": 21, "854821484894479": 19, "8585390273680941": 19, "8594117556407576": 19, "85e": [8, 17, 19], "85it": [2, 19, 23], "8601324746874981": 19, "8601325311561702": 19, "8616859029524302": 19, "862391351818434": 19, "8631397517896181": 19, "8635381099424172": 19, "8635381682633535": 19, "86e": [16, 19, 23], "86it": [8, 19], "8738196605080718": 19, "8765425797595888": 19, "8769912910873774": 19, "87e": [19, 20], "87it": [16, 19], "8842948895377678": 19, "8848700744056857": 19, "8855949580343588": 19, "8865324039130013": 19, "8881789600114199": 19, "88e": [16, 19, 20, 23], "88it": 19, "89": 18, "8940": 5, "8974993831807665": 19, "89e": [2, 8, 11, 16, 19, 21, 23], "89it": [8, 19], "9": [10, 12, 14, 15, 17, 18, 19, 25, 26], "9002751610118467": 19, "9009688699792165": 19, "902215514501183": 19, "9043637756591075": 19, "9047220443136558": 19, "9075530370365199": 19, "908": 18, "9090404451604721": 19, "90e": [8, 19, 23], "90it": 19, "9112716246650874": 19, "916197691863038": 19, "9167827938895323": 19, "9172564495092251": 19, "9179859981970137": 19, "9184406012010798": 19, "9184406080128915": 19, "9195925986987522": 19, "9197221129892613": 19, "91e": [19, 23], "91it": 19, "92": [11, 24], "9212244844946261": 19, "921655835107275": 19, "9232648879118915": 19, "9237291936352401": 19, "9239128488596182": 19, "9251125534459796": 19, "9254006963892939": 19, "9268644000446836": 19, "9285991153021671": 19, "9297638765888608": 19, "92e": [15, 18, 19, 21], "92it": 19, "9302392302167873": 19, "9308710215935037": 19, "9311623016073874": 19, "9320312251409515": 19, "932694450295423": 19, "9329023836770476": 19, "933975094122013": 19, "9348151361956722": 19, "9351858394996657": 19, "9360582190339871": 19, "9362895855226272": 19, "9365762760176262": 19, "9369096690204137": 19, "936942764457975": 19, "9372183456949574": 19, "9372397600766894": 19, "93740817498461": 19, "9376915470857489": 19, "9377138311216435": 19, "9377603078924529": 19, "9380270364085883": 19, "9380462665721708": 19, "9381962721720656": 19, "9394860427747876": 19, "9396624038444488": 19, "93e": [8, 14, 19, 23], "93it": 16, "94": 18, "9400830044171552": 19, "9402041148610969": 19, "9403353142717915": 19, "9405877648417602": 19, "9422869570493372": 19, "9422994090520702": 19, "9426800819283715": 19, "9430687242552336": 19, "9434289429080119": 19, "9438827362855521": 19, "9445008625317239": 19, "9445956284973298": 19, "9448625902159359": 19, "9450165956953308": 19, "9455257642420224": 19, "9456250628531494": 19, "9468472932133176": 19, "9480750122921905": 19, "9497237037538462": 19, "9497276520343576": 19, "9497419182649224": 19, "949892059404306": 19, "94e": [19, 23, 24], "94it": 22, "95": 6, "9512847855771679": 19, "952288197814531": 19, "9530802418693475": 19, "9533594412300308": 18, "9534651069741744": 19, "9535787267982471": 18, "9547067294869719": 19, "9550": 6, "9559414617900991": 19, "9559851348570871": 19, "957514493788183": 19, "9582876791641027": 19, "9588682058685749": 19, "95e": [17, 19], "95it": [8, 19], "9600011409875004": 19, "9601566417330277": 19, "9605168885411256": 19, "960527319751894": 19, "9611248513995477": 19, "9620464258065169": 19, "9624423927207054": 19, "9636801162210671": 19, "963856710506799": 19, "9648688511956083": 19, "9648932341203752": 19, "9653653219988936": 19, "965461717507565": 19, "9660": 18, "9671692490974791": 19, "9673225582521513": 19, "9677166767908957": 19, "967722640360993": 19, "967966050300312": 18, "9690407199009088": 19, "9698770230380636": 19, "9699721931104404": 19, "96e": [19, 23], "96it": [14, 19, 20], "97": 17, "9700": 18, "9705633369555351": 19, "9707186857583728": 19, "9715243025795919": 19, "9716178500832297": 19, "9717763100936939": 20, "9717770596320756": 19, "9723468700787765": 21, "972913947729953": 19, "9740201843349593": 19, "9746783379118565": 19, "9752846715582264": 19, "9754127817001195": 19, "9756945249179574": 19, "9761222166037805": 19, "9764364382302457": 19, "9765461190280487": 19, "9766929896410047": 19, "977112955292746": 19, "9771995020822951": 19, "9772100499611249": 19, "9772535252536733": 19, "9773944419005031": 19, "9779176281844336": 19, "9779770648401149": 19, "9780411748220801": 19, "9783739534751957": 19, "9785902377362155": 19, "9787975107817283": 19, "9789559646121901": 19, "9790424824765466": 19, "9793534545721814": 19, "9795181094994256": 19, "979881475095261": 19, "9798815731174731": 19, "9798855202432393": 19, "97e": [17, 19, 23], "97it": [18, 19], "9801151730516574": 18, "9802089053769921": 19, "9805383456413282": 19, "9807409640082864": 19, "9808861574166389": 19, "981424420858435": 19, "9815": 5, "9815839509974684": 19, "9816962474224649": 19, "9823615338330297": 19, "9828804558908593": 19, "9830517375289431": 12, "9830640000050016": 12, "9830898307444438": 19, "9832997013656896": 19, "9833009867719864": 19, "983348154979657": 19, "983836484418377": 19, "9843196558672351": 19, "9844055428126749": 21, "9844552121850878": 19, "9844737269360767": 19, "9847797381605126": 19, "9849023647718247": 19, "985121456003004": 19, "9853279073610555": 19, "985345236582632": 19, "9854353082947718": 19, "9855351478460005": 19, "98563942691924": 19, "9859360750741196": 19, "9863604874844045": 19, "9865738449440605": 19, "986582711416683": 19, "9867104677131169": 19, "9867522256462564": 19, "9868026386831295": 19, "986829120472927": 19, "9870320319171259": 19, "9870493767685123": 19, "9871135812467379": 19, "9873681256920457": 19, "9873751146532993": 19, "9874565358732027": 19, "9874566180838149": 19, "9875208727310729": 19, "9876449536124641": 19, "9876782817075724": 19, "987762675373181": 19, "9878365883665239": 19, "987913942212583": 19, "9880298934280559": 19, "9882338451079785": 19, "9883627975330689": 19, "9884748093165208": 19, "9885210310683376": 19, "9888254509108924": 19, "9889704797728257": 19, "9890801101893518": 19, "9893409020756886": 19, "9895624276437505": 19, "9896743802302694": 19, "9896966425177599": 19, "9897729427792255": 19, "98e": [19, 21, 23, 28], "98it": 19, "990205343640921": 19, "9907205081520056": 19, "9909835169112797": 19, "9910665391502297": 19, "9912197954445299": 19, "9913715887470934": 19, "9916259900602326": 19, "9916990159565282": 19, "9916999095855713": 19, "991738617202277": 19, "9918352264630244": 19, "9921522541074415": 19, "9922256134147542": 19, "9922364482738998": 19, "9922829131306503": 19, "992730560931046": 19, "9927325368990941": 19, "9928623326890238": 19, "9928952974445153": 4, "9929": 4, "9929134959392898": 19, "9932430068628105": 19, "9932659752647721": 19, "9934084524703305": 19, "9936057905336317": 19, "9936463187510403": 19, "9936582971043266": 19, "9937818028920754": 19, "9937913539713064": 19, "9938095927784649": 12, "9938672203947038": 19, "9939227717854873": 19, "9939812278070211": 19, "9939866829832639": 19, "9939912670589373": 19, "9941048878141949": 19, "9942754283755333": 19, "9942785952521871": 19, "9943901136276602": 19, "994405837621339": 19, "9944110485646586": 19, "9946613426702609": 19, "9947572943342223": 19, "9949107782356766": 19, "9949201894762312": 19, "9949371389273981": 19, "9949686832586251": 19, "9950291700743682": 19, "995078459413144": 19, "995255140131929": 19, "9952629708219127": 19, "9954045447762155": 19, "9954056127804757": 19, "995416161237695": 19, "9956440035977147": 19, "9957027344640318": 19, "995731717057559": 19, "9958206863529286": 19, "9958217326666846": 19, "9958802001000374": 19, "9958810456319825": 19, "9959025139156165": 19, "9959578952120252": 19, "9959631103992738": 19, "9959863127871974": 19, "9960274461980388": 19, "9961111289682559": 19, "9961768265523611": 19, "9962063866033833": 19, "9962099497478061": 19, "996256989539414": 12, "9962716348456105": 19, "9963078955424317": 19, "996308913203486": 19, "9963340407057836": 19, "9964682981271429": 19, "9964799073278351": 19, "9964947779569694": 19, "9966235714622826": 19, "9966420291540972": 19, "99664915970953": 19, "9968": 24, "9968394556850537": 24, "9968734504088798": 19, "9968744391727294": 19, "9968911992725868": 19, "9969431394468133": 19, "9969676978399866": 21, "9970616380122096": 19, "9970617106973462": 19, "9970989669443501": 19, "9971630293162339": 19, "9971996559803431": 19, "9972568796736283": 19, "997260680598509e": 17, "9973311148206122": 19, "9973507118333039": 3, "9973545677199919": 19, "9973752641583749": 19, "9974240586295893": 19, "9974491732032462": 21, "9974728070753829": 19, "9974772652014616": 19, "9975441981216764": 19, "9975488884124427": 19, "997561488327335": 19, "997562547933165": 19, "9975671382600958": 19, "9977962501289016": 19, "9977997203751177": 19, "9978271729275431": 19, "9978431561059808": 19, "9978692658702253": 19, "9978756985305871": 19, "9978791881996706": 21, "9978922471122651": 19, "9978931765377275": 19, "9979137733537407": 19, "9979264009346674": 19, "9979451890061467": 19, "9979460330489591": 19, "9979550584268881": 19, "9979566871598838": 19, "9979687146035487": 19, "9980799911419045": 19, "9980876045759569": 19, "9981093780355159": 19, "9981096381936067": 19, "9981115478889542": 19, "9981679237204564": 19, "9981948138629363": 19, "9982470612489773": 19, "9982635098451202": 19, "9982643783383393": 19, "998284128651733": 19, "998306797086686": 19, "9983499410484818": 19, "9983591814967973": 19, "9983639008937205": 21, "99837407546255": 19, "9984323316332249": 19, "9984339446779963": 19, "9984457355669536": 19, "9984509165908535": 19, "9984657428834645": 19, "998477650070286": 19, "998497783054037": 19, "998507365877467": 19, "9985227715662934": 19, "9985268503112813": 19, "998540782190707": 19, "9985534483580678": 19, "9985560043309399": 20, "998561267814873": 19, "9985646631915182": 19, "9985721495291437": 19, "9985870166410652": 19, "9986": 20, "9986097449347123": 19, "998618508248868": 19, "9986543793643053": 19, "998656639925584": 19, "998657149375774": 19, "9986571504172722": 19, "9986602848898886": 19, "9986633245000535": 19, "9987081345779585": 19, "9987167102775933": 19, "9987377926584199": 19, "9987539221752944": 19, "9987606438444635": 19, "9987635279928482": 19, "9987772391387374": 19, "9987944480619438": 19, "9988138920172807": 19, "998837883424404": 19, "998846633386868": 19, "9988544685797407": 19, "9988643627333774": 19, "998865199664262": 12, "9988653756689869": 19, "998871759377929": 19, "9988721445986375": 19, "9988728127858241": 19, "9988740875766842": 19, "9988859253126088": 19, "9988921913945791": 19, "9988973034727238": 19, "998905881229885": 19, "9989097397461996": 19, "9989290599804755": 19, "9989434205375304": 19, "9989441353410312": 19, "9989551972006018": 19, "9989573036832605": 19, "9989709402248369": 19, "9989811585960545": 19, "9989853642931659": 19, "9989945842715465": 19, "9990020609332764": 19, "9990030069449396": 19, "9990277391373628": 19, "9990436001283093": 19, "9990483455142343": 19, "9990671369324535": 19, "9990747506002051": 19, "9990779156635234": 19, "9990790086224685": 19, "9990823277390866": 19, "999088490162276": 19, "9991099365080184": 19, "9991201921166716": 19, "999120594481087": 19, "9991234483879446": 19, "9991252607520362": 19, "999137470112453": 19, "9991428566544741": 19, "999175206451367": 19, "9991760870939851": 19, "999179162081282": 19, "9991878132353741": 19, "9991909206588246": 19, "9991994724291818": 19, "9992094653374828": 19, "9992162433614376": 19, "9992177278915768": 19, "9992295248908697": 19, "9992301995166885": 19, "9992365904461334": 19, "9992376323441506": 19, "9992399109543574": 3, "9992413667649066": 19, "9992448590848789": 19, "9992662822226276": 19, "9992688918286982": 19, "9992737234348714": 19, "9992827278167005": 19, "9992837377086745": 19, "9992839638818944": 19, "9992854342507987": 19, "9992995819998103": 19, "9993158902101864": 19, "9993168732975628": 19, "9993467471612426": 19, "9993475620341137": 19, "9993505000566273": 19, "9993569516643317": 19, "9993615297170999": 19, "9993617636896577": 19, "9993731243691055": 19, "9993739474035951": 19, "9993792035049228": 19, "9993888581205067": 19, "9993950375881484": 19, "9994116683309964": 19, "9994371092496096": 19, "999448434641883": 19, "9994604176643853": 19, "9994637170628504": 19, "9994730789192812": 19, "999480532354729": 19, "9994826743156423": 19, "9994851357951505": 19, "9994862477413593": 19, "9994865919109623": 19, "9994936051757877": 19, "9994959364448105": 19, "9994994651669644": 19, "9995191008698547": 19, "9995430618744594": 19, "9995498634842791": 12, "9995568150249838": 19, "9995575032145757": 19, "9995602360489043": 3, "9995702405196035": 19, "9995754338853143": 19, "9995804083543193": 19, "9995835694860234": 19, "999585767134396": 19, "9995873145216307": 19, "9995937068570286": 19, "999597666676653": 19, "9996076211798797": 19, "9996077177342251": 19, "9996147714224425": 19, "9996162757398458": 19, "9996199310076759": 19, "9996263187286749": 19, "9996348080941417": 19, "999636745445751": 19, "9996382852712733": 19, "9996390145601096": 19, "9996456211560416": 19, "9996498645481074": 19, "9996537442008128": 19, "9996549423479186": 19, "9996559816500792": 19, "9996560303116143": 19, "9996561770567938": 19, "9996568552973389": 19, "9996579498087828": 19, "9996590283030754": 19, "9996615330714775": 19, "9996690041252987": 19, "9996700824962792": 19, "9996703332150525": 19, "999679958882009": 19, "9996830107874256": 19, "9996841983206314": 19, "9996922419099825": 19, "9996925240661405": 19, "9996973599778907": 19, "9997010374773055": 19, "9997042323555781": 19, "9997086093190996": 19, "9997096545485408": 19, "9997105669072212": 19, "9997113407524149": 19, "9997117036934391": 19, "9997131766871225": 19, "9997162974965994": 19, "9997168387512211": 19, "9997236129916397": 19, "9997259928372615": 19, "9997282247718177": 19, "9997292201760375": 19, "9997317587005629": 19, "9997376724009996": 19, "9997379079627818": 19, "9997446918456595": 19, "9997468080512466": 19, "9997514568009086": 19, "9997517092998544": 19, "9997517753887365": 19, "9997526274283742": 19, "9997532798065882": 19, "9997544064398111": 19, "9997548044475728": 19, "9997576089235269": 19, "9997595833681479": 19, "9997596795941941": 19, "9997599295163522": 19, "9997629877627796": 19, "9997651030691422": 19, "9997657565532695": 19, "9997659958370352": 19, "9997664875004227": 19, "9997669036986749": 19, "9997689201745247": 19, "9997728550720852": 19, "9997752175292851": 19, "9997784124877638": 19, "9997839395304963": 19, "9997851521886209": 19, "9997864168657743": 19, "999787323738521": 19, "9997878856454342": 19, "9997940227934969": 19, "9997949968711753": 19, "9997993496969405": 19, "9998030639266311": 19, "9998096068574465": 19, "9998097288010696": 19, "999812394838402": 19, "9998132139651115": 19, "9998135112170027": 19, "9998140271258696": 19, "9998163363479399": 19, "9998169466724585": 19, "9998195334563984": 19, "9998214259046335": 19, "9998219698585193": 19, "9998221482804251": 19, "9998233862273559": 19, "9998260034206992": 19, "9998279543178681": 19, "9998306455096987": 19, "999834148899939": 19, "9998352652530494": 19, "999836805899482": 19, "9998377031202675": 19, "9998436631999283": 19, "9998485210873531": 12, "999848705695026": 19, "999848886198266": 19, "9998507984084428": 19, "9998517198959569": 19, "9998527941960059": 19, "9998535744392626": 19, "9998540286212848": 19, "9998545572827711": 19, "9998593570241779": 19, "9998596147774699": 19, "9998600127039595": 19, "9998623405070776": 19, "9998636426802294": 19, "9998655818685623": 19, "9998682812651544": 19, "9998684985487326": 19, "9998698461072781": 19, "9998722722380837": 19, "9998727806292239": 19, "9998759476535651": 19, "9998776769631791": 19, "999878040103399": 19, "9998787853748133": 19, "9998795700743581": 19, "99988019998444": 19, "9998803010371731": 19, "9998822169169899": 19, "9998830954293118": 19, "9998836753524568": 19, "9998837024119729": 19, "9998837805081656": 19, "9998842247678139": 19, "9998843971854673": 19, "999886385951903": 19, "9998867957502443": 19, "9998877158288519": 19, "9998914314178492": 24, "999893422872044": 19, "9998957469235318": 19, "9998982872842133": 19, "9998987103013962": 19, "9999007440044174": 19, "9999033788427966": 19, "9999041816268858": 19, "9999043625986571": 19, "9999054264402666": 19, "9999055408903353": 19, "9999057877413986": 19, "9999059037181064": 19, "9999069779386928": 19, "9999091837427161": 19, "9999094157336442": 19, "999909483042181": 19, "9999096961395885": 20, "9999099009608192": 19, "9999121147442106": 19, "9999130489202535": 19, "9999132817985119": 19, "9999135788767782": 19, "999914407864863": 19, "9999145249443635": 19, "9999150645734015": 19, "9999154398628454": 19, "9999164116905525": 19, "9999174139339265": 20, "9999175944145272": 19, "9999177958840636": 19, "999917846530661": 19, "9999179925256542": 19, "9999185788926284": 19, "9999187437583558": 19, "9999191528924947": 19, "9999191931580688": 19, "9999195962429422": 19, "999920520242572": 19, "9999214589741492": 19, "9999215913152464": 19, "9999220769608526": 19, "9999226429006036": 19, "9999233338974699": 19, "9999233768388777": 19, "9999236487568766": 19, "999924500202756": 19, "9999245063324657": 19, "9999249439932951": 19, "9999250404431426": 19, "9999253640056137": 19, "9999260405306123": 19, "999926218584326": 19, "9999263142234696": 19, "999926363885015": 19, "9999277672142578": 19, "9999292279786546": 19, "9999299845850768": 19, "9999301819009739": 19, "9999305175966535": 19, "9999311426065755": 19, "9999314322918655": 19, "9999322662928528": 19, "9999324078991241": 19, "999933060918167": 19, "9999333905161271": 19, "9999334248881454": 19, "9999336923279952": 19, "9999340658950667": 19, "9999343640823076": 19, "999934739879401": 19, "9999347944113626": 19, "9999359202086953": 19, "9999359791634311": 19, "999936210582381": 19, "9999363993653761": 19, "9999367314200862": 19, "9999369992759012": 19, "9999370198218576": 19, "9999377574579958": 19, "9999378510072501": 19, "9999382587554829": 19, "9999383081018585": 19, "9999386215876175": 19, "9999388880060787": 19, "9999393123160958": 19, "9999403199854738": 19, "9999408710455521": 19, "9999411308602921": 3, "999941148365934": 19, "9999411945915794": 19, "9999412814570412": 19, "9999414756950388": 19, "9999416230314031": 19, "9999418178114038": 19, "9999421177337516": 19, "9999423526826876": 19, "9999424641676066": 19, "9999431335080622": 19, "9999431478128625": 19, "9999438604212395": 19, "9999447765899155": 19, "9999448387268524": 19, "9999450777771645": 19, "9999462038064604": 19, "9999473753358622": 19, "9999474340188654": 19, "9999479302673148": 19, "9999481583538449": 19, "999948450438625": 19, "9999484842856431": 19, "9999486876810368": 19, "9999492978808466": 19, "9999497922899572": 19, "9999506177136502": 3, "9999509121969333": 19, "999951727445816": 19, "9999517925552405": 19, "9999517925693375": 19, "9999518786252838": 19, "9999521118045746": 19, "9999521133602743": 19, "9999521920308199": 19, "9999522532756852": 19, "9999524925186463": 19, "9999524925435431": 19, "9999526296594224": 19, "9999527752253392": 19, "9999534848375812": 19, "9999536171672674": 19, "9999539297010896": 19, "9999541433147963": 19, "9999543237918428": 19, "9999544661515833": 19, "9999545031184953": 19, "9999551813924956": 19, "9999553343368358": 19, "9999556108208976": 19, "9999561449575607": 19, "9999562904170857": 19, "9999577735635269": 19, "9999585593099201": 19, "9999585866499787": 19, "9999591064202273": 19, "9999592519777621": 19, "9999593591292381": 19, "9999595824867687": 19, "9999606621811076": 19, "9999606621996252": 19, "9999608456659727": 19, "9999613659020306": 19, "9999623957580879": 19, "9999626403806093": 19, "9999631678786869": 19, "9999633902076488": 19, "9999637514193707": 19, "9999638602636551": 19, "9999642054598574": 19, "9999644813363999": 19, "9999646329733246": 19, "999964802453253": 19, "9999649555496989": 19, "999965455283627": 19, "9999658213074126": 19, "9999659993562859": 19, "9999662581221136": 19, "9999663092809886": 20, "9999670134850122": 19, "9999671472397126": 19, "9999672116732772": 19, "9999673825431549": 19, "999967486241568": 19, "9999678693890908": 19, "9999682142467496": 19, "9999683931970753": 19, "9999686012309674": 19, "9999689579268118": 19, "9999690179361935": 19, "9999693609882967": 20, "9999697464110736": 19, "9999699077016541": 20, "9999701323519831": 19, "9999712511423499": 19, "9999712618941392": 19, "9999713956244152": 19, "9999713985665561": 19, "9999716131493217": 19, "9999716645393338": 19, "9999719462457353": 19, "999972137087767": 19, "9999723043366056": 19, "9999726154715255": 19, "9999728460390712": 19, "9999730056399402": 19, "9999731551293094": 19, "999973163748351": 19, "9999738670223917": 19, "9999738708591638": 19, "9999745307384252": 19, "9999745650796973": 19, "9999745726295028": 19, "9999745891023756": 19, "9999746028947676": 19, "9999746546393077": 19, "9999749630672443": 19, "9999752362233539": 19, "999975403004672": 19, "9999756704785013": 19, "9999758615432004": 19, "9999760956345113": 19, "9999771001456361": 19, "9999772484086487": 19, "9999775858852623": 19, "99997811973606": 19, "9999781529177164": 19, "9999788713253935": 19, "9999789165976448": 19, "9999789216022107": 19, "9999791487269069": 19, "9999795491992056": 19, "9999796669306419": 19, "9999796806444573": 19, "9999798378098914": 19, "9999799131978417": 19, "9999799263714397": 19, "9999800294497047": 19, "9999802186534139": 20, "9999802936975296": 19, "9999803474424048": 19, "9999803638564161": 19, "9999804113519436": 19, "9999806264360336": 19, "9999807202372036": 19, "9999808836617524": 19, "9999809179819591": 19, "9999809889835496": 19, "9999811150224204": 19, "9999811871919927": 19, "9999821515315185": 19, "9999822360404783": 19, "9999826642402296": 19, "999982696239627": 19, "9999827145861027": 19, "999982771618615": 19, "9999829580110535": 19, "9999830308299852": 19, "9999835048772354": 19, "9999836112405796": 19, "9999837274020729": 19, "9999837287987492": 12, "9999837308133379": 12, "9999838323248553": 19, "9999839054191747": 19, "9999840061625307": 19, "9999841274399789": 19, "9999841395212624": 19, "9999842116986534": 19, "9999842278898873": 19, "9999842278946689": 19, "9999842858440444": 19, "9999843410323541": 19, "9999843962720248": 19, "999984517365484": 19, "9999845742894306": 19, "9999846769079466": 19, "9999847147948822": 19, "9999847406083843": 19, "9999848839841157": 19, "9999849501568968": 19, "9999849518514359": 19, "9999854490365007": 19, "9999854846669585": 19, "9999855256919693": 19, "9999856957320528": 19, "9999859303543726": 19, "9999861648364792": 19, "9999862674170232": 19, "9999862820440971": 19, "9999864664396515": 19, "9999865646301423": 19, "9999866880205311": 19, "9999870715347138": 19, "999987075018884": 19, "999987252534279": 28, "9999872737863882": 19, "9999875880501998": 19, "9999877872886065": 19, "9999882011585163": 19, "9999885782292838": 19, "9999886905327071": 19, "999988712412588": 24, "9999888074224221": 19, "9999888112900659": 19, "9999889651827465": 19, "9999894819511871": 19, "9999896507243767": 19, "9999896926875822": 19, "999989739250175": 19, "9999897864586992": 19, "9999899485873852": 19, "9999899760530466": 19, "9999900693982379": 19, "9999901647899601": 19, "9999901865767792": 19, "9999902713620692": 19, "9999902923652078": 19, "9999903651856844": 19, "9999905018303474": 19, "999990707616756": 19, "9999909995161567": 19, "9999910667256126": 19, "9999910879853997": 19, "9999913264861179": 19, "999991537192374": 19, "9999916138797103": 19, "9999916591202906": 19, "9999916810769826": 19, "9999917592117541": 19, "9999919340015667": 19, "9999921393183026": 24, "9999924793158511": 19, "9999927495837864": 19, "9999928506457437": 19, "9999928603717329": 24, "9999930282260644": 19, "9999930298639131": 19, "9999930938197495": 19, "9999934337977243": 19, "999993562134913": 19, "9999936654595362": 19, "9999937207935639": 19, "9999940363902637": 19, "9999940727994734": 24, "9999941967836338": 19, "9999942564460803": 19, "9999943906884494": 19, "999994399261074": 19, "9999944249680105": 19, "9999944856461577": 19, "9999946575638085": 19, "9999949634057903": 19, "9999950270576494": 19, "9999950949412941": 19, "9999951134484997": 19, "9999953377679788": 19, "9999953796079631": 19, "9999954784528895": 19, "9999956722754607": 19, "9999959671234449": 19, "9999959867450359": 19, "9999960480978767": 19, "9999962146964306": 19, "9999962156472607": 19, "9999962624913747": 19, "9999962889824672": 19, "999996383890805": 19, "9999968986658919": 19, "9999970388609115": 19, "9999970458743549": 19, "9999971222660284": 19, "9999973837949323": 19, "9999974059407801": 19, "9999974755376599": 19, "9999974775415001": 19, "999997477547859": 19, "9999977984107461": 19, "9999978669498215": 19, "9999979009384041": 19, "9999981726743682": 19, "9999981866112407": 19, "9999982519802602": 19, "9999982596377558": 19, "9999982862472424": 19, "9999983352488726": 19, "9999983708153872": 19, "9999984333249491": 19, "9999987580912774": 19, "9999987855303939": 19, "9999988529417926": 28, "9999988610586863": 20, "9999988787247418": 19, "9999988957805453": 19, "9999989595646115": 19, "9999990327979635": 19, "9999990354001381": 19, "9999992221865773": 12, "9999993202720766": 19, "9999993305928151": 19, "99999935535384": 19, "9999993678015309": 12, "9999993835845823": 19, "9999993945260922": 19, "9999995435772306": 19, "9999996254779309": 19, "9999996536741071": 28, "9999996917196639": 19, "9999996930603142": 19, "9999997233652407": 19, "999999776416721": 19, "9999998145393945": 19, "9999998722503725": 19, "9999999273977364": 19, "9999999292547446": 19, "9999999483032596": 19, "9999999767252477": 19, "9999999902142925": 19, "9999999998837575": 19, "9999999999827017": 19, "9999999999827021": 19, "9999999999999639": 19, "99e": [11, 18, 19, 22], "99it": [19, 23], "A": [10, 28], "And": 14, "But": [5, 19, 23, 24], "By": [4, 5], "For": [3, 5, 7, 9, 19], "If": [4, 6, 11, 19, 29], "In": [2, 3, 12, 13, 14, 15, 16, 19, 22, 23, 28], "It": [10, 19], "No": 23, "One": [5, 19], "The": [1, 4, 5, 6, 8, 10, 14, 16, 17, 19, 20, 21, 22, 28, 29], "Then": 28, "There": [1, 5, 13], "These": 19, "_": [21, 28], "_0": 28, "_1": [4, 28], "_base": [5, 7], "_c": 20, "_fun": 7, "_func_sum": 21, "_l": 28, "_scale": 7, "_sp": [5, 7], "_special": 20, "a_arr": 19, "a_rang": 20, "ab": [18, 19, 20, 28], "abil": 16, "about": [5, 13, 19], "abov": [9, 10, 24], "absolut": 8, "acc": 18, "accord": 5, "accur": 18, "accuraci": [19, 27], "achiev": [7, 13], "across": 14, "act_fun": [3, 5], "action": 27, "activ": [4, 5, 7, 9, 12, 13, 14, 15, 17, 19, 21, 25, 27, 28], "active_neurons_id": 9, "actual": 19, "ad": 20, "adam": 10, "adapt": 5, "add": [1, 4, 5, 20], "add_symbol": [20, 24], "addit": [4, 5, 26, 28], "adjust": 5, "advanc": 27, "affect": 8, "affin": [12, 21], "after": [4, 16, 19, 20, 21, 22, 28], "again": [10, 20], "aim": 21, "all": [2, 3, 4, 5, 7, 10, 14, 19, 21, 22], "almost": [7, 19, 28], "along": [3, 13, 21], "alpha": [4, 19, 21, 22], "alreadi": [5, 20, 24], "also": [6, 9, 13, 19], "altern": 27, "although": 13, "alwai": 23, "among": 14, "an": [7, 15, 17, 19, 28], "analysi": 19, "anoth": [13, 14, 19], "anyth": 20, "api": 27, "appear": [19, 20], "append": [11, 17, 22], "appli": 5, "approxim": [5, 19], "ar": [1, 3, 4, 5, 6, 7, 9, 12, 13, 14, 19, 21, 27, 28, 29], "arang": [5, 22], "arbitrari": [17, 28], "arcsin": [12, 19, 20], "arctan": [12, 19, 20], "arctanh": [12, 19, 20], "argmax": 18, "argsort": 6, "argument": [2, 11, 19], "arnold": [1, 17], "around": [19, 22], "arrai": [16, 17, 18, 23], "assert": 5, "astyp": 18, "atanh": 12, "augment": 28, "auto": 28, "auto_symbol": [18, 19, 20, 24, 28], "autograd": 21, "automat": [18, 28], "awai": 9, "axesimag": 19, "b": [5, 7, 29], "b_": 5, "b_arr": 19, "b_batch": [5, 29, 30], "b_i": 5, "backward": 21, "bad": 19, "base": [4, 5, 7, 13, 29], "base_fun": [7, 10, 13], "basi": [5, 29], "batch": [14, 18, 21], "batch_jacobian": 21, "bc": 21, "bc_loss": 21, "bc_pred": 21, "bc_true": 21, "becaus": 20, "becom": [4, 5, 16, 19], "begin": 28, "behavior": 12, "below": [4, 8, 14, 19, 28], "benefit": 23, "besid": 13, "bessel": 20, "bessel_j0": 20, "best": [4, 21], "beta": [3, 4, 6, 11, 12, 13, 14, 15, 17, 21, 28], "better": [10, 27], "bettom": 20, "between": 5, "bf": 28, "bias": 19, "bias_train": 22, "big": 13, "bigger": 20, "binari": 28, "black": [16, 17, 22, 23], "bool": 29, "both": [4, 9, 10, 12, 17, 27, 28, 29], "bottom": 3, "bound": [5, 28], "boundari": [4, 21, 29], "break": 7, "bug": 24, "build": 11, "built": 5, "c": 18, "c_i": 5, "call": 28, "can": [1, 6, 7, 8, 9, 11, 12, 13, 14, 16, 20, 21, 22, 23, 28], "cannot": 10, "captur": 19, "care": 19, "case": [2, 5, 7, 9, 19, 24, 28], "cat": [14, 21], "caveat": [19, 21], "cd": [1, 27], "cdot": 28, "center": 22, "chang": [5, 17, 19, 27], "check": [3, 5, 20], "checkpoint": 25, "choic": 10, "circ": 28, "ckpt1": 10, "ckpt2": 10, "ckpt3": 10, "class": 19, "classif": [14, 26], "clean": 19, "cleaner": 10, "clear": [19, 23], "clear_ckpt": 10, "clip": 11, "clone": [1, 27], "close": 24, "closur": 21, "cnn": 1, "co": [15, 19], "coef": [3, 5, 29], "coef2curv": [29, 30], "coeffcient": 29, "coeffici": [5, 7, 13, 29], "collect": [4, 7, 18, 22], "color": [16, 17, 19, 22, 23], "com": 27, "combin": 5, "common": 10, "competit": 19, "complet": 17, "complex": 23, "composit": [17, 28], "comput": [10, 19], "concept": 15, "condit": [21, 29], "connect": [4, 28], "consid": [5, 9, 15, 24], "constrain": 19, "constrast": 28, "construct": [20, 24, 28], "contain": [3, 5, 19, 20, 24], "content": 30, "continu": [26, 28], "contrain": 19, "control": 4, "contruct": 14, "convent": 6, "converg": 7, "convert": 29, "copi": 14, "corner": [3, 12], "correct": [18, 19, 20], "correl": 19, "correspond": 28, "corrupt": 14, "cosh": [19, 20], "could": [5, 19], "cover": 16, "cpu": [2, 21, 29], "creat": [4, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 28], "create_dataset": [2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 23, 24, 28], "create_graph": 21, "crossentropi": 18, "crossentropyloss": 18, "cubic": [4, 6, 9, 10, 11, 17, 19, 20, 24, 28], "cuda": 2, "curv": 29, "curve2coef": [29, 30], "data": [5, 15, 19, 23], "data_s": 23, "dataset": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 28], "datatset": 18, "deep": [13, 26], "deepcopi": 14, "deeper": 13, "def": [14, 18, 19, 21], "default": [2, 4, 5, 7, 8, 9, 19, 20, 29], "defin": [4, 14, 21, 28], "degener": 7, "degrad": 12, "demo": 27, "demonstr": [13, 19], "dens": 19, "depend": 14, "depth": [3, 13, 17, 28], "deriv": 19, "desc": 21, "descript": 21, "detach": [5, 21, 22], "detail": 9, "determin": 12, "devic": [25, 29], "devicd": 29, "diagon": 21, "diagram": 6, "dic": 19, "dict_kei": [19, 20], "did": 10, "diff": 19, "differ": [8, 9, 22], "differenti": 26, "dim": [14, 18, 21], "dim1": 21, "dim2": 21, "dimens": [18, 21], "discov": 14, "displai": [16, 23], "displaystyl": [12, 18, 19, 20, 21, 24, 28], "distribut": [4, 5], "do": [4, 17, 19, 22], "doe": [5, 12, 17, 19, 20, 24], "domain": 28, "don": [5, 9, 13], "done": 11, "down": [10, 13, 19], "draw": 7, "drawn": 7, "drop": 16, "dtype": [15, 19], "due": 28, "dynam": [11, 16], "e": [1, 5, 7, 19, 20, 27, 28], "each": [3, 5, 6, 7, 9, 21, 22, 28], "earli": 20, "easi": 19, "easili": [19, 28], "edg": [6, 9, 17, 27, 28], "effici": 9, "einsum": [5, 29], "either": 19, "elif": 28, "els": [2, 17, 21], "emb": 5, "empti": 19, "encourag": 26, "end": [19, 28, 29], "endswith": 11, "enough": [13, 24], "epsilon": 19, "equal": 14, "equat": 26, "equival": 12, "especi": 19, "evalu": 29, "evalud": 29, "even": [7, 16, 17, 19], "everi": [19, 28], "exactli": 7, "exampl": [3, 5, 7, 27, 28], "exist": 19, "exp": [2, 4, 8, 9, 10, 11, 13, 14, 16, 17, 18, 20, 22, 23, 28], "express": 28, "extend": 29, "extend_grid": [29, 30], "extens": 29, "extract": [19, 25], "f": [2, 4, 8, 9, 10, 11, 12, 13, 15, 16, 17, 20, 21, 23, 24, 28], "fals": [12, 14, 15, 21, 22, 24, 29], "fast": 7, "featur": [5, 14], "figsiz": 22, "figur": [4, 14], "file": 11, "final": 12, "find": [13, 19, 22], "fine": [16, 19], "finer": 16, "finish": 20, "finit": 28, "first": [1, 3, 4, 5, 7, 12, 18, 21], "fit": [19, 26], "fit_params_bool": [14, 15], "five": 22, "fix": [8, 18, 19, 20, 21, 23, 24, 28], "fix_symbol": [3, 4, 12, 14, 15, 19, 20, 21, 24, 28], "float": [15, 18], "float32": 15, "float64": 18, "floating_digit": 21, "follow": [19, 28], "foot": 14, "form": 28, "format": [5, 14], "formula": [12, 18, 20, 21, 24, 26, 28], "formula1": 18, "formula2": 18, "forward": [4, 5, 7], "found": 1, "fp": 11, "frac": [12, 15], "fractal": [17, 19], "from": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28], "from_numpi": 18, "frustrat": 10, "fulli": 28, "fun": [10, 19], "func": 21, "function": [4, 5, 7, 12, 17, 21, 22, 25, 26, 27, 28], "funs_nam": 3, "further": [10, 21], "futur": 19, "g": [5, 7, 12, 14, 15, 16, 19, 23], "game": 10, "gaurante": 7, "gaussian": [12, 14, 19, 20, 22], "gausssian": 14, "gener": [17, 28], "generaliz": 19, "generate_contrast": 14, "get": [1, 12], "get_rang": 6, "git": [1, 27], "github": 1, "give": [5, 6, 14, 24], "given": 12, "global": 21, "go": [13, 19], "goal": 22, "goe": 19, "good": [7, 16, 19], "grad_fn": [5, 12, 20, 24], "grain": 16, "graph": 10, "graviti": 19, "grid": [2, 3, 4, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 28, 29], "grid_ep": [5, 21], "grid_rang": 19, "grid_siz": 23, "ground": [20, 21, 24], "group": 14, "group_id": 22, "grudual": 13, "guess": 19, "ha": [19, 22, 23], "happen": 5, "happi": [19, 24], "harm": 23, "have": [2, 5, 9, 11, 14, 17, 19, 22, 27, 28], "hello": 27, "help": 8, "helper": 21, "henc": [9, 19], "here": [1, 5], "hidden": [3, 4, 6, 9, 10, 11, 17, 19, 20, 24, 28], "hiddenl": 9, "high": 19, "history_s": 21, "hope": 19, "hopefulli": 19, "how": [5, 8, 13, 14, 16, 18], "howev": [5, 9, 28], "hspace": 22, "http": 27, "hyperparamet": 8, "hyperparamt": 25, "hypothesi": 12, "hypreparam": 21, "i": [1, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 27, 28, 29], "idea": 14, "ideal": 23, "ident": 7, "ij": [5, 21, 29], "illustr": [6, 7], "imag": 19, "image_fil": 11, "image_fold": 11, "imagesequenceclip": 11, "img": 19, "img_fold": 11, "implement": [5, 20], "implicitli": 14, "implment": 19, "import": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28], "imshow": 19, "in_dim": 3, "in_var": [4, 11, 14], "inact": 9, "includ": [17, 20], "incom": [4, 9], "incorpor": 19, "increas": 23, "inde": 5, "independ": [7, 14], "index": [1, 6, 11, 21, 25, 27], "indic": 3, "induct": 19, "initi": [4, 5, 12, 16, 23, 25, 28], "initialize_from_another_model": [16, 17, 23], "inner": 17, "input": [3, 4, 6, 9, 10, 11, 12, 14, 17, 19, 20, 24, 28, 29], "insight": 19, "insignific": 4, "inspir": 27, "instal": 1, "instead": [13, 14, 22, 24], "int": [11, 29], "interdepend": 14, "interest": 6, "interior": 21, "interleav": 28, "interpol": 5, "interpret": [8, 9, 27], "interv": [4, 5, 6, 9, 10, 11, 17, 19, 20, 24, 28, 29], "intial": [10, 12, 14, 15, 16], "introduc": 6, "intuit": 6, "involv": 20, "io": 11, "is_avail": 2, "isdigit": 11, "isn": 20, "issu": 19, "item": 17, "iter": 16, "its": [4, 9, 19, 28], "j": [3, 5, 6, 19, 21, 23, 29], "j0": 20, "j_": 20, "j_0": 20, "jacobian": 21, "jpg": 11, "jupyt": 13, "just": [7, 9, 10], "justifi": 12, "k": [2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29], "k_extend": 29, "ka": 17, "kan": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 24, 26, 30], "kanlay": 30, "keep": 28, "keepdim": 21, "kei": [19, 20], "kept": 9, "kindxiaom": 27, "know": [12, 13], "known": 5, "kolmogorov": 17, "l": [3, 6, 16, 17, 23, 28], "l1": [4, 9], "l2": 21, "lamb": [2, 4, 8, 9, 10, 11, 13, 14, 15, 17, 19, 20, 24, 28, 29], "lamb_coef": 13, "lamb_entropi": [2, 4, 8, 9, 10, 11, 14, 15, 17, 19, 20, 24, 28], "lambda": [2, 4, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 23, 24, 28], "lap": 21, "larg": [7, 10, 19, 20], "larger": [4, 23], "last": [14, 15], "lastest": 10, "later": 24, "latest": 1, "law": [16, 26], "layer": [5, 6, 9, 12, 14, 21, 27, 28], "lbfg": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 30], "learn": [15, 19, 26], "least": [17, 19, 29], "leav": 9, "left": [3, 12, 17, 18, 19, 20, 21, 24, 28], "legend": [5, 16, 17, 23], "len": [17, 19], "length": 21, "less": 19, "let": [3, 5, 8, 9, 12, 13, 18, 19, 20, 24, 28], "level": 19, "leverag": 16, "lib": [18, 19, 28], "libarari": 19, "librari": [19, 20], "like": 19, "limit": 28, "line": [4, 6], "line2d": 6, "line_search_fn": 21, "linear": [5, 7, 21, 26, 28], "link": 1, "linspac": [5, 19, 21, 22, 29], "list": [12, 19, 20], "listdir": 11, "load": [8, 10], "load_ckpt": 10, "loc": 17, "local": [19, 22], "lock": 26, "log": [16, 17, 18, 19, 20, 21, 23, 24, 28], "logit1": 18, "logit2": 18, "look": [5, 10, 12, 19], "loss": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28], "loss_fn": 18, "lower": [16, 17], "lr": [21, 24], "lucki": 24, "machin": [12, 19, 20, 21, 28], "magnitud": 8, "mai": [5, 6, 8, 19, 28], "make": [3, 8, 9, 10, 13, 16, 19, 27], "make_moon": 18, "manual": [17, 28], "margin": 5, "marker": [6, 16, 17, 23], "mask": [3, 4, 8, 28], "match": [5, 19, 20, 23], "mathbb": 28, "matplotlib": [5, 6, 17, 18, 19, 21, 22], "matrix": 28, "max": 9, "maximimz": 16, "mean": [3, 5, 12, 15, 18, 19, 21], "meanbackward0": 5, "mesh": 21, "meshgrid": 21, "mess": 10, "method": 11, "metric": 18, "might": [17, 19], "minim": 13, "mlp": [27, 28], "mode": [4, 9, 28], "model": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28], "model2": [4, 16], "model_ckpt": 10, "model_output": 5, "modul": [1, 27, 30], "moon": 18, "more": [4, 6, 9, 16, 19, 23, 28], "moviepi": 11, "mp4": 11, "mse": 18, "much": 17, "multi": [27, 28], "multivari": 28, "my": [4, 5], "n": [4, 7, 16, 17, 23, 28], "n_": [7, 28], "n_class": 19, "n_num_per_peak": 22, "n_param": [16, 17], "n_peak": 22, "n_sampl": [18, 22], "n_var": [2, 4, 8, 9, 10, 11, 12, 13, 15, 16, 17, 19, 20, 23, 24, 28], "nabla": 21, "name": [4, 20], "nan": 24, "need": [5, 7, 10, 11, 19, 20], "neg": 14, "negtiv": 14, "network": [5, 9, 19], "neural": [5, 9, 16], "neuron": [4, 6, 9, 10, 11, 17, 19, 20, 24, 28], "new": 1, "newton": 19, "nn": [5, 10, 18, 22], "node": [7, 9, 27], "nois": [7, 18], "noise_scal": [7, 22], "noise_scale_bas": [6, 7, 8, 14, 21], "noisi": 7, "non": [5, 7, 14, 17], "none": [5, 14, 18, 19, 22], "nonlinear": 28, "norm": [4, 9], "normal": [3, 5, 6, 7, 19, 29], "note": [9, 19], "notebook": [6, 13], "notic": [12, 19, 28], "now": [5, 8, 10, 12, 16, 17, 19, 20, 21], "np": [5, 6, 11, 16, 17, 18, 19, 22, 23], "np_b": 21, "np_i": 21, "num": 19, "num_grid_interv": 29, "num_pt": 19, "num_sampl": 29, "num_splin": 29, "numbef": 29, "number": [4, 5, 7, 16, 21, 29], "numer": 4, "numpi": [5, 11, 17, 18, 21, 22], "o": [6, 11, 16, 17, 23], "observ": 23, "obtain": [5, 19, 28], "onc": 22, "one": [3, 9, 10, 11, 13, 19, 22, 23], "ones": [14, 29], "onli": [4, 5, 9, 11, 22, 28], "open": 19, "oper": 28, "operatornam": 12, "opt": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 28], "optim": 21, "option": 5, "order": [5, 6, 20, 29], "origin": [19, 28], "orign": 17, "other": [2, 5, 14, 19, 28], "otherwis": 22, "ouput": 12, "our": [5, 12, 20, 22], "out": [5, 14, 21, 28], "out_dim": 3, "out_var": [4, 11], "outer": 17, "outgo": [4, 9], "output": [3, 4, 5, 6, 9, 10, 11, 14, 17, 18, 19, 20, 24, 28], "over": [5, 10, 19, 29], "p": 28, "packag": 30, "page": [1, 27], "paper": [1, 9, 27], "param": [16, 23, 29], "paramet": [3, 4, 5, 11, 19, 21], "parametr": 5, "part": 5, "partial": 26, "pass": [2, 11, 17, 19], "pathcollect": [18, 22], "pbar": 21, "pde": [7, 19, 26], "pde_loss": 21, "peak": 22, "penal": 13, "peopl": 19, "perceptron": 28, "perform": [13, 17, 23], "period": 19, "permut": [14, 21], "phase": [22, 26], "phi": [4, 5, 7, 28], "phi_": 28, "phi_1": 28, "phi_q": 28, "pi": [2, 4, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 23, 28], "piecewis": 29, "pip": [1, 27], "place": 28, "plai": 10, "plateau": 16, "pleas": 7, "plot": [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 28], "plt": [5, 6, 16, 17, 18, 19, 21, 22, 23], "plu": 5, "pmatrix": 28, "point": [21, 24, 29], "poisson": 21, "polynomi": 29, "posit": 14, "postprocess": 19, "power": [19, 23, 28], "preceptron": 27, "precis": [12, 19, 20, 21, 28], "predict": [19, 22], "prefer": 19, "prensent": 22, "presenc": 19, "present": 22, "previou": 22, "previous": 8, "print": [2, 3, 5, 17, 18, 21, 23], "probabl": 10, "problem": [14, 18, 19, 24], "promis": [10, 27], "proper": 4, "properli": 5, "provid": [5, 9, 10, 19], "prune": [4, 8, 10, 13, 19, 20, 24, 25, 28], "pump": 10, "purn": 4, "purpl": 4, "pykan": 27, "pyplot": [5, 6, 17, 18, 21, 22], "pytorch": 20, "q": 28, "quad": 28, "quadrat": 19, "quantit": 6, "quick": 10, "quickstart": 27, "quit": [13, 19, 21], "r": [4, 11, 14, 16, 17, 23, 27, 28], "r2": [3, 4, 12, 18, 19, 20, 21, 24, 28], "radnom": 21, "rand": [14, 19, 21], "random": [14, 19, 21, 22], "random_st": 18, "randperm": 14, "rang": [3, 5, 6, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24], "rank": 6, "rapid": 12, "reach": [19, 20, 21], "readi": 11, "realiz": 10, "reason": 19, "recommend": 7, "recov": 10, "red": [3, 4], "rediscov": 12, "redo": 19, "reduc": 19, "refer": 3, "refin": 16, "reg": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 28], "regim": 5, "region": 5, "regress": [12, 20, 26], "regular": [4, 8, 10, 28], "rel": 26, "relat": [11, 14], "relavit": 12, "relev": 13, "remain": 12, "remind": 5, "remov": [3, 4, 9, 17], "remove_edg": [9, 17], "remove_nod": [3, 9], "renam": 19, "replac": 19, "replot": 28, "repo": [1, 27], "repolink": 1, "repres": 13, "represent": [17, 27], "requir": [8, 17, 19], "reshap": [19, 21, 22], "residu": 5, "residual_output": 5, "resiz": 4, "resolv": 24, "rest": 20, "restor": 10, "result": [10, 16, 17, 18, 23, 29], "retrain": [12, 19], "return": [14, 18, 19, 20, 21], "reveal": 19, "right": [12, 18, 19, 20, 21, 24, 28], "rm": [4, 5, 7, 11, 12, 13, 14, 15, 17, 20, 21, 28], "rmse": [16, 19, 23], "robust": 19, "roughli": 23, "rougli": 5, "round": 18, "sad": 19, "safe": 9, "sai": [17, 28], "same": [5, 10, 12], "sampl": [4, 5, 14, 22, 29], "sampling_mod": 21, "satisfi": 14, "save": [10, 11], "save_ckpt": 10, "save_fig": 11, "save_video": 11, "sb_trainabl": 22, "scale": [4, 5, 7, 16, 22, 26], "scale_bas": 5, "scale_sp": 5, "scatter": [18, 22], "scienc": 15, "scope": 5, "screw": 19, "search": [1, 19, 20, 27], "second": [1, 3, 13, 14, 21], "see": [3, 4, 7, 8, 9, 12, 19, 24, 28], "seed": [2, 4, 6, 7, 9, 10, 11, 13, 14, 17, 19, 20, 24, 28], "seem": [10, 17, 24], "selectbackward0": [12, 20, 24], "sens": 28, "sensit": [19, 21], "sentit": 19, "sequenti": 22, "set": [4, 5, 7, 8, 10, 11, 12, 13, 14, 15, 19, 20, 21, 22, 28], "set_descript": 21, "set_mod": 4, "setup": [7, 8, 22], "sf_mat": 19, "sgn": [19, 20], "shape": [4, 5, 8, 9, 14, 16, 18, 19, 21, 23, 28, 29], "shift": 22, "shortcut": 13, "should": [2, 13, 19, 20, 24], "show": [4, 17, 19, 20, 23, 28], "shown": 11, "shuffl": 18, "side": 21, "sigma": 28, "sigmoid": [12, 15, 19, 20], "signal": 19, "signific": 4, "silu": [5, 7, 10], "similar": 12, "simpl": 27, "simpli": [5, 28], "simplifi": 10, "sin": [2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 28], "sinc": [5, 20, 28], "sine": 21, "singl": 28, "singular": 26, "six": 14, "size": [3, 4, 5, 6, 7, 19, 23, 28, 29], "skip": 20, "sklearn": 18, "small": [7, 9, 13, 19], "smaller": [4, 19, 28], "smooth": [17, 28], "so": [5, 10, 12, 14, 19, 20, 23], "sol": 21, "sol_d1": 21, "sol_d1_fun": 21, "sol_d2": 21, "sol_fun": 21, "solut": 21, "solv": [19, 26], "some": [6, 8, 9, 11, 19], "someth": 10, "sometim": [6, 7], "sort": 11, "sourc": 21, "source_fun": 21, "sp_trainabl": 22, "space": 19, "sparser": [8, 9], "sparsiti": [4, 13, 28], "special": [26, 28], "special_bessel_j0": 20, "specif": [19, 28], "spline": [3, 4, 5, 6, 7, 9, 10, 11, 13, 17, 19, 20, 22, 24, 28, 30], "spline_output": 5, "spline_postact": 6, "spline_preact": 6, "sqrt": [7, 12, 18, 19, 20, 24, 28], "squar": 29, "sr": 19, "stack": [21, 22, 28], "stage": 22, "staircas": 16, "start": [3, 10, 13, 19], "state": 28, "step": [2, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29], "still": [4, 21], "stop": 20, "stop_grid_update_step": [16, 17, 23], "str": [11, 29], "strategi": 13, "strengh": 10, "strength": 10, "strong_wolf": 21, "structur": 16, "stuck": 19, "studi": 23, "sub": 18, "submodul": 30, "subplot": 22, "subplots_adjust": 22, "suddenli": 16, "suffic": [13, 17], "suggest": [12, 19], "suggest_symbol": [12, 19, 20], "sum": [21, 28, 29], "sum_": [5, 28], "suppos": [5, 10, 13], "symbol": [3, 4, 12, 18, 20, 21, 26, 28], "symbolic_formula": [12, 18, 19, 20, 21, 24, 28], "symbolic_fun": 3, "symbolic_kanlay": 30, "symbolic_lib": [19, 20, 24], "symmetri": 7, "sympi": 19, "synthet": 14, "t": [5, 9, 10, 13, 20], "take": [5, 19], "takeawai": 19, "tan": [12, 15, 18, 19, 20], "tanh": [4, 12, 18, 19, 20, 28], "target": 14, "task": [6, 13, 17, 19], "tensor": [3, 4, 5, 6, 12, 14, 15, 18, 19, 20, 24, 29], "term": 27, "test": [2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 28], "test_acc": 18, "test_input": [14, 18, 19, 22], "test_label": [14, 18, 19, 22], "test_loss": [16, 17, 23], "test_num": 14, "test_rms": 17, "test_vs_g": 16, "text": [5, 16, 23], "texttt": 12, "th": 28, "than": 27, "thank": 22, "thei": [5, 6, 19, 28], "them": [3, 12, 19], "themselv": 4, "theorem": [17, 27], "thi": [1, 5, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 27, 28], "thing": 10, "think": 10, "those": 4, "though": [19, 20], "threshold": 9, "tini": 19, "titl": 4, "togeth": 23, "toi": [15, 19], "toler": 19, "tolerance_chang": 21, "tolerance_grad": 21, "tolerance_i": 21, "too": [7, 10, 17, 20], "top": [12, 19, 20], "topk": 19, "torch": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29], "tqdm": 21, "train": [2, 4, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 28], "train_acc": 18, "train_index": 11, "train_input": [4, 8, 9, 10, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 28], "train_label": [4, 8, 9, 14, 15, 18, 19, 22, 28], "train_loss": [16, 17, 23], "train_num": [2, 11, 14, 17, 23], "train_rms": 17, "train_vs_g": 16, "trainabl": 21, "transform": 12, "transit": [19, 26], "transpar": 4, "treat": [14, 18], "trick": [12, 13], "true": [4, 8, 11, 17, 18, 21, 28, 29], "truth": [20, 21, 24], "try": [3, 8, 9, 12, 13, 14, 19], "tune": 8, "turn": 3, "two": [1, 5, 9, 12, 13, 18], "txt": 27, "u": [7, 12], "u8": 19, "unabl": 17, "unclear": 19, "unfix_symbol": 3, "uniform": 5, "univari": 28, "unsignific": 4, "unsupervis": 26, "until": 13, "up": [4, 10, 19, 20, 29], "updat": 5, "update_grid": [12, 22, 24], "update_grid_from_sampl": [5, 21], "us": [2, 3, 4, 5, 6, 8, 9, 13, 14, 15, 19, 26, 28, 29], "user": 19, "usual": [4, 9, 19], "util": [12, 19, 20, 30], "uv": 12, "v": 12, "valid": 5, "valu": [4, 6, 21, 29], "var": [19, 21], "vari": 8, "variabl": [4, 14, 19, 28], "varianc": 5, "vdot": 28, "veri": 19, "via": 1, "video": 25, "video_img": 11, "video_nam": 11, "visibl": 4, "visual": [4, 11, 28], "w": 28, "wai": [1, 9, 10], "want": [2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 16, 19, 20, 23], "we": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 28], "well": [4, 13, 19], "were": 24, "what": [5, 12], "whch": 19, "when": [7, 13, 14, 19], "where": [3, 4, 6, 7, 9, 13, 14, 20, 28], "wherea": 27, "which": [3, 5, 17, 19, 20, 24], "while": [5, 9, 14], "whole": [10, 19, 28], "why": [19, 20], "wider": 13, "width": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28], "win": 19, "within": 19, "without": 13, "won": 10, "worri": 5, "wors": 17, "would": 23, "write": 11, "write_videofil": 11, "written": 28, "wrong": [10, 19], "wrt": 23, "wspace": 22, "x": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 23, 24, 28, 29], "x_": [12, 14, 18, 19, 20, 21, 24, 28], "x_1": [11, 14, 15, 17, 18, 28], "x_2": [11, 14, 15, 17, 18], "x_3": [11, 14, 15, 17], "x_4": [11, 14, 17], "x_5": 14, "x_6": 14, "x_b": 21, "x_center": 22, "x_cor": 14, "x_eval": 29, "x_grid": 22, "x_i": 21, "x_mesh": 21, "x_n": 28, "x_p": 28, "x_sampl": 22, "x_test": 14, "x_train": 14, "xb1": 21, "xb2": 21, "xb3": 21, "xb4": 21, "xlabel": [5, 16, 23], "xlim": 22, "xscale": [16, 17, 23], "y": [4, 6, 9, 13, 14, 18, 19, 20, 21, 22, 24, 28], "y_eval": 29, "y_mesh": 21, "y_pred": 22, "y_sampl": 22, "y_test": 14, "y_train": 14, "yeah": 19, "yet": 6, "ylabel": [5, 16, 23], "ylim": 22, "you": [4, 9, 10, 19], "your": [10, 19], "yscale": [16, 17, 23], "zero": [5, 7, 13, 14, 19, 23, 29], "zero_grad": 21}, "titles": ["API Demos", "Welcome to Kolmogorov Aarnold Network (KAN) documentation!", "Demo 10: Device", "Demo 1: Indexing", "Demo 2: Plotting", "Demo 3: Grid", "Demo 4: Extracting activation functions", "Demo 5: Initialization Hyperparamters", "Demo 6: Training Hyperparamters", "Demo 7: Pruning", "Demo 8: Checkpoint", "Demo 9: Videos", "Example 10: Use of lock for Relativity Addition", "Example 11: Encouraging linearity", "Example 12: Unsupervised learning", "Example 13: Phase transition", "Example 1: Function Fitting", "Example 2: Deep Formulas", "Example 3: Classification", "Example 4: Symbolic Regression", "Example 5: Special functions", "Example 6: Solving Partial Differential Equation (PDE)", "Example 7: Continual Learning", "Example 8: KANs\u2019 Scaling Laws", "Example 9: Singularity", "API Demos", "Examples", "Welcome to Kolmogorov Arnold Network (KAN) documentation!", "Hello, KAN!", "kan package", "API"], "titleterms": {"1": [3, 8, 13, 16, 19], "10": [2, 12], "11": 13, "12": 14, "13": 15, "1d": [13, 19], "2": [4, 8, 13, 17, 19], "2d": 13, "3": [5, 8, 18], "4": [6, 8, 19], "5": [7, 20], "6": [8, 21], "7": [9, 22], "8": [10, 23], "9": [11, 24], "aarnold": 1, "activ": [3, 6], "ad": 19, "addit": 12, "af_1": 19, "api": [0, 25, 30], "arg": 29, "arnold": [27, 28], "autom": 19, "automat": 9, "b": 19, "bf_2": 19, "bound": 19, "can": 19, "case": 13, "chaotic": 19, "checkpoint": 10, "classif": 18, "content": [27, 29], "continu": 22, "deep": 17, "defin": 19, "demo": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 25], "devic": 2, "diagram": 19, "differenti": 21, "document": [1, 27], "edg": 3, "encourag": 13, "ent": 8, "entropi": 8, "equat": 21, "exact": 19, "exampl": [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 29], "exp": 19, "extract": 6, "f": 19, "f_1": 19, "f_2": 19, "f_3": 19, "fit": 16, "formul": 18, "formula": [17, 19], "fratcal": 19, "function": [3, 6, 13, 16, 19, 20], "g": 8, "get": [19, 27, 28], "github": 27, "grid": [5, 8], "hard": 19, "hello": 28, "how": 19, "hyperparamt": [7, 8], "i": 19, "ii": 19, "ill": 19, "index": 3, "indic": [1, 27], "initi": 7, "instal": 27, "kan": [1, 17, 18, 23, 27, 28, 29], "kanlay": 29, "know": 19, "kolmogorov": [1, 27, 28], "lambda": 8, "lambda_": 8, "law": 23, "layer": [3, 17], "lbfg": 29, "learn": [14, 22], "linear": 13, "lock": 12, "manual": [9, 19], "mix": 19, "modul": 29, "my": 19, "network": [1, 27, 28], "neuron": 3, "node": 3, "nois": 19, "overal": 8, "packag": 29, "paramet": 8, "part": 19, "partial": 21, "pde": 21, "penalti": 8, "phase": [15, 19], "plot": 4, "prune": 9, "pypi": 27, "realli": 19, "region": 19, "regress": [18, 19], "rel": [8, 12], "represent": 28, "requir": 27, "return": 29, "rm": [8, 19], "scale": 23, "seed": 8, "sin": 19, "sine": 19, "singular": 24, "size": 8, "solv": 21, "special": 20, "spline": 29, "start": [27, 28], "strength": 8, "submodul": 29, "symbol": 19, "symbolic_kanlay": 29, "tabl": [1, 27], "theorem": 28, "three": [17, 19], "train": [8, 18], "transit": 15, "two": 17, "unsupervis": 14, "us": 12, "util": 29, "v": 19, "via": 27, "video": 11, "we": 19, "welcom": [1, 27], "x": 19}}) \ No newline at end of file +Search.setIndex({"alltitles": {"1D example: Adding noise to a bounded region sine": [[22, "d-example-adding-noise-to-a-bounded-region-sine"]], "API": [[4, null], [33, null]], "API Demos": [[0, null], [28, null]], "Args:": [[3, "args"], [3, "id1"], [3, "id4"], [3, "id7"], [3, "id10"], [3, "id15"], [3, "id18"], [3, "id20"], [3, "id23"], [3, "id26"], [3, "id29"], [3, "id32"], [3, "id34"], [3, "id37"], [3, "id40"], [32, "args"], [32, "id1"], [32, "id4"], [32, "id7"], [32, "id10"], [32, "id15"], [32, "id18"], [32, "id20"], [32, "id23"], [32, "id26"], [32, "id29"], [32, "id32"], [32, "id34"], [32, "id37"], [32, "id40"]], "Attributes:": [[3, "attributes"], [3, "id13"], [32, "attributes"], [32, "id13"]], "Automatic pruning": [[12, "automatic-pruning"]], "Case 1: 1D function": [[16, "case-1-1d-function"]], "Case 2: 2D function": [[16, "case-2-2d-function"]], "Classification formulation": [[21, "classification-formulation"]], "Contents:": [[30, null]], "Demo 10: Device": [[5, null]], "Demo 1: Indexing": [[6, null]], "Demo 2: Plotting": [[7, null]], "Demo 3: Grid": [[8, null]], "Demo 4: Extracting activation functions": [[9, null]], "Demo 5: Initialization Hyperparamters": [[10, null]], "Demo 6: Training Hyperparamters": [[11, null]], "Demo 7: Pruning": [[12, null]], "Demo 8: Checkpoint": [[13, null]], "Demo 9: Videos": [[14, null]], "Example": [[3, "example"], [3, "id3"], [3, "id6"], [3, "id9"], [3, "id12"], [3, "id17"], [3, "id22"], [3, "id25"], [3, "id28"], [3, "id31"], [3, "id33"], [3, "id36"], [3, "id39"], [3, "id42"], [32, "example"], [32, "id3"], [32, "id6"], [32, "id9"], [32, "id12"], [32, "id17"], [32, "id22"], [32, "id25"], [32, "id28"], [32, "id31"], [32, "id33"], [32, "id36"], [32, "id39"], [32, "id42"]], "Example 1": [[3, "example-1"], [32, "example-1"]], "Example 10: Use of lock for Relativity Addition": [[15, null]], "Example 11: Encouraging linearity": [[16, null]], "Example 12: Unsupervised learning": [[17, null]], "Example 13: Phase transition": [[18, null]], "Example 1: Function Fitting": [[19, null]], "Example 2: Deep Formulas": [[20, null]], "Example 3: Classification": [[21, null]], "Example 4: Symbolic Regression": [[22, null]], "Example 5: Special functions": [[23, null]], "Example 6: Solving Partial Differential Equation (PDE)": [[24, null]], "Example 7: Continual Learning": [[25, null]], "Example 8: KANs\u2019 Scaling Laws": [[26, null]], "Example 9: Singularity": [[27, null]], "Examples": [[29, null]], "Get started": [[30, "get-started"]], "Get started with KANs": [[2, "get-started-with-kans"], [31, "get-started-with-kans"]], "Hello, KAN!": [[2, null], [31, null]], "Indexing of edges (activation functions)": [[6, "indexing-of-edges-activation-functions"]], "Indexing of layers": [[6, "indexing-of-layers"]], "Indexing of nodes (neurons)": [[6, "indexing-of-nodes-neurons"]], "Indices and tables": [[1, "indices-and-tables"], [30, "indices-and-tables"]], "Installation": [[30, "installation"]], "Installation via PyPI": [[30, "installation-via-pypi"]], "Installation via github": [[30, "installation-via-github"]], "Kolmogorov-Arnold Network (KAN)": [[2, "kolmogorov-arnold-network-kan"], [31, "kolmogorov-arnold-network-kan"]], "Kolmogorov-Arnold representation theorem": [[2, "kolmogorov-arnold-representation-theorem"], [31, "kolmogorov-arnold-representation-theorem"]], "Manual pruning": [[12, "manual-pruning"]], "Methods:": [[3, "methods"], [3, "id14"], [32, "methods"], [32, "id14"]], "Module contents": [[3, "module-contents"], [32, "module-contents"]], "Parameter 1: \\lambda, overall penalty strength.": [[11, "parameter-1-lambda-overall-penalty-strength"]], "Parameter 2: (relative) penalty strength of entropy \\lambda_{\\rm ent}.": [[11, "parameter-2-relative-penalty-strength-of-entropy-lambda-rm-ent"]], "Parameter 3: Grid size G.": [[11, "parameter-3-grid-size-g"]], "Parameter 4: seed.": [[11, "parameter-4-seed"]], "Part I: Automated vs manual symbolic regression (How can we know that we get the exact formula?)": [[22, "part-i-automated-vs-manual-symbolic-regression-how-can-we-know-that-we-get-the-exact-formula"]], "Part II: How hard (ill-defined) is symbolic regression, really?": [[22, "part-ii-how-hard-ill-defined-is-symbolic-regression-really"]], "Phase diagram of symbolic regression (how fratcal/chaotic is my phase diagram?)": [[22, "phase-diagram-of-symbolic-regression-how-fratcal-chaotic-is-my-phase-diagram"]], "Regression formulation": [[21, "regression-formulation"]], "Requirements": [[30, "requirements"]], "Returns:": [[3, "returns"], [3, "id2"], [3, "id5"], [3, "id8"], [3, "id11"], [3, "id16"], [3, "id19"], [3, "id21"], [3, "id24"], [3, "id27"], [3, "id30"], [3, "id35"], [3, "id38"], [3, "id41"], [32, "returns"], [32, "id2"], [32, "id5"], [32, "id8"], [32, "id11"], [32, "id16"], [32, "id19"], [32, "id21"], [32, "id24"], [32, "id27"], [32, "id30"], [32, "id35"], [32, "id38"], [32, "id41"]], "Submodules": [[3, "submodules"], [32, "submodules"]], "Three-layer KAN": [[20, "three-layer-kan"]], "Train KAN": [[21, "train-kan"]], "Two-layer KAN": [[20, "two-layer-kan"]], "Welcome to Kolmogorov Aarnold Network (KAN) documentation!": [[1, null]], "Welcome to Kolmogorov Arnold Network (KAN) documentation!": [[30, null]], "kan package": [[3, null], [32, null]], "kan.KAN module": [[3, "kan-kan-module"], [32, "kan-kan-module"]], "kan.KANLayer module": [[3, "module-kan.KANLayer"], [32, "module-kan.KANLayer"]], "kan.LBFGS module": [[3, "module-kan.LBFGS"], [32, "module-kan.LBFGS"]], "kan.Symbolic_KANLayer module": [[3, "module-kan.Symbolic_KANLayer"], [32, "module-kan.Symbolic_KANLayer"]], "kan.spline module": [[3, "module-kan.spline"], [32, "module-kan.spline"]], "kan.utils module": [[3, "module-kan.utils"], [32, "module-kan.utils"]], "mix three functions f_1(x)={\\rm sin}(x), f_2(x)=x^2, and f_3(x)={\\rm exp}(x) such that f(x)=af_1(x)+bf_2(x)+(1-a-b)f_3(x). Symbolically regress f(x).": [[22, "mix-three-functions-f-1-x-rm-sin-x-f-2-x-x-2-and-f-3-x-rm-exp-x-such-that-f-x-af-1-x-bf-2-x-1-a-b-f-3-x-symbolically-regress-f-x"]]}, "docnames": [".ipynb_checkpoints/demos-checkpoint", ".ipynb_checkpoints/index-checkpoint", ".ipynb_checkpoints/intro-checkpoint", ".ipynb_checkpoints/kan-checkpoint", ".ipynb_checkpoints/modules-checkpoint", "API_demo/API_10_device", "API_demo/API_1_indexing", "API_demo/API_2_plotting", "API_demo/API_3_grid", "API_demo/API_4_extract_activations", "API_demo/API_5_initialization_hyperparameter", "API_demo/API_6_training_hyperparameter", "API_demo/API_7_pruning", "API_demo/API_8_checkpoint", "API_demo/API_9_video", "Examples/Example_10_relativity-addition", "Examples/Example_11_encouraing_linear", "Examples/Example_12_unsupervised_learning", "Examples/Example_13_phase_transition", "Examples/Example_1_function_fitting", "Examples/Example_2_deep_formula", "Examples/Example_3_classfication", "Examples/Example_4_symbolic_regression", "Examples/Example_5_special_functions", "Examples/Example_6_PDE", "Examples/Example_7_continual_learning", "Examples/Example_8_scaling", "Examples/Example_9_singularity", "demos", "examples", "index", "intro", "kan", "modules"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": [".ipynb_checkpoints/demos-checkpoint.rst", ".ipynb_checkpoints/index-checkpoint.rst", ".ipynb_checkpoints/intro-checkpoint.rst", ".ipynb_checkpoints/kan-checkpoint.rst", ".ipynb_checkpoints/modules-checkpoint.rst", "API_demo/API_10_device.rst", "API_demo/API_1_indexing.rst", "API_demo/API_2_plotting.rst", "API_demo/API_3_grid.rst", "API_demo/API_4_extract_activations.rst", "API_demo/API_5_initialization_hyperparameter.rst", "API_demo/API_6_training_hyperparameter.rst", "API_demo/API_7_pruning.rst", "API_demo/API_8_checkpoint.rst", "API_demo/API_9_video.rst", "Examples/Example_10_relativity-addition.rst", "Examples/Example_11_encouraing_linear.rst", "Examples/Example_12_unsupervised_learning.rst", "Examples/Example_13_phase_transition.rst", "Examples/Example_1_function_fitting.rst", "Examples/Example_2_deep_formula.rst", "Examples/Example_3_classfication.rst", "Examples/Example_4_symbolic_regression.rst", "Examples/Example_5_special_functions.rst", "Examples/Example_6_PDE.rst", "Examples/Example_7_continual_learning.rst", "Examples/Example_8_scaling.rst", "Examples/Example_9_singularity.rst", "demos.rst", "examples.rst", "index.rst", "intro.rst", "kan.rst", "modules.rst"], "indexentries": {"__init__() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.__init__", false], [32, "kan.KANLayer.KANLayer.__init__", false]], "__init__() (kan.lbfgs.lbfgs method)": [[3, "kan.LBFGS.LBFGS.__init__", false], [32, "kan.LBFGS.LBFGS.__init__", false]], "__init__() (kan.symbolic_kanlayer.symbolic_kanlayer method)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer.__init__", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer.__init__", false]], "add_symbolic() (in module kan.utils)": [[3, "kan.utils.add_symbolic", false], [32, "kan.utils.add_symbolic", false]], "augment_input() (in module kan.utils)": [[3, "kan.utils.augment_input", false], [32, "kan.utils.augment_input", false]], "b_batch() (in module kan.spline)": [[3, "kan.spline.B_batch", false], [32, "kan.spline.B_batch", false]], "batch_hessian() (in module kan.utils)": [[3, "kan.utils.batch_hessian", false], [32, "kan.utils.batch_hessian", false]], "batch_jacobian() (in module kan.utils)": [[3, "kan.utils.batch_jacobian", false], [32, "kan.utils.batch_jacobian", false]], "coef2curve() (in module kan.spline)": [[3, "kan.spline.coef2curve", false], [32, "kan.spline.coef2curve", false]], "create_dataset() (in module kan.utils)": [[3, "kan.utils.create_dataset", false], [32, "kan.utils.create_dataset", false]], "create_dataset_from_data() (in module kan.utils)": [[3, "kan.utils.create_dataset_from_data", false], [32, "kan.utils.create_dataset_from_data", false]], "curve2coef() (in module kan.spline)": [[3, "kan.spline.curve2coef", false], [32, "kan.spline.curve2coef", false]], "ex_round() (in module kan.utils)": [[3, "kan.utils.ex_round", false], [32, "kan.utils.ex_round", false]], "extend_grid() (in module kan.spline)": [[3, "kan.spline.extend_grid", false], [32, "kan.spline.extend_grid", false]], "f_arccos() (in module kan.utils)": [[3, "kan.utils.f_arccos", false], [32, "kan.utils.f_arccos", false]], "f_arcsin() (in module kan.utils)": [[3, "kan.utils.f_arcsin", false], [32, "kan.utils.f_arcsin", false]], "f_arctanh() (in module kan.utils)": [[3, "kan.utils.f_arctanh", false], [32, "kan.utils.f_arctanh", false]], "f_exp() (in module kan.utils)": [[3, "kan.utils.f_exp", false], [32, "kan.utils.f_exp", false]], "f_inv() (in module kan.utils)": [[3, "kan.utils.f_inv", false], [32, "kan.utils.f_inv", false]], "f_inv2() (in module kan.utils)": [[3, "kan.utils.f_inv2", false], [32, "kan.utils.f_inv2", false]], "f_inv3() (in module kan.utils)": [[3, "kan.utils.f_inv3", false], [32, "kan.utils.f_inv3", false]], "f_inv4() (in module kan.utils)": [[3, "kan.utils.f_inv4", false], [32, "kan.utils.f_inv4", false]], "f_inv5() (in module kan.utils)": [[3, "kan.utils.f_inv5", false], [32, "kan.utils.f_inv5", false]], "f_invsqrt() (in module kan.utils)": [[3, "kan.utils.f_invsqrt", false], [32, "kan.utils.f_invsqrt", false]], "f_log() (in module kan.utils)": [[3, "kan.utils.f_log", false], [32, "kan.utils.f_log", false]], "f_power1d5() (in module kan.utils)": [[3, "kan.utils.f_power1d5", false], [32, "kan.utils.f_power1d5", false]], "f_sqrt() (in module kan.utils)": [[3, "kan.utils.f_sqrt", false], [32, "kan.utils.f_sqrt", false]], "f_tan() (in module kan.utils)": [[3, "kan.utils.f_tan", false], [32, "kan.utils.f_tan", false]], "fit_params() (in module kan.utils)": [[3, "kan.utils.fit_params", false], [32, "kan.utils.fit_params", false]], "fix_symbolic() (kan.symbolic_kanlayer.symbolic_kanlayer method)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer.fix_symbolic", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer.fix_symbolic", false]], "forward() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.forward", false], [32, "kan.KANLayer.KANLayer.forward", false]], "forward() (kan.symbolic_kanlayer.symbolic_kanlayer method)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer.forward", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer.forward", false]], "get_derivative() (in module kan.utils)": [[3, "kan.utils.get_derivative", false], [32, "kan.utils.get_derivative", false]], "get_subset() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.get_subset", false], [32, "kan.KANLayer.KANLayer.get_subset", false]], "get_subset() (kan.symbolic_kanlayer.symbolic_kanlayer method)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer.get_subset", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer.get_subset", false]], "initialize_grid_from_parent() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.initialize_grid_from_parent", false], [32, "kan.KANLayer.KANLayer.initialize_grid_from_parent", false]], "kan.kanlayer": [[3, "module-kan.KANLayer", false], [32, "module-kan.KANLayer", false]], "kan.lbfgs": [[3, "module-kan.LBFGS", false], [32, "module-kan.LBFGS", false]], "kan.spline": [[3, "module-kan.spline", false], [32, "module-kan.spline", false]], "kan.symbolic_kanlayer": [[3, "module-kan.Symbolic_KANLayer", false], [32, "module-kan.Symbolic_KANLayer", false]], "kan.utils": [[3, "module-kan.utils", false], [32, "module-kan.utils", false]], "kanlayer (class in kan.kanlayer)": [[3, "kan.KANLayer.KANLayer", false], [32, "kan.KANLayer.KANLayer", false]], "lbfgs (class in kan.lbfgs)": [[3, "kan.LBFGS.LBFGS", false], [32, "kan.LBFGS.LBFGS", false]], "model2param() (in module kan.utils)": [[3, "kan.utils.model2param", false], [32, "kan.utils.model2param", false]], "module": [[3, "module-kan.KANLayer", false], [3, "module-kan.LBFGS", false], [3, "module-kan.Symbolic_KANLayer", false], [3, "module-kan.spline", false], [3, "module-kan.utils", false], [32, "module-kan.KANLayer", false], [32, "module-kan.LBFGS", false], [32, "module-kan.Symbolic_KANLayer", false], [32, "module-kan.spline", false], [32, "module-kan.utils", false]], "sparse_mask() (in module kan.utils)": [[3, "kan.utils.sparse_mask", false], [32, "kan.utils.sparse_mask", false]], "step() (kan.lbfgs.lbfgs method)": [[3, "kan.LBFGS.LBFGS.step", false], [32, "kan.LBFGS.LBFGS.step", false]], "swap() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.swap", false], [32, "kan.KANLayer.KANLayer.swap", false]], "swap() (kan.symbolic_kanlayer.symbolic_kanlayer method)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer.swap", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer.swap", false]], "symbolic_kanlayer (class in kan.symbolic_kanlayer)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer", false]], "to() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.to", false], [32, "kan.KANLayer.KANLayer.to", false]], "to() (kan.symbolic_kanlayer.symbolic_kanlayer method)": [[3, "kan.Symbolic_KANLayer.Symbolic_KANLayer.to", false], [32, "kan.Symbolic_KANLayer.Symbolic_KANLayer.to", false]], "update_grid_from_samples() (kan.kanlayer.kanlayer method)": [[3, "kan.KANLayer.KANLayer.update_grid_from_samples", false], [32, "kan.KANLayer.KANLayer.update_grid_from_samples", false]]}, "objects": {"kan": [[32, 0, 0, "-", "KANLayer"], [32, 0, 0, "-", "LBFGS"], [32, 0, 0, "-", "Symbolic_KANLayer"], [32, 0, 0, "-", "spline"], [32, 0, 0, "-", "utils"]], "kan.KANLayer": [[32, 1, 1, "", "KANLayer"]], "kan.KANLayer.KANLayer": [[32, 2, 1, "", "__init__"], [32, 2, 1, "", "forward"], [32, 2, 1, "", "get_subset"], [32, 2, 1, "", "initialize_grid_from_parent"], [32, 2, 1, "", "swap"], [32, 2, 1, "", "to"], [32, 2, 1, "", "update_grid_from_samples"]], "kan.LBFGS": [[32, 1, 1, "", "LBFGS"]], "kan.LBFGS.LBFGS": [[32, 2, 1, "", "__init__"], [32, 2, 1, "", "step"]], "kan.Symbolic_KANLayer": [[32, 1, 1, "", "Symbolic_KANLayer"]], "kan.Symbolic_KANLayer.Symbolic_KANLayer": [[32, 2, 1, "", "__init__"], [32, 2, 1, "", "fix_symbolic"], [32, 2, 1, "", "forward"], [32, 2, 1, "", "get_subset"], [32, 2, 1, "", "swap"], [32, 2, 1, "", "to"]], "kan.spline": [[32, 3, 1, "", "B_batch"], [32, 3, 1, "", "coef2curve"], [32, 3, 1, "", "curve2coef"], [32, 3, 1, "", "extend_grid"]], "kan.utils": [[32, 3, 1, "", "add_symbolic"], [32, 3, 1, "", "augment_input"], [32, 3, 1, "", "batch_hessian"], [32, 3, 1, "", "batch_jacobian"], [32, 3, 1, "", "create_dataset"], [32, 3, 1, "", "create_dataset_from_data"], [32, 3, 1, "", "ex_round"], [32, 3, 1, "", "f_arccos"], [32, 3, 1, "", "f_arcsin"], [32, 3, 1, "", "f_arctanh"], [32, 3, 1, "", "f_exp"], [32, 3, 1, "", "f_inv"], [32, 3, 1, "", "f_inv2"], [32, 3, 1, "", "f_inv3"], [32, 3, 1, "", "f_inv4"], [32, 3, 1, "", "f_inv5"], [32, 3, 1, "", "f_invsqrt"], [32, 3, 1, "", "f_log"], [32, 3, 1, "", "f_power1d5"], [32, 3, 1, "", "f_sqrt"], [32, 3, 1, "", "f_tan"], [32, 3, 1, "", "fit_params"], [32, 3, 1, "", "get_derivative"], [32, 3, 1, "", "model2param"], [32, 3, 1, "", "sparse_mask"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "terms": {"": [2, 5, 6, 7, 8, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 31], "0": [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "00": [2, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31], "0000": [3, 8, 15, 22, 23, 32], "00014685209697567987": 20, "00015569770964015761": 20, "0002": [3, 32], "001": [17, 18, 20], "001766220055347071": 20, "0017847731212278354": 20, "0018364543204432066": 20, "002": 17, "0020": 8, "00294601553725477": 20, "0037939843087960545": 20, "0039": [3, 32], "004566344580739028": 20, "004774762578012783": 20, "00485182714170569": 20, "0053": [3, 32], "0060": 8, "007622899974849284": 20, "00e": [11, 15, 19, 20, 22, 26, 27], "00it": 22, "01": [2, 7, 8, 11, 12, 13, 14, 16, 17, 20, 21, 22, 23, 25, 26, 27, 31], "0100": 8, "01183480890790476": 20, "0175788804953916": 20, "01e": [11, 16, 19, 20, 22, 26], "01it": [19, 22, 26], "02": [2, 3, 11, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 31, 32], "020098020933420547": 20, "027514415570597788": 20, "029668332328004216": 20, "02e": [2, 11, 12, 16, 22, 31], "02it": 22, "03": [2, 5, 11, 14, 15, 16, 19, 20, 21, 22, 23, 26, 27, 31], "03e": [11, 13, 22], "03it": [2, 31], "04": [15, 16, 19, 20, 23, 26], "0454170453671914e": 20, "04e": [19, 20, 22], "04it": [22, 25], "05": [19, 20, 23, 26], "05e": [2, 20, 22, 26, 31], "05it": [22, 25], "06": [11, 19, 20, 22, 25, 26], "06e": [22, 26], "06it": [2, 22, 31], "07": [2, 3, 19, 20, 21, 22, 24, 26, 31, 32], "074556425958742e": 20, "07e": [7, 20, 22, 24, 26], "07it": [20, 22], "08": [3, 18, 21, 22, 23, 26, 32], "08315973336762218": 23, "08366297315238909": 23, "08e": [11, 22, 26, 27], "08it": 22, "09": [3, 22, 32], "09e": [11, 16, 22, 23], "09it": 22, "0x7f9211d28310": 21, "0x7f92658ae130": 21, "0x7fa93e7676a0": 9, "0x7fd438377a90": 22, "0x7fd49dd97160": 22, "0x7ff40b9ea430": 25, "1": [2, 5, 7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 20, 21, 23, 24, 25, 26, 27, 28, 29, 31], "10": [2, 3, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 31, 32], "100": [2, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "1000": [2, 3, 7, 8, 11, 21, 22, 26, 31, 32], "10000": 20, "100000": 7, "1001": 8, "101": [3, 22, 32], "1020": 8, "10407480103502795": 23, "10e": [21, 22], "10it": [22, 26], "11": [11, 12, 15, 22, 26, 27, 29], "11e": 22, "11it": 22, "12": [7, 11, 13, 15, 19, 29], "120": 21, "1218": 8, "12418544555819415": 23, "12435207425739554": 23, "1261090479694874e": 20, "12e": [11, 22, 23, 26], "12it": 22, "13": [3, 11, 21, 22, 29, 32], "1382": 8, "13e": [2, 15, 20, 22, 31], "13it": [22, 27], "14": [2, 17, 22, 26, 31], "14013671875": 22, "14159": 24, "14e": [11, 22, 26], "14it": 22, "15": [22, 25, 26, 27], "15e": [17, 19, 20, 22, 26], "15it": 22, "16": [11, 20, 24, 26, 27], "16e": [11, 13, 22], "16it": 22, "17": [22, 26], "172": 21, "17e": [19, 22, 23], "17it": 22, "18": [2, 24, 31], "1822506022370818": 23, "18e": [11, 19, 20, 22, 27], "18it": 22, "19": [13, 21, 22], "1954": 9, "19e": [16, 19, 22, 26], "19it": [20, 22], "1d": [2, 3, 7, 8, 9, 12, 13, 14, 20, 23, 25, 27, 31, 32], "1e": [3, 5, 12, 14, 16, 22, 24, 27, 32], "1e5": 26, "1e8": 26, "2": [2, 3, 5, 6, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 31, 32], "20": [2, 3, 5, 7, 9, 11, 12, 13, 14, 15, 16, 19, 20, 21, 22, 23, 24, 26, 27, 31, 32], "200": 25, "2000": [3, 8, 32], "2024": 11, "20e": [20, 22, 26], "20it": 22, "20x": 23, "21": [15, 20, 21, 24], "21051195154680438": 23, "21051195158162733": 23, "21e": [22, 26], "21it": [22, 27], "22": [2, 31], "2272": 8, "22e": [16, 22, 26], "22it": 22, "23": 22, "23e": 22, "23it": [11, 22, 26], "24": [20, 22], "24e": [11, 16, 22], "24it": [19, 22], "25": [3, 17, 24, 32], "25e": [11, 22], "25it": [22, 23], "26": [5, 26], "2667": 8, "2681378679614782": 23, "2695851370154267": 22, "26e": [20, 22, 25], "26it": 22, "27": [20, 22], "27e": [22, 26], "27it": 22, "28": 22, "2814546223704926": 22, "28e": [15, 22], "28it": [16, 19, 22], "29": [16, 21, 22], "2948244018433414": 22, "29e": [16, 17, 19, 22], "29it": 22, "2d": [2, 3, 7, 9, 12, 13, 14, 20, 22, 23, 24, 27, 31, 32], "2e": 24, "2n": [2, 31], "3": [2, 3, 5, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32], "30": [19, 20, 22, 23, 26], "300": [20, 25, 26], "3000": [5, 14, 20, 26], "3027": 21, "3060": 8, "30997176980589874": 22, "30e": [12, 13, 22, 26], "30it": 22, "31": 22, "3113": 21, "31e": [2, 7, 22, 31], "31it": [22, 26], "32": [3, 20, 24, 32], "3272398323990947": 22, "32e": [5, 19, 20, 22, 26], "32it": 22, "33": [16, 22], "3393": 8, "33e": [11, 22], "33it": [15, 22], "34": [20, 22, 26], "34705555016523576": 22, "3493": 8, "34e": [22, 26], "35": 22, "35e": [16, 22, 26], "35it": [22, 26], "36": [14, 21, 22], "3699525677002401": 22, "36e": [20, 22], "36it": 22, "37": [21, 22], "37e": [11, 15, 16, 22, 24], "37it": [17, 22, 26], "38": [20, 22, 26, 27], "38e": [22, 23, 24], "38it": [22, 23], "39": [21, 22], "3965991904252684": 22, "39e": [11, 15, 22], "39it": 22, "3d": [3, 32], "4": [2, 5, 12, 14, 16, 17, 19, 20, 21, 23, 24, 26, 28, 29, 31], "40": [19, 22, 23], "4000": [3, 32], "40e": [11, 16, 22, 23], "40it": 22, "41": [20, 22], "41e": [11, 20, 22, 26], "41it": [15, 22], "42": [11, 17, 20, 21, 22], "42783037973898724": 22, "42e": [22, 27], "42it": 22, "43": 22, "43e": [11, 22], "43it": 22, "44": 22, "44e": [22, 26], "44it": [11, 22, 26], "45": 22, "45e": [17, 22, 26, 27], "45it": [19, 22, 26], "46": [20, 22], "4646785423849215": 22, "46e": [22, 27], "46it": 22, "47": [16, 22], "4796": 8, "47e": [11, 20, 22], "47it": [22, 25], "48": [20, 22], "4870": 18, "4896": 8, "48e": [11, 22], "48it": [22, 26], "49": [22, 26], "49679878395526067": 23, "49e": 22, "49it": 22, "5": [2, 3, 5, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 22, 24, 25, 26, 27, 28, 29, 31, 32], "50": [2, 5, 14, 17, 18, 19, 20, 22, 23, 24, 26, 31], "500": 17, "508387788052642": 22, "50e": [11, 17, 19, 22], "50it": [11, 22], "51": [21, 22, 26], "5100": 8, "51e": [19, 22, 23], "51it": [11, 22], "52": 22, "52e": [11, 22], "52it": 22, "53": 22, "5376": 9, "53e": 22, "53it": 22, "54": 9, "54e": [11, 12, 15, 19, 22], "54it": [22, 26], "55": [20, 22], "55e": [13, 22], "55it": 22, "56": [21, 22], "56e": [7, 13, 20, 21, 22], "57": 21, "5708": 24, "5737221152646913": 23, "5763": [3, 32], "57e": [2, 20, 22, 31], "57it": [11, 22], "58e": [11, 21, 22], "58it": [11, 22], "59": 25, "59e": [13, 19, 22], "59it": [2, 11, 22, 31], "5e": [5, 14], "6": [8, 9, 15, 16, 17, 19, 20, 21, 22, 25, 26, 27, 28, 29], "6000": [3, 8, 32], "60e": [11, 22], "60it": 22, "6101756259771707": 23, "6137": 8, "61e": [22, 26], "61it": [13, 22], "62": 27, "62e": [19, 20, 22], "62it": 22, "63": 20, "6357": [3, 32], "63e": 22, "63it": [19, 22], "64e": 22, "64it": [7, 22], "65e": [11, 22, 26], "65it": [11, 13, 22], "66e": [11, 22], "66it": 22, "67e": [11, 18, 22, 23], "67it": [11, 22, 26], "68e": [11, 17, 22, 23], "68it": [12, 15, 22], "69": 20, "6978": [3, 32], "69e": [11, 15, 22, 26], "69it": [22, 25], "7": [2, 3, 5, 11, 14, 16, 17, 18, 19, 20, 22, 24, 26, 28, 29, 31, 32], "70": [16, 25], "7011": [3, 32], "7090268761989152": 23, "70e": [11, 22], "70it": [12, 15, 22, 27], "71e": [21, 22, 26], "71it": 22, "72e": [22, 26, 27], "72it": [22, 26], "73": 20, "73e": [15, 19, 20, 22], "73it": [22, 26], "74": [20, 25], "7494106253678943": 23, "74e": [2, 20, 22, 31], "74it": 22, "7541": 8, "75e": [20, 22, 27], "75it": 22, "76": 25, "76e": [15, 18, 20, 22, 23, 26], "76it": [11, 22], "77e": [11, 16, 20, 22, 26], "77it": 22, "7801497677237067": 21, "7882": [3, 32], "78e": [5, 11, 16, 20, 22, 26, 27], "78it": [16, 22, 27], "79": 21, "7906888762229085": 22, "79e": [20, 22, 26], "79it": [18, 22], "8": [3, 11, 16, 19, 22, 23, 27, 28, 29, 32], "8000": [3, 32], "80011712829603": 22, "807": 21, "8094804211038418": 22, "8099064637358544": 22, "80e": [2, 22, 23, 26, 31], "80it": 22, "81": 25, "81e": [20, 22, 26], "81it": 22, "8200102819209695": 22, "82e": 22, "82it": 22, "8303506225546471": 22, "8303828486153692": 21, "83e": 22, "83it": [22, 26], "8408048845759444": 22, "8428622193038047": 22, "8440367634049246": 22, "845004037750832": 22, "8450040982073312": 22, "8475": 9, "8476": [3, 32], "8493986649063162": 22, "84e": [20, 22], "84it": [21, 22], "85": [9, 27], "851363652171008": 22, "8529": 8, "8535224650797281": 22, "85398": 24, "854821484894479": 22, "8585390273680941": 22, "8594117556407576": 22, "85e": [11, 20, 22], "85it": [5, 22, 26], "8601324746874981": 22, "8601325311561702": 22, "8616859029524302": 22, "862391351818434": 22, "8631397517896181": 22, "8635381099424172": 22, "8635381682633535": 22, "86e": [19, 22, 26], "86it": [11, 22], "8738196605080718": 22, "8765425797595888": 22, "8769912910873774": 22, "87e": [22, 23], "87it": [19, 22], "8842948895377678": 22, "8848700744056857": 22, "8855949580343588": 22, "8865324039130013": 22, "8881789600114199": 22, "88e": [19, 22, 23, 26], "88it": 22, "89": 21, "8940": 8, "8974993831807665": 22, "89e": [5, 11, 14, 19, 22, 24, 26], "89it": [11, 22], "9": [3, 13, 15, 17, 18, 20, 21, 22, 28, 29, 32], "9002751610118467": 22, "9009688699792165": 22, "902215514501183": 22, "9043637756591075": 22, "9047220443136558": 22, "9075530370365199": 22, "908": 21, "9090404451604721": 22, "90e": [11, 22, 26], "90it": 22, "9112716246650874": 22, "916197691863038": 22, "9167827938895323": 22, "9172564495092251": 22, "9179859981970137": 22, "9184406012010798": 22, "9184406080128915": 22, "9195925986987522": 22, "9197221129892613": 22, "91e": [22, 26], "91it": 22, "92": [14, 27], "9212244844946261": 22, "921655835107275": 22, "9232648879118915": 22, "9237291936352401": 22, "9239128488596182": 22, "9251125534459796": 22, "9254006963892939": 22, "9268644000446836": 22, "9285991153021671": 22, "9297638765888608": 22, "92e": [18, 21, 22, 24], "92it": 22, "9302392302167873": 22, "9308710215935037": 22, "9311623016073874": 22, "9320312251409515": 22, "932694450295423": 22, "9329023836770476": 22, "933975094122013": 22, "9348151361956722": 22, "9351858394996657": 22, "9360582190339871": 22, "9362895855226272": 22, "9365762760176262": 22, "9369096690204137": 22, "936942764457975": 22, "9372183456949574": 22, "9372397600766894": 22, "93740817498461": 22, "9376915470857489": 22, "9377138311216435": 22, "9377603078924529": 22, "9380270364085883": 22, "9380462665721708": 22, "9381962721720656": 22, "9394860427747876": 22, "9396624038444488": 22, "93e": [11, 17, 22, 26], "93it": 19, "94": 21, "9400830044171552": 22, "9402041148610969": 22, "9403353142717915": 22, "9405877648417602": 22, "9422869570493372": 22, "9422994090520702": 22, "9426800819283715": 22, "9430687242552336": 22, "9434289429080119": 22, "9438827362855521": 22, "9445008625317239": 22, "9445956284973298": 22, "9448625902159359": 22, "9450165956953308": 22, "9455257642420224": 22, "9456250628531494": 22, "9468472932133176": 22, "9480750122921905": 22, "9497237037538462": 22, "9497276520343576": 22, "9497419182649224": 22, "949892059404306": 22, "94e": [22, 26, 27], "94it": 25, "95": 9, "9512847855771679": 22, "952288197814531": 22, "9530802418693475": 22, "9533594412300308": 21, "9534651069741744": 22, "9535787267982471": 21, "9547067294869719": 22, "9550": 9, "9559414617900991": 22, "9559851348570871": 22, "957514493788183": 22, "9582876791641027": 22, "9588682058685749": 22, "95e": [20, 22], "95it": [11, 22], "9600011409875004": 22, "9601566417330277": 22, "9605168885411256": 22, "960527319751894": 22, "9611248513995477": 22, "9620464258065169": 22, "9624423927207054": 22, "9636801162210671": 22, "963856710506799": 22, "9648688511956083": 22, "9648932341203752": 22, "9653653219988936": 22, "965461717507565": 22, "9660": 21, "9671692490974791": 22, "9673225582521513": 22, "9677166767908957": 22, "967722640360993": 22, "967966050300312": 21, "9690407199009088": 22, "9698770230380636": 22, "9699721931104404": 22, "96e": [22, 26], "96it": [17, 22, 23], "97": 20, "9700": 21, "9705633369555351": 22, "9707186857583728": 22, "9715243025795919": 22, "9716178500832297": 22, "9717763100936939": 23, "9717770596320756": 22, "9723468700787765": 24, "972913947729953": 22, "9740201843349593": 22, "9746783379118565": 22, "9752846715582264": 22, "9754127817001195": 22, "9756945249179574": 22, "9761222166037805": 22, "9764364382302457": 22, "9765461190280487": 22, "9766929896410047": 22, "977112955292746": 22, "9771995020822951": 22, "9772100499611249": 22, "9772535252536733": 22, "9773944419005031": 22, "9779176281844336": 22, "9779770648401149": 22, "9780411748220801": 22, "9783739534751957": 22, "9785902377362155": 22, "9787975107817283": 22, "9789559646121901": 22, "9790424824765466": 22, "9793534545721814": 22, "9795181094994256": 22, "979881475095261": 22, "9798815731174731": 22, "9798855202432393": 22, "97e": [20, 22, 26], "97it": [21, 22], "9801151730516574": 21, "9802089053769921": 22, "9805383456413282": 22, "9807409640082864": 22, "9808861574166389": 22, "981424420858435": 22, "9815": 8, "9815839509974684": 22, "9816962474224649": 22, "9823615338330297": 22, "9828804558908593": 22, "9830517375289431": 15, "9830640000050016": 15, "9830898307444438": 22, "9832997013656896": 22, "9833009867719864": 22, "983348154979657": 22, "983836484418377": 22, "9843196558672351": 22, "9844055428126749": 24, "9844552121850878": 22, "9844737269360767": 22, "9847797381605126": 22, "9849023647718247": 22, "985121456003004": 22, "9853279073610555": 22, "985345236582632": 22, "9854353082947718": 22, "9855351478460005": 22, "98563942691924": 22, "9859360750741196": 22, "9863604874844045": 22, "9865738449440605": 22, "986582711416683": 22, "9867104677131169": 22, "9867522256462564": 22, "9868026386831295": 22, "986829120472927": 22, "9870320319171259": 22, "9870493767685123": 22, "9871135812467379": 22, "9873681256920457": 22, "9873751146532993": 22, "9874565358732027": 22, "9874566180838149": 22, "9875208727310729": 22, "9876449536124641": 22, "9876782817075724": 22, "987762675373181": 22, "9878365883665239": 22, "987913942212583": 22, "9880298934280559": 22, "9882338451079785": 22, "9883627975330689": 22, "9884748093165208": 22, "9885210310683376": 22, "9888254509108924": 22, "9889704797728257": 22, "9890801101893518": 22, "9893409020756886": 22, "9895624276437505": 22, "9896743802302694": 22, "9896966425177599": 22, "9897729427792255": 22, "98e": [2, 22, 24, 26, 31], "98it": 22, "990205343640921": 22, "9907205081520056": 22, "9909835169112797": 22, "9910665391502297": 22, "9912197954445299": 22, "9913715887470934": 22, "9916259900602326": 22, "9916990159565282": 22, "9916999095855713": 22, "991738617202277": 22, "9918352264630244": 22, "9921522541074415": 22, "9922256134147542": 22, "9922364482738998": 22, "9922829131306503": 22, "992730560931046": 22, "9927325368990941": 22, "9928623326890238": 22, "9928952974445153": 7, "9929": 7, "9929134959392898": 22, "9932430068628105": 22, "9932659752647721": 22, "9934084524703305": 22, "9936057905336317": 22, "9936463187510403": 22, "9936582971043266": 22, "9937818028920754": 22, "9937913539713064": 22, "9938095927784649": 15, "9938672203947038": 22, "9939227717854873": 22, "9939812278070211": 22, "9939866829832639": 22, "9939912670589373": 22, "9941048878141949": 22, "9942754283755333": 22, "9942785952521871": 22, "9943901136276602": 22, "994405837621339": 22, "9944110485646586": 22, "9946613426702609": 22, "9947572943342223": 22, "9949107782356766": 22, "9949201894762312": 22, "9949371389273981": 22, "9949686832586251": 22, "9950291700743682": 22, "995078459413144": 22, "995255140131929": 22, "9952629708219127": 22, "9954045447762155": 22, "9954056127804757": 22, "995416161237695": 22, "9956440035977147": 22, "9957027344640318": 22, "995731717057559": 22, "9958206863529286": 22, "9958217326666846": 22, "9958802001000374": 22, "9958810456319825": 22, "9959025139156165": 22, "9959578952120252": 22, "9959631103992738": 22, "9959863127871974": 22, "9960274461980388": 22, "9961111289682559": 22, "9961768265523611": 22, "9962063866033833": 22, "9962099497478061": 22, "996256989539414": 15, "9962716348456105": 22, "9963078955424317": 22, "996308913203486": 22, "9963340407057836": 22, "9964682981271429": 22, "9964799073278351": 22, "9964947779569694": 22, "9966235714622826": 22, "9966420291540972": 22, "99664915970953": 22, "9968": 27, "9968394556850537": 27, "9968734504088798": 22, "9968744391727294": 22, "9968911992725868": 22, "9969431394468133": 22, "9969676978399866": 24, "9970616380122096": 22, "9970617106973462": 22, "9970989669443501": 22, "9971630293162339": 22, "9971996559803431": 22, "9972568796736283": 22, "997260680598509e": 20, "9973311148206122": 22, "9973507118333039": 6, "9973545677199919": 22, "9973752641583749": 22, "9974240586295893": 22, "9974491732032462": 24, "9974728070753829": 22, "9974772652014616": 22, "9975441981216764": 22, "9975488884124427": 22, "997561488327335": 22, "997562547933165": 22, "9975671382600958": 22, "9977962501289016": 22, "9977997203751177": 22, "9978271729275431": 22, "9978431561059808": 22, "9978692658702253": 22, "9978756985305871": 22, "9978791881996706": 24, "9978922471122651": 22, "9978931765377275": 22, "9979137733537407": 22, "9979264009346674": 22, "9979451890061467": 22, "9979460330489591": 22, "9979550584268881": 22, "9979566871598838": 22, "9979687146035487": 22, "9980799911419045": 22, "9980876045759569": 22, "9981": [3, 32], "9981093780355159": 22, "9981096381936067": 22, "9981115478889542": 22, "9981679237204564": 22, "9981948138629363": 22, "9982": [3, 32], "9982470612489773": 22, "9982635098451202": 22, "9982643783383393": 22, "998284128651733": 22, "998306797086686": 22, "9983499410484818": 22, "9983591814967973": 22, "9983639008937205": 24, "99837407546255": 22, "9984323316332249": 22, "9984339446779963": 22, "9984457355669536": 22, "9984509165908535": 22, "9984657428834645": 22, "998477650070286": 22, "998497783054037": 22, "998507365877467": 22, "9985227715662934": 22, "9985268503112813": 22, "998540782190707": 22, "9985534483580678": 22, "9985560043309399": 23, "998561267814873": 22, "9985646631915182": 22, "9985721495291437": 22, "9985870166410652": 22, "9986": 23, "9986097449347123": 22, "998618508248868": 22, "9986543793643053": 22, "998656639925584": 22, "998657149375774": 22, "9986571504172722": 22, "9986602848898886": 22, "9986633245000535": 22, "9987081345779585": 22, "9987167102775933": 22, "9987377926584199": 22, "9987539221752944": 22, "9987606438444635": 22, "9987635279928482": 22, "9987772391387374": 22, "9987944480619438": 22, "9988138920172807": 22, "998837883424404": 22, "998846633386868": 22, "9988544685797407": 22, "9988643627333774": 22, "998865199664262": 15, "9988653756689869": 22, "998871759377929": 22, "9988721445986375": 22, "9988728127858241": 22, "9988740875766842": 22, "9988859253126088": 22, "9988921913945791": 22, "9988973034727238": 22, "998905881229885": 22, "9989097397461996": 22, "9989290599804755": 22, "9989434205375304": 22, "9989441353410312": 22, "9989551972006018": 22, "9989573036832605": 22, "9989709402248369": 22, "9989811585960545": 22, "9989853642931659": 22, "9989945842715465": 22, "9990020609332764": 22, "9990030069449396": 22, "9990277391373628": 22, "9990436001283093": 22, "9990483455142343": 22, "9990671369324535": 22, "9990747506002051": 22, "9990779156635234": 22, "9990790086224685": 22, "9990823277390866": 22, "999088490162276": 22, "9991099365080184": 22, "9991201921166716": 22, "999120594481087": 22, "9991234483879446": 22, "9991252607520362": 22, "999137470112453": 22, "9991428566544741": 22, "999175206451367": 22, "9991760870939851": 22, "999179162081282": 22, "9991878132353741": 22, "9991909206588246": 22, "9991994724291818": 22, "9992094653374828": 22, "9992162433614376": 22, "9992177278915768": 22, "9992295248908697": 22, "9992301995166885": 22, "9992365904461334": 22, "9992376323441506": 22, "9992399109543574": 6, "9992413667649066": 22, "9992448590848789": 22, "9992662822226276": 22, "9992688918286982": 22, "9992737234348714": 22, "9992827278167005": 22, "9992837377086745": 22, "9992839638818944": 22, "9992854342507987": 22, "9992995819998103": 22, "9993158902101864": 22, "9993168732975628": 22, "9993467471612426": 22, "9993475620341137": 22, "9993505000566273": 22, "9993569516643317": 22, "9993615297170999": 22, "9993617636896577": 22, "9993731243691055": 22, "9993739474035951": 22, "9993792035049228": 22, "9993888581205067": 22, "9993950375881484": 22, "9994116683309964": 22, "9994371092496096": 22, "999448434641883": 22, "9994604176643853": 22, "9994637170628504": 22, "9994730789192812": 22, "999480532354729": 22, "9994826743156423": 22, "9994851357951505": 22, "9994862477413593": 22, "9994865919109623": 22, "9994936051757877": 22, "9994959364448105": 22, "9994994651669644": 22, "9995191008698547": 22, "9995430618744594": 22, "9995498634842791": 15, "9995568150249838": 22, "9995575032145757": 22, "9995602360489043": 6, "9995702405196035": 22, "9995754338853143": 22, "9995804083543193": 22, "9995835694860234": 22, "999585767134396": 22, "9995873145216307": 22, "9995937068570286": 22, "999597666676653": 22, "9996": [3, 32], "9996076211798797": 22, "9996077177342251": 22, "9996147714224425": 22, "9996162757398458": 22, "9996199310076759": 22, "9996263187286749": 22, "9996348080941417": 22, "999636745445751": 22, "9996382852712733": 22, "9996390145601096": 22, "9996456211560416": 22, "9996498645481074": 22, "9996537442008128": 22, "9996549423479186": 22, "9996559816500792": 22, "9996560303116143": 22, "9996561770567938": 22, "9996568552973389": 22, "9996579498087828": 22, "9996590283030754": 22, "9996615330714775": 22, "9996690041252987": 22, "9996700824962792": 22, "9996703332150525": 22, "999679958882009": 22, "9996830107874256": 22, "9996841983206314": 22, "9996922419099825": 22, "9996925240661405": 22, "9996973599778907": 22, "9997": [3, 32], "9997010374773055": 22, "9997042323555781": 22, "9997086093190996": 22, "9997096545485408": 22, "9997105669072212": 22, "9997113407524149": 22, "9997117036934391": 22, "9997131766871225": 22, "9997162974965994": 22, "9997168387512211": 22, "9997236129916397": 22, "9997259928372615": 22, "9997282247718177": 22, "9997292201760375": 22, "9997317587005629": 22, "9997376724009996": 22, "9997379079627818": 22, "9997446918456595": 22, "9997468080512466": 22, "9997514568009086": 22, "9997517092998544": 22, "9997517753887365": 22, "9997526274283742": 22, "9997532798065882": 22, "9997544064398111": 22, "9997548044475728": 22, "9997576089235269": 22, "9997595833681479": 22, "9997596795941941": 22, "9997599295163522": 22, "9997629877627796": 22, "9997651030691422": 22, "9997657565532695": 22, "9997659958370352": 22, "9997664875004227": 22, "9997669036986749": 22, "9997689201745247": 22, "9997728550720852": 22, "9997752175292851": 22, "9997784124877638": 22, "9997839395304963": 22, "9997851521886209": 22, "9997864168657743": 22, "999787323738521": 22, "9997878856454342": 22, "9997940227934969": 22, "9997949968711753": 22, "9997993496969405": 22, "9998030639266311": 22, "9998096068574465": 22, "9998097288010696": 22, "999812394838402": 22, "9998132139651115": 22, "9998135112170027": 22, "9998140271258696": 22, "9998163363479399": 22, "9998169466724585": 22, "9998195334563984": 22, "9998214259046335": 22, "9998219698585193": 22, "9998221482804251": 22, "9998233862273559": 22, "9998260034206992": 22, "9998279543178681": 22, "9998306455096987": 22, "999834148899939": 22, "9998352652530494": 22, "999836805899482": 22, "9998377031202675": 22, "9998436631999283": 22, "9998485210873531": 15, "999848705695026": 22, "999848886198266": 22, "9998507984084428": 22, "9998517198959569": 22, "9998527941960059": 22, "9998535744392626": 22, "9998540286212848": 22, "9998545572827711": 22, "9998593570241779": 22, "9998596147774699": 22, "9998600127039595": 22, "9998623405070776": 22, "9998636426802294": 22, "9998655818685623": 22, "9998682812651544": 22, "9998684985487326": 22, "9998698461072781": 22, "9998722722380837": 22, "9998727806292239": 22, "9998759476535651": 22, "9998776769631791": 22, "999878040103399": 22, "9998787853748133": 22, "9998795700743581": 22, "99988019998444": 22, "9998803010371731": 22, "9998822169169899": 22, "9998830954293118": 22, "9998836753524568": 22, "9998837024119729": 22, "9998837805081656": 22, "9998842247678139": 22, "9998843971854673": 22, "999886385951903": 22, "9998867957502443": 22, "9998877158288519": 22, "9998914314178492": 27, "999893422872044": 22, "9998957469235318": 22, "9998982872842133": 22, "9998987103013962": 22, "9999007440044174": 22, "9999033788427966": 22, "9999041816268858": 22, "9999043625986571": 22, "9999054264402666": 22, "9999055408903353": 22, "9999057877413986": 22, "9999059037181064": 22, "9999069779386928": 22, "9999091837427161": 22, "9999094157336442": 22, "999909483042181": 22, "9999096961395885": 23, "9999099009608192": 22, "9999121147442106": 22, "9999130489202535": 22, "9999132817985119": 22, "9999135788767782": 22, "999914407864863": 22, "9999145249443635": 22, "9999150645734015": 22, "9999154398628454": 22, "9999164116905525": 22, "9999174139339265": 23, "9999175944145272": 22, "9999177958840636": 22, "999917846530661": 22, "9999179925256542": 22, "9999185788926284": 22, "9999187437583558": 22, "9999191528924947": 22, "9999191931580688": 22, "9999195962429422": 22, "999920520242572": 22, "9999214589741492": 22, "9999215913152464": 22, "9999220769608526": 22, "9999226429006036": 22, "9999233338974699": 22, "9999233768388777": 22, "9999236487568766": 22, "999924500202756": 22, "9999245063324657": 22, "9999249439932951": 22, "9999250404431426": 22, "9999253640056137": 22, "9999260405306123": 22, "999926218584326": 22, "9999263142234696": 22, "999926363885015": 22, "9999277672142578": 22, "9999292279786546": 22, "9999299845850768": 22, "9999301819009739": 22, "9999305175966535": 22, "9999311426065755": 22, "9999314322918655": 22, "9999322662928528": 22, "9999324078991241": 22, "999933060918167": 22, "9999333905161271": 22, "9999334248881454": 22, "9999336923279952": 22, "9999340658950667": 22, "9999343640823076": 22, "999934739879401": 22, "9999347944113626": 22, "9999359202086953": 22, "9999359791634311": 22, "999936210582381": 22, "9999363993653761": 22, "9999367314200862": 22, "9999369992759012": 22, "9999370198218576": 22, "9999377574579958": 22, "9999378510072501": 22, "9999382587554829": 22, "9999383081018585": 22, "9999386215876175": 22, "9999388880060787": 22, "9999393123160958": 22, "9999403199854738": 22, "9999408710455521": 22, "9999411308602921": 6, "999941148365934": 22, "9999411945915794": 22, "9999412814570412": 22, "9999414756950388": 22, "9999416230314031": 22, "9999418178114038": 22, "9999421177337516": 22, "9999423526826876": 22, "9999424641676066": 22, "9999431335080622": 22, "9999431478128625": 22, "9999438604212395": 22, "9999447765899155": 22, "9999448387268524": 22, "9999450777771645": 22, "9999462038064604": 22, "9999473753358622": 22, "9999474340188654": 22, "9999479302673148": 22, "9999481583538449": 22, "999948450438625": 22, "9999484842856431": 22, "9999486876810368": 22, "9999492978808466": 22, "9999497922899572": 22, "9999506177136502": 6, "9999509121969333": 22, "999951727445816": 22, "9999517925552405": 22, "9999517925693375": 22, "9999518786252838": 22, "9999521118045746": 22, "9999521133602743": 22, "9999521920308199": 22, "9999522532756852": 22, "9999524925186463": 22, "9999524925435431": 22, "9999526296594224": 22, "9999527752253392": 22, "9999534848375812": 22, "9999536171672674": 22, "9999539297010896": 22, "9999541433147963": 22, "9999543237918428": 22, "9999544661515833": 22, "9999545031184953": 22, "9999551813924956": 22, "9999553343368358": 22, "9999556108208976": 22, "9999561449575607": 22, "9999562904170857": 22, "9999577735635269": 22, "9999585593099201": 22, "9999585866499787": 22, "9999591064202273": 22, "9999592519777621": 22, "9999593591292381": 22, "9999595824867687": 22, "9999606621811076": 22, "9999606621996252": 22, "9999608456659727": 22, "9999613659020306": 22, "9999623957580879": 22, "9999626403806093": 22, "9999631678786869": 22, "9999633902076488": 22, "9999637514193707": 22, "9999638602636551": 22, "9999642054598574": 22, "9999644813363999": 22, "9999646329733246": 22, "999964802453253": 22, "9999649555496989": 22, "999965455283627": 22, "9999658213074126": 22, "9999659993562859": 22, "9999662581221136": 22, "9999663092809886": 23, "9999670134850122": 22, "9999671472397126": 22, "9999672116732772": 22, "9999673825431549": 22, "999967486241568": 22, "9999678693890908": 22, "9999682142467496": 22, "9999683931970753": 22, "9999686012309674": 22, "9999689579268118": 22, "9999690179361935": 22, "9999693609882967": 23, "9999697464110736": 22, "9999699077016541": 23, "9999701323519831": 22, "9999701976776123": [3, 32], "9999712511423499": 22, "9999712618941392": 22, "9999713956244152": 22, "9999713985665561": 22, "9999716131493217": 22, "9999716645393338": 22, "9999719462457353": 22, "999972137087767": 22, "9999723043366056": 22, "9999726154715255": 22, "9999727010726929": [3, 32], "9999728460390712": 22, "9999730056399402": 22, "9999731551293094": 22, "999973163748351": 22, "9999738670223917": 22, "9999738708591638": 22, "9999745307384252": 22, "9999745650796973": 22, "9999745726295028": 22, "9999745891023756": 22, "9999746028947676": 22, "9999746546393077": 22, "9999749630672443": 22, "9999752362233539": 22, "999975403004672": 22, "9999756704785013": 22, "9999758615432004": 22, "9999760956345113": 22, "9999771001456361": 22, "9999772484086487": 22, "9999775858852623": 22, "99997811973606": 22, "9999781529177164": 22, "9999788713253935": 22, "9999789165976448": 22, "9999789216022107": 22, "9999791487269069": 22, "9999795491992056": 22, "9999796669306419": 22, "9999796806444573": 22, "9999798378098914": 22, "9999799131978417": 22, "9999799263714397": 22, "9999800294497047": 22, "9999802186534139": 23, "9999802936975296": 22, "9999803474424048": 22, "9999803638564161": 22, "9999804113519436": 22, "9999806264360336": 22, "9999807202372036": 22, "9999808836617524": 22, "9999809179819591": 22, "9999809889835496": 22, "9999811150224204": 22, "9999811871919927": 22, "9999821515315185": 22, "9999822360404783": 22, "9999826642402296": 22, "999982696239627": 22, "9999827145861027": 22, "999982771618615": 22, "9999829580110535": 22, "9999830308299852": 22, "9999835048772354": 22, "9999836112405796": 22, "9999837274020729": 22, "9999837287987492": 15, "9999837308133379": 15, "9999838323248553": 22, "9999839054191747": 22, "9999840061625307": 22, "9999841274399789": 22, "9999841395212624": 22, "9999842116986534": 22, "9999842278898873": 22, "9999842278946689": 22, "9999842858440444": 22, "9999843410323541": 22, "9999843962720248": 22, "999984517365484": 22, "9999845742894306": 22, "9999846769079466": 22, "9999847147948822": 22, "9999847406083843": 22, "9999848839841157": 22, "9999849501568968": 22, "9999849518514359": 22, "9999854490365007": 22, "9999854846669585": 22, "9999855256919693": 22, "9999856957320528": 22, "9999859303543726": 22, "9999861648364792": 22, "9999862674170232": 22, "9999862820440971": 22, "9999864664396515": 22, "9999865646301423": 22, "9999866880205311": 22, "9999870715347138": 22, "999987075018884": 22, "999987252534279": [2, 31], "9999872737863882": 22, "9999875880501998": 22, "9999877872886065": 22, "9999882011585163": 22, "9999885782292838": 22, "9999886905327071": 22, "999988712412588": 27, "9999888074224221": 22, "9999888112900659": 22, "9999889651827465": 22, "9999894819511871": 22, "9999896507243767": 22, "9999896926875822": 22, "999989739250175": 22, "9999897864586992": 22, "9999899485873852": 22, "9999899760530466": 22, "9999900693982379": 22, "9999901647899601": 22, "9999901865767792": 22, "9999902713620692": 22, "9999902923652078": 22, "9999903651856844": 22, "9999905018303474": 22, "999990707616756": 22, "9999909995161567": 22, "9999910667256126": 22, "9999910879853997": 22, "9999913264861179": 22, "999991537192374": 22, "9999916138797103": 22, "9999916591202906": 22, "9999916810769826": 22, "9999917592117541": 22, "9999919340015667": 22, "9999921393183026": 27, "9999924793158511": 22, "9999927495837864": 22, "9999928506457437": 22, "9999928603717329": 27, "9999930282260644": 22, "9999930298639131": 22, "9999930938197495": 22, "9999934337977243": 22, "999993562134913": 22, "9999936654595362": 22, "9999937207935639": 22, "9999940363902637": 22, "9999940727994734": 27, "9999941967836338": 22, "9999942564460803": 22, "9999943906884494": 22, "999994399261074": 22, "9999944249680105": 22, "9999944856461577": 22, "9999946575638085": 22, "9999949634057903": 22, "9999950270576494": 22, "9999950949412941": 22, "9999951134484997": 22, "9999953377679788": 22, "9999953796079631": 22, "9999954784528895": 22, "9999956722754607": 22, "9999959671234449": 22, "9999959867450359": 22, "9999960480978767": 22, "9999962146964306": 22, "9999962156472607": 22, "9999962624913747": 22, "9999962889824672": 22, "999996383890805": 22, "9999968986658919": 22, "9999970388609115": 22, "9999970458743549": 22, "9999971222660284": 22, "9999973837949323": 22, "9999974059407801": 22, "9999974755376599": 22, "9999974775415001": 22, "999997477547859": 22, "9999977984107461": 22, "9999978669498215": 22, "9999979009384041": 22, "9999981726743682": 22, "9999981866112407": 22, "9999982519802602": 22, "9999982596377558": 22, "9999982862472424": 22, "9999983352488726": 22, "9999983708153872": 22, "9999984333249491": 22, "9999987580912774": 22, "9999987855303939": 22, "9999988529417926": [2, 31], "9999988610586863": 23, "9999988787247418": 22, "9999988957805453": 22, "9999989595646115": 22, "9999990327979635": 22, "9999990354001381": 22, "9999992221865773": 15, "9999993202720766": 22, "9999993305928151": 22, "99999935535384": 22, "9999993678015309": 15, "9999993835845823": 22, "9999993945260922": 22, "9999995435772306": 22, "9999996254779309": 22, "9999996536741071": [2, 31], "9999996917196639": 22, "9999996930603142": 22, "9999997233652407": 22, "999999776416721": 22, "9999998145393945": 22, "9999998722503725": 22, "9999999273977364": 22, "9999999292547446": 22, "9999999483032596": 22, "9999999767252477": 22, "9999999902142925": 22, "9999999998837575": 22, "9999999999827017": 22, "9999999999827021": 22, "9999999999999639": 22, "99e": [14, 21, 22, 25], "99it": [22, 26], "A": [2, 3, 13, 31, 32], "And": 17, "But": [8, 22, 26, 27], "By": [7, 8], "For": [6, 8, 10, 12, 22], "If": [3, 7, 9, 14, 22, 32], "In": [2, 5, 6, 15, 16, 17, 18, 19, 22, 25, 26, 31], "It": [13, 22], "No": 26, "One": [8, 22], "The": [1, 2, 3, 7, 8, 9, 11, 13, 17, 19, 20, 22, 23, 24, 25, 31, 32], "Then": [2, 31], "There": [1, 8, 16], "These": 22, "_": [2, 24, 31], "_0": [2, 31], "_1": [2, 7, 31], "__init__": [3, 32, 33], "_base": [8, 10], "_c": 23, "_fun": 10, "_func_sum": 24, "_l": [2, 31], "_scale": 10, "_sp": [8, 10], "_special": 23, "a_arr": 22, "a_best": [3, 32], "a_rang": [3, 23, 32], "ab": [2, 21, 22, 23, 31], "abil": 19, "about": [8, 16, 22], "abov": [12, 13, 27], "absolut": 11, "acc": 21, "accord": 8, "accur": 21, "accuraci": [22, 30], "achiev": [10, 16], "across": 17, "act_fun": [6, 8], "action": 30, "activ": [2, 3, 7, 8, 10, 12, 15, 16, 17, 18, 20, 22, 24, 28, 30, 31, 32], "active_neurons_id": 12, "actual": 22, "ad": 23, "adam": 13, "adapt": 8, "add": [1, 3, 7, 8, 23, 32], "add_symbol": [3, 23, 27, 32, 33], "addit": [2, 3, 7, 8, 29, 31, 32], "adjust": 8, "advanc": 30, "affect": 11, "affin": [3, 15, 24, 32], "after": [2, 3, 7, 19, 22, 23, 24, 25, 31, 32], "again": [13, 23], "aim": 24, "algorithm": [3, 32], "all": [3, 5, 6, 7, 8, 10, 13, 17, 22, 24, 25, 32], "allow": [3, 32], "almost": [2, 10, 22, 31], "along": [3, 6, 16, 24, 32], "alpha": [7, 22, 24, 25], "alreadi": [3, 8, 23, 27, 32], "also": [9, 12, 16, 22], "altern": 30, "although": 16, "alwai": 26, "among": 17, "an": [2, 3, 10, 18, 20, 22, 31, 32], "analysi": 22, "ani": [3, 32], "anoth": [3, 16, 17, 22, 32], "anyth": 23, "api": 30, "appear": [22, 23], "append": [14, 20, 25], "appli": [3, 8, 32], "approxim": [8, 22], "ar": [1, 2, 3, 6, 7, 8, 9, 10, 12, 15, 16, 17, 22, 24, 30, 31, 32], "arang": [8, 25], "arbitrari": [2, 20, 31], "arcsin": [15, 22, 23], "arctan": [15, 22, 23], "arctanh": [15, 22, 23], "argmax": 21, "argsort": 9, "argument": [5, 14, 22], "arnold": [1, 20], "around": [22, 25], "arrai": [3, 19, 20, 21, 26, 32], "arri": [3, 32], "assert": 8, "astyp": 21, "atanh": 15, "augment": [2, 31], "augment_input": [3, 32, 33], "auto": [2, 31], "auto_symbol": [2, 21, 22, 23, 27, 31], "autograd": 24, "automat": [2, 21, 31], "aux_var": [3, 32], "awai": 12, "ax": [3, 32], "axesimag": 22, "b": [3, 8, 10, 32], "b_": 8, "b_arr": 22, "b_batch": [3, 8, 32, 33], "b_best": [3, 32], "b_i": 8, "b_rang": [3, 32], "backward": 24, "bad": 22, "base": [3, 7, 8, 10, 16, 32], "base_fun": [3, 10, 13, 16, 32], "basi": [3, 8, 32], "batch": [3, 17, 21, 24, 32], "batch_hessian": [3, 32, 33], "batch_jacobian": [3, 24, 32, 33], "bc": 24, "bc_loss": 24, "bc_pred": 24, "bc_true": 24, "becaus": 23, "becom": [7, 8, 19, 22], "befor": [3, 32], "begin": [2, 31], "behavior": 15, "below": [2, 7, 11, 17, 22, 31], "benefit": 26, "besid": 16, "bessel": [3, 23, 32], "bessel_j0": [3, 23, 32], "best": [3, 7, 24, 32], "beta": [2, 6, 7, 9, 14, 15, 16, 17, 18, 20, 24, 31], "better": [13, 30], "bettom": 23, "between": [3, 8, 32], "bf": [2, 31], "bfg": [3, 32], "bias": 22, "bias_train": 25, "big": 16, "bigger": 23, "binari": [2, 31], "black": [19, 20, 25, 26], "bool": [3, 32], "both": [2, 3, 7, 12, 13, 15, 20, 30, 31, 32], "bottom": 6, "bound": [2, 8, 31], "boundari": [3, 7, 24, 32], "break": [3, 10, 32], "bug": 27, "build": 14, "built": [3, 8, 32], "byte": [3, 32], "c": [3, 21, 32], "c_best": [3, 32], "c_i": 8, "call": [2, 3, 31, 32], "callabl": [3, 32], "can": [1, 2, 3, 9, 10, 11, 12, 14, 15, 16, 17, 19, 23, 24, 25, 26, 31, 32], "cannot": 13, "captur": 22, "care": 22, "case": [2, 5, 8, 10, 12, 22, 27, 31], "cat": [17, 24], "caveat": [22, 24], "cd": [1, 30], "cdot": [2, 31], "center": 25, "cf": [3, 32], "chang": [3, 8, 20, 22, 30, 32], "check": [6, 8, 23], "checkpoint": 28, "choic": 13, "circ": [2, 31], "ckpt1": 13, "ckpt2": 13, "ckpt3": 13, "class": [3, 22, 32], "classif": [17, 29], "clean": 22, "cleaner": 13, "clear": [22, 26], "clear_ckpt": 13, "clip": 14, "clone": [1, 30], "close": 27, "closur": [3, 24, 32], "cnn": 1, "co": [18, 22], "coarser": [3, 32], "coef": [3, 6, 8, 32], "coef2curv": [3, 32, 33], "coeffcient": [3, 32], "coeffici": [3, 8, 10, 16, 32], "col": [3, 32], "collect": [7, 10, 21, 25], "color": [19, 20, 22, 25, 26], "com": 30, "combin": 8, "common": 13, "competit": 22, "complet": 20, "complex": 26, "composit": [2, 20, 31], "comput": [13, 22], "concept": 18, "condit": [3, 24, 32], "connect": [2, 7, 31], "consid": [8, 12, 18, 27], "constrain": 22, "constrast": [2, 31], "construct": [2, 23, 27, 31], "contain": [3, 6, 8, 22, 23, 27, 32], "content": 33, "continu": [2, 29, 31], "contrain": 22, "control": 7, "contruct": 17, "convent": 9, "converg": 10, "convert": [3, 32], "copi": 17, "corner": [6, 15], "correct": [21, 22, 23], "correl": 22, "correspond": [2, 3, 31, 32], "corrupt": 17, "cosh": [22, 23], "could": [8, 22], "counter": [3, 32], "cover": 19, "cpu": [3, 5, 24, 32], "creat": [2, 3, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, 31, 32], "create_dataset": [2, 3, 5, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 26, 27, 31, 32, 33], "create_dataset_from_data": [3, 32, 33], "create_graph": [3, 24, 32], "crossentropi": 21, "crossentropyloss": 21, "cubic": [2, 7, 9, 12, 13, 14, 20, 22, 23, 27, 31], "cuda": 5, "current": [3, 32], "curv": [3, 32], "curve2coef": [3, 32, 33], "d": [3, 32], "d_best": [3, 32], "data": [3, 8, 18, 22, 26, 32], "data_s": 26, "dataset": [2, 3, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 31, 32], "datatset": 21, "deep": [16, 29], "deepcopi": 17, "deeper": 16, "def": [17, 21, 22, 24], "default": [3, 5, 7, 8, 10, 11, 12, 22, 23, 32], "defin": [2, 7, 17, 24, 31], "degener": 10, "degeneraci": [3, 32], "degrad": 15, "demo": 30, "demonstr": [16, 22], "dens": 22, "depend": 17, "depth": [2, 6, 16, 20, 31], "deriv": [3, 22, 32], "desc": 24, "descript": 24, "detach": [8, 24, 25], "detail": 12, "determin": [3, 15, 32], "devic": [3, 28, 32], "devicd": [3, 32], "diagon": 24, "diagram": 9, "dic": [3, 22, 32], "dict_kei": [22, 23], "did": 13, "diff": 22, "differ": [3, 11, 12, 25, 32], "differenti": 29, "dim": [17, 21, 24], "dim1": 24, "dim2": 24, "dimens": [3, 21, 24, 32], "discov": 17, "displai": [19, 26], "displaystyl": [2, 15, 21, 22, 23, 24, 27, 31], "distribut": [7, 8], "do": [7, 20, 22, 25], "doe": [8, 15, 20, 22, 23, 27], "doesn": [3, 32], "domain": [2, 31], "don": [8, 12, 16], "done": 14, "down": [13, 16, 22], "draw": 10, "drawn": 10, "drop": 19, "dtype": [18, 22], "due": [2, 31], "dynam": [14, 19], "e": [1, 2, 8, 10, 22, 23, 30, 31], "each": [2, 6, 8, 9, 10, 12, 24, 25, 31], "earli": 23, "easi": 22, "easili": [2, 22, 31], "edg": [2, 9, 12, 20, 30, 31], "effici": 12, "einsum": [3, 8, 32], "either": [3, 22, 32], "element": [3, 32], "elif": [2, 31], "els": [5, 20, 24], "emb": 8, "empti": 22, "encourag": 29, "end": [2, 3, 22, 31, 32], "endswith": 14, "enough": [16, 27], "epsilon": 22, "equal": 17, "equat": 29, "equival": 15, "especi": 22, "evalu": [3, 32], "evalud": [3, 32], "even": [10, 19, 20, 22], "everi": [2, 22, 31], "ex1": [3, 32], "ex_round": [3, 32, 33], "exactli": 10, "exampl": [2, 6, 8, 10, 30, 31], "exist": 22, "exp": [2, 3, 5, 7, 11, 12, 13, 14, 16, 17, 19, 20, 21, 23, 25, 26, 31, 32], "express": [2, 31], "extend": [3, 32], "extend_grid": [3, 32, 33], "extens": [3, 32], "extra": [3, 32], "extract": [22, 28], "extrem": [3, 32], "f": [2, 3, 5, 7, 11, 12, 13, 14, 15, 16, 18, 19, 20, 23, 24, 26, 27, 31, 32], "f_arcco": [3, 32, 33], "f_arcsin": [3, 32, 33], "f_arctanh": [3, 32, 33], "f_exp": [3, 32, 33], "f_inv": [3, 32, 33], "f_inv2": [3, 32, 33], "f_inv3": [3, 32, 33], "f_inv4": [3, 32, 33], "f_inv5": [3, 32, 33], "f_invsqrt": [3, 32, 33], "f_log": [3, 32, 33], "f_mode": [3, 32], "f_power1d5": [3, 32, 33], "f_sqrt": [3, 32, 33], "f_tan": [3, 32, 33], "fals": [3, 15, 17, 18, 24, 25, 27, 32], "fan": [3, 32], "fast": 10, "featur": [8, 17], "figsiz": 25, "figur": [7, 17], "file": 14, "final": 15, "find": [3, 16, 22, 25, 32], "fine": [19, 22], "finer": 19, "finish": 23, "finit": [2, 31], "first": [1, 3, 6, 7, 8, 10, 15, 21, 24, 32], "fit": [3, 22, 29, 32], "fit_param": [3, 32, 33], "fit_params_bool": [17, 18], "five": 25, "fix": [2, 3, 11, 21, 22, 23, 24, 26, 27, 31, 32], "fix_symbol": [2, 3, 6, 7, 15, 17, 18, 22, 23, 24, 27, 31, 32, 33], "float": [3, 18, 21, 32], "float32": 18, "float64": 21, "floating_digit": 24, "follow": [2, 22, 31], "foot": 17, "form": [2, 31], "format": [8, 17], "formula": [2, 3, 15, 21, 23, 24, 27, 29, 31, 32], "formula1": 21, "formula2": 21, "forward": [3, 7, 8, 10, 32, 33], "found": 1, "fp": 14, "frac": [15, 18], "fractal": [20, 22], "from": [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "from_numpi": 21, "frustrat": 13, "fulli": [2, 31], "fun": [3, 13, 22, 32], "fun_nam": [3, 32], "fun_singular": [3, 32], "func": [3, 24, 32], "function": [2, 3, 7, 8, 10, 15, 20, 24, 25, 28, 29, 30, 31, 32], "funs_nam": [3, 6, 32], "funs_sympi": [3, 32], "further": [13, 24], "futur": [3, 22, 32], "g": [3, 8, 10, 15, 17, 18, 19, 22, 26, 32], "game": 13, "gaurante": 10, "gaussian": [15, 17, 22, 23, 25], "gausssian": 17, "gener": [2, 20, 31], "generaliz": 22, "generate_contrast": 17, "get": [1, 3, 15, 32], "get_deriv": [3, 32, 33], "get_rang": 9, "get_subset": [3, 32, 33], "git": [1, 30], "github": 1, "give": [8, 9, 17, 27], "given": [3, 15, 32], "global": 24, "go": [16, 22], "goal": 25, "goe": 22, "good": [10, 19, 22], "grad_fn": [8, 15, 23, 27], "grain": 19, "graph": 13, "graviti": 22, "grid": [2, 3, 5, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32], "grid_ep": [3, 8, 24, 32], "grid_num": [3, 32], "grid_numb": [3, 32], "grid_rang": [3, 22, 32], "grid_siz": 26, "ground": [23, 24, 27], "group": [3, 17, 32], "group_id": 25, "grudual": 16, "guess": 22, "ha": [22, 25, 26], "happen": 8, "happi": [22, 27], "harm": 26, "have": [2, 3, 5, 8, 12, 14, 17, 20, 22, 25, 30, 31, 32], "heavili": [3, 32], "hello": 30, "help": 11, "helper": 24, "henc": [12, 22], "here": [1, 8], "hessian": [3, 32], "hidden": [2, 6, 7, 9, 12, 13, 14, 20, 22, 23, 27, 31], "hiddenl": 12, "high": 22, "histori": [3, 32], "history_s": [3, 24, 32], "hope": 22, "hopefulli": 22, "how": [3, 8, 11, 16, 17, 19, 21, 32], "howev": [2, 8, 12, 31], "hspace": 25, "http": 30, "hyperparamet": [3, 11, 32], "hyperparamt": 28, "hypothesi": 15, "hypreparam": 24, "i": [1, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 30, 31, 32], "i1": [3, 32], "i2": [3, 32], "id": [3, 32], "idea": 17, "ideal": 26, "ident": [3, 10, 32], "ij": [3, 8, 24, 32], "illustr": [9, 10], "imag": 22, "image_fil": 14, "image_fold": 14, "imagesequenceclip": 14, "img": 22, "img_fold": 14, "implement": [3, 8, 23, 32], "implicitli": 17, "implment": 22, "import": [2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31], "improv": [3, 32], "imshow": 22, "in_dim": [3, 6, 32], "in_id": [3, 32], "in_var": [7, 14, 17], "inact": 12, "includ": [20, 23], "incom": [3, 7, 12, 32], "incorpor": 22, "increas": 26, "inde": 8, "independ": [10, 17], "index": [1, 9, 14, 24, 28, 30], "indic": 6, "induct": 22, "inform": [3, 32], "initi": [2, 3, 7, 8, 15, 19, 26, 28, 31, 32], "initialize_from_another_model": [19, 20, 26], "initialize_grid_from_par": [3, 32, 33], "inject": [3, 32], "inner": 20, "input": [2, 3, 6, 7, 9, 12, 13, 14, 15, 17, 20, 22, 23, 27, 31, 32], "insight": 22, "insignific": 7, "inspir": [3, 30, 32], "instal": 1, "instead": [16, 17, 25, 27], "int": [3, 14, 32], "intens": [3, 32], "interdepend": 17, "interest": 9, "interior": 24, "interleav": [2, 31], "interpol": [3, 8, 32], "interpret": [11, 12, 30], "interv": [2, 3, 7, 8, 9, 12, 13, 14, 20, 22, 23, 27, 31, 32], "intial": [13, 15, 17, 18, 19], "introduc": 9, "intuit": 9, "involv": 23, "io": 14, "is_avail": 5, "isdigit": 14, "isn": 23, "issu": 22, "item": 20, "iter": [3, 19, 32], "its": [2, 7, 12, 22, 31], "j": [3, 6, 8, 9, 22, 24, 26, 32], "j0": 23, "j_": 23, "j_0": 23, "jacobian": 24, "jpg": 14, "jupyt": 16, "just": [10, 12, 13], "justifi": 15, "k": [2, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "k_extend": [3, 32], "ka": 20, "kan": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 27, 29, 33], "kanlay": 33, "kanlayer_larg": [3, 32], "kanlayer_smal": [3, 32], "keep": [2, 31], "keepdim": 24, "kei": [22, 23], "kept": 12, "keyerror": [3, 32], "kindxiaom": 30, "know": [15, 16], "known": 8, "kolmogorov": 20, "kwarg": [3, 32], "l": [2, 3, 6, 9, 19, 20, 26, 31, 32], "l1": [7, 12], "l2": 24, "label": [3, 32], "lamb": [2, 3, 5, 7, 11, 12, 13, 14, 16, 17, 18, 20, 22, 23, 27, 31, 32], "lamb_coef": 16, "lamb_entropi": [2, 3, 5, 7, 11, 12, 13, 14, 17, 18, 20, 22, 23, 27, 31, 32], "lamb_l1": [3, 32], "lambda": [2, 3, 5, 7, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 26, 27, 31, 32], "lap": 24, "larg": [10, 13, 22, 23], "larger": [3, 7, 26, 32], "last": [17, 18], "lastest": 13, "later": 27, "latest": 1, "law": [19, 29], "layer": [2, 8, 9, 12, 15, 17, 24, 30, 31], "lbfg": [2, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 33], "learn": [3, 18, 22, 29, 32], "least": [3, 20, 22, 32], "leav": 12, "left": [2, 6, 15, 20, 21, 22, 23, 24, 27, 31], "legend": [8, 19, 20, 26], "len": [3, 20, 22, 32], "length": 24, "less": 22, "let": [2, 6, 8, 11, 12, 15, 16, 21, 22, 23, 27, 31], "level": 22, "leverag": 19, "lib": [2, 21, 22, 31], "libarari": 22, "librari": [3, 22, 23, 32], "like": 22, "limit": [2, 31], "line": [7, 9], "line2d": 9, "line_search_fn": [3, 24, 32], "linear": [2, 8, 10, 24, 29, 31], "link": 1, "linspac": [3, 8, 22, 24, 25, 32], "list": [3, 15, 22, 23, 32], "listdir": 14, "load": [11, 13], "load_ckpt": 13, "loc": 20, "local": [22, 25], "lock": [3, 29, 32], "lock_count": [3, 32], "lock_id": [3, 32], "log": [2, 19, 20, 21, 22, 23, 24, 26, 27, 31], "logit1": 21, "logit2": 21, "look": [8, 13, 15, 22], "loss": [2, 3, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "loss_fn": 21, "loss_mod": [3, 32], "lower": [19, 20], "lr": [3, 24, 27, 32], "lucki": 27, "machin": [2, 15, 22, 23, 24, 31], "magnitud": [3, 11, 32], "mai": [2, 8, 9, 11, 22, 31], "make": [6, 11, 12, 13, 16, 19, 22, 30], "make_moon": 21, "mangitud": [3, 32], "mani": [3, 32], "manual": [2, 20, 31], "margin": 8, "marker": [9, 19, 20, 26], "mask": [2, 3, 6, 7, 11, 31, 32], "match": [8, 22, 23, 26], "mathbb": [2, 31], "matplotlib": [8, 9, 20, 21, 22, 24, 25], "matrix": [2, 31], "max": 12, "max_ev": [3, 32], "max_it": [3, 32], "maxim": [3, 32], "maximimz": 19, "mean": [3, 6, 8, 15, 18, 21, 22, 24, 32], "meanbackward0": 8, "memori": [3, 32], "mesh": 24, "meshgrid": 24, "mess": 13, "method": 14, "metric": 21, "might": [20, 22], "minfunc": [3, 32], "minim": [3, 16, 32], "mlp": [2, 30, 31], "mode": [2, 3, 7, 12, 31, 32], "model": [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "model2": [7, 19], "model2param": [3, 32, 33], "model_ckpt": 13, "model_output": 8, "modul": [1, 30, 33], "moon": 21, "more": [2, 3, 7, 9, 12, 19, 22, 26, 31, 32], "moviepi": 14, "mp4": 14, "mse": 21, "much": 20, "multi": [2, 30, 31], "multivari": [2, 31], "my": [7, 8], "n": [2, 7, 10, 19, 20, 26, 31], "n_": [2, 10, 31], "n_class": 22, "n_digit": [3, 32], "n_num_per_peak": 25, "n_param": [19, 20], "n_peak": 25, "n_sampl": [21, 25], "n_var": [2, 3, 5, 7, 11, 12, 13, 14, 15, 16, 18, 19, 20, 22, 23, 26, 27, 31, 32], "nabla": 24, "name": [3, 7, 23, 32], "nan": 27, "need": [8, 10, 13, 14, 22, 23], "neg": 17, "negtiv": 17, "network": [8, 12, 22], "neural": [8, 12, 19], "neuron": [2, 3, 7, 9, 12, 13, 14, 20, 22, 23, 27, 31, 32], "new": 1, "newton": 22, "nn": [3, 8, 13, 21, 25, 32], "node": [3, 10, 12, 30, 32], "nois": [3, 10, 21, 32], "noise_scal": [3, 10, 25, 32], "noise_scale_bas": [9, 10, 11, 17, 24], "noisi": 10, "non": [8, 10, 17, 20], "none": [3, 8, 17, 21, 22, 25, 32], "nonlinear": [2, 31], "norm": [7, 12], "normal": [3, 6, 8, 9, 10, 22, 32], "normalize_input": [3, 32], "normalize_label": [3, 32], "note": [12, 22], "notebook": [9, 16], "notic": [2, 15, 22, 31], "now": [3, 8, 11, 13, 15, 19, 20, 22, 23, 24, 32], "np": [3, 8, 9, 14, 19, 20, 21, 22, 25, 26, 32], "np_b": 24, "np_i": 24, "num": [3, 22, 32], "num_grid_interv": [3, 32], "num_pt": 22, "num_sampl": [3, 32], "num_splin": [3, 32], "numbef": [3, 32], "number": [3, 7, 8, 10, 19, 24, 32], "numer": 7, "numpi": [8, 14, 20, 21, 24, 25], "o": [9, 14, 19, 20, 26], "observ": 26, "obtain": [2, 8, 22, 31], "onc": 25, "one": [3, 6, 12, 13, 14, 16, 22, 25, 26, 32], "ones": [3, 17, 32], "onli": [2, 3, 7, 8, 12, 14, 25, 31, 32], "open": 22, "oper": [2, 31], "operatornam": 15, "opt": [2, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 31], "optim": [3, 24, 32], "option": [3, 8, 32], "order": [3, 8, 9, 23, 32], "orig_var": [3, 32], "origin": [2, 22, 31], "orign": 20, "other": [2, 5, 8, 17, 22, 31], "otherwis": 25, "ouput": 15, "our": [8, 15, 23, 25], "out": [2, 3, 8, 17, 24, 31, 32], "out_dim": [3, 6, 32], "out_id": [3, 32], "out_var": [7, 14], "outer": 20, "outgo": [7, 12], "output": [2, 3, 6, 7, 8, 9, 12, 13, 14, 17, 20, 21, 22, 23, 27, 31, 32], "over": [3, 8, 13, 22, 32], "p": [2, 31], "packag": 33, "page": [1, 30], "paper": [1, 12, 30], "param": [3, 19, 26, 32], "param_byt": [3, 32], "paramet": [3, 6, 7, 8, 14, 22, 24, 32], "parametr": 8, "parent": [3, 32], "parent_model": [3, 32], "part": 8, "partial": 29, "partit": [3, 32], "pass": [5, 14, 20, 22], "pathcollect": [21, 25], "pbar": 24, "pde": [10, 22, 29], "pde_loss": 24, "peak": 25, "penal": 16, "peopl": 22, "per": [3, 32], "percentil": [3, 32], "perceptron": [2, 31], "perform": [3, 16, 20, 26, 32], "period": 22, "permut": [17, 24], "phase": [25, 29], "phi": [2, 7, 8, 10, 31], "phi_": [2, 31], "phi_1": [2, 31], "phi_q": [2, 31], "pi": [2, 3, 5, 7, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 24, 26, 31, 32], "piecewis": [3, 32], "pip": [1, 30], "place": [2, 31], "plai": 13, "plateau": 19, "pleas": 10, "plot": [2, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 31], "plt": [8, 9, 19, 20, 21, 22, 24, 25, 26], "plu": 8, "pmatrix": [2, 31], "point": [3, 24, 27, 32], "poisson": 24, "polynomi": [3, 32], "posit": 17, "postact": [3, 32], "postactiv": [3, 32], "postprocess": 22, "postsplin": [3, 32], "power": [2, 22, 26, 31], "preact": [3, 32], "preactiv": [3, 32], "preceptron": 30, "precis": [2, 15, 22, 23, 24, 31], "pred": [3, 32], "predict": [22, 25], "prefer": 22, "prensent": 25, "presenc": 22, "present": 25, "previou": 25, "previous": 11, "print": [3, 5, 6, 8, 20, 21, 24, 26, 32], "probabl": 13, "problem": [17, 21, 22, 27], "promis": [13, 30], "proper": 7, "properli": 8, "provid": [3, 8, 12, 13, 22, 32], "prune": [2, 3, 7, 11, 13, 16, 22, 23, 27, 28, 31, 32], "pump": 13, "purn": 7, "purpl": 7, "pykan": 30, "pyplot": [8, 9, 20, 21, 24, 25], "pytorch": 23, "q": [2, 31], "quad": [2, 31], "quadrat": 22, "quantit": 9, "quick": 13, "quickstart": 30, "quit": [16, 22, 24], "r": [2, 7, 14, 17, 19, 20, 26, 30, 31], "r2": [2, 3, 6, 7, 15, 21, 22, 23, 24, 27, 31, 32], "r2_best": [3, 32], "radnom": 24, "rand": [17, 22, 24], "random": [3, 17, 22, 24, 25, 32], "random_st": 21, "randperm": 17, "rang": [3, 6, 8, 9, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 32], "rank": 9, "rapid": 15, "rate": [3, 32], "reach": [22, 23, 24], "readi": 14, "realiz": 13, "reason": 22, "recommend": 10, "recov": 13, "red": [6, 7], "rediscov": 15, "redo": 22, "reduc": [3, 22, 32], "reevalu": [3, 32], "refer": 6, "refin": 19, "reg": [2, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 31], "reg_metr": [3, 32], "regim": 8, "region": 8, "regress": [15, 23, 29], "regular": [2, 7, 11, 13, 31], "rel": 29, "relat": [14, 17], "relavit": 15, "relev": 16, "remain": 15, "remind": 8, "remov": [6, 7, 12, 20], "remove_edg": [12, 20], "remove_nod": [6, 12], "renam": 22, "replac": 22, "replot": [2, 31], "repo": [1, 30], "repolink": 1, "repres": 16, "represent": [20, 30], "requir": [3, 11, 20, 22, 32], "requires_grad": [3, 32], "reshap": [22, 24, 25], "residu": [3, 8, 32], "residual_output": 8, "resiz": 7, "resolv": 27, "rest": 23, "restor": 13, "result": [3, 13, 19, 20, 21, 26, 32], "retrain": [15, 22], "return": [17, 21, 22, 23, 24], "reveal": 22, "right": [2, 3, 15, 21, 22, 23, 24, 27, 31, 32], "rm": [2, 7, 8, 10, 14, 15, 16, 17, 18, 20, 23, 24, 31], "rmse": [19, 22, 26], "robust": 22, "roughli": 26, "rougli": 8, "round": 21, "sad": 22, "safe": 12, "sai": [2, 20, 31], "same": [8, 13, 15], "sampel": [3, 32], "sampl": [3, 7, 8, 17, 25, 32], "sampling_mod": 24, "satisfi": 17, "save": [13, 14], "save_ckpt": 13, "save_fig": 14, "save_plot_data": [3, 32], "save_video": 14, "sb": [3, 32], "sb_larg": [3, 32], "sb_small": [3, 32], "sb_trainabl": [3, 25, 32], "scale": [3, 7, 8, 10, 19, 25, 29, 32], "scale_bas": [3, 8, 32], "scale_base_mu": [3, 32], "scale_base_sigma": [3, 32], "scale_sp": [3, 8, 32], "scatter": [21, 25], "scienc": 18, "scope": 8, "screw": 22, "search": [1, 22, 23, 30], "second": [1, 6, 16, 17, 24], "see": [2, 6, 7, 10, 11, 12, 15, 22, 27, 31], "seed": [2, 3, 5, 7, 9, 10, 12, 13, 14, 16, 17, 20, 22, 23, 27, 31, 32], "seem": [13, 20, 27], "select": [3, 32], "selectbackward0": [15, 23, 27], "self": [3, 32], "sens": [2, 31], "sensit": [22, 24], "sentit": 22, "sequenti": 25, "set": [2, 3, 7, 8, 10, 11, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 31, 32], "set_descript": 24, "set_mod": 7, "setup": [10, 11, 25], "sever": [3, 32], "sf_mat": 22, "sgn": [22, 23], "shape": [2, 3, 7, 8, 11, 12, 17, 19, 21, 22, 24, 26, 31, 32], "share": [3, 32], "shift": 25, "shortcut": 16, "should": [5, 16, 22, 23, 27], "show": [2, 7, 20, 22, 23, 26, 31], "shown": 14, "shuffl": 21, "side": 24, "sigma": [2, 31], "sigmoid": [15, 18, 22, 23], "signal": 22, "signific": 7, "silu": [3, 8, 10, 13, 32], "similar": 15, "simpl": 30, "simpli": [2, 8, 31], "simplifi": 13, "sin": [2, 3, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 27, 31, 32], "sinc": [2, 8, 23, 31], "sine": 24, "singl": [2, 3, 31, 32], "singular": 29, "singularity_avoid": [3, 32], "six": 17, "size": [2, 3, 6, 7, 8, 9, 10, 22, 26, 31, 32], "skip": 23, "sklearn": 21, "small": [10, 12, 16, 22], "smaller": [2, 3, 7, 22, 31, 32], "smooth": [2, 20, 31], "so": [8, 13, 15, 17, 22, 23, 26], "sol": 24, "sol_d1": 24, "sol_d1_fun": 24, "sol_d2": 24, "sol_fun": 24, "solut": 24, "solv": [22, 29], "some": [3, 9, 11, 12, 14, 22, 32], "someth": 13, "sometim": [9, 10], "sort": 14, "sourc": 24, "source_fun": 24, "sp_trainabl": [3, 25, 32], "space": 22, "sparse_init": [3, 32], "sparse_mask": [3, 32, 33], "sparser": [11, 12], "sparsiti": [2, 7, 16, 31], "spb": [3, 32], "special": [2, 3, 29, 31, 32], "special_bessel_j0": [3, 23, 32], "specif": [2, 22, 31], "spline": [2, 6, 7, 8, 9, 10, 12, 13, 14, 16, 20, 22, 23, 25, 27, 31, 33], "spline_output": 8, "spline_postact": 9, "spline_preact": 9, "sqrt": [2, 10, 15, 21, 22, 23, 27, 31], "squar": [3, 32], "sr": 22, "stack": [2, 24, 25, 31], "stage": 25, "staircas": 19, "start": [6, 13, 16, 22], "state": [2, 31], "step": [2, 3, 5, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32, 33], "still": [7, 24], "stop": 23, "stop_grid_update_step": [19, 20, 26], "str": [3, 14, 32], "strategi": 16, "strengh": 13, "strength": 13, "strong_wolf": [3, 24, 32], "structur": 19, "stuck": 22, "studi": 26, "sub": 21, "submodul": 33, "subplot": 25, "subplots_adjust": 25, "subset": [3, 32], "suddenli": 19, "suffic": [16, 20], "suggest": [15, 22], "suggest_symbol": [15, 22, 23], "sum": [2, 3, 24, 31, 32], "sum_": [2, 8, 31], "support": [3, 32], "suppos": [8, 13, 16], "swap": [3, 32, 33], "sweep": [3, 32], "symbol": [2, 3, 6, 7, 15, 21, 23, 24, 29, 31, 32], "symbolic_formula": [2, 15, 21, 22, 23, 24, 27, 31], "symbolic_fun": 6, "symbolic_kanlay": 33, "symbolic_lib": [3, 22, 23, 27, 32], "symmetri": 10, "sympi": [3, 22, 32], "synthet": [3, 17, 32], "t": [3, 8, 12, 13, 16, 23, 32], "take": [8, 22], "takeawai": 22, "tan": [15, 18, 21, 22, 23], "tanh": [2, 7, 15, 21, 22, 23, 31], "target": 17, "task": [9, 16, 20, 22], "tensor": [3, 6, 7, 8, 9, 15, 17, 18, 21, 22, 23, 27, 32], "term": 30, "termin": [3, 32], "test": [2, 3, 5, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 31, 32], "test_acc": 21, "test_input": [3, 17, 21, 22, 25, 32], "test_label": [3, 17, 21, 22, 25, 32], "test_loss": [19, 20, 26], "test_num": [3, 17, 32], "test_rms": 20, "test_vs_g": 19, "text": [8, 19, 26], "texttt": 15, "th": [2, 31], "than": [3, 30, 32], "thank": 25, "thei": [2, 8, 9, 22, 31], "them": [6, 15, 22], "themselv": 7, "theorem": [20, 30], "thi": [1, 2, 3, 8, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 30, 31, 32], "thing": 13, "think": 13, "those": 7, "though": [22, 23], "threshold": 12, "tini": 22, "titl": 7, "togeth": 26, "toi": [18, 22], "toler": [3, 22, 32], "tolerance_chang": [3, 24, 32], "tolerance_grad": [3, 24, 32], "tolerance_i": [3, 24, 32], "too": [10, 13, 20, 23], "top": [15, 22, 23], "topk": 22, "torch": [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31, 32], "tqdm": 24, "train": [2, 3, 5, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 31, 32], "train_acc": 21, "train_index": 14, "train_input": [2, 3, 7, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 31, 32], "train_label": [2, 3, 7, 11, 12, 17, 18, 21, 22, 25, 31, 32], "train_loss": [19, 20, 26], "train_num": [3, 5, 14, 17, 20, 26, 32], "train_ratio": [3, 32], "train_rms": 20, "train_vs_g": 19, "trainabl": [3, 24, 32], "transform": [3, 15, 32], "transit": [22, 29], "transpar": 7, "treat": [17, 21], "trick": [15, 16], "true": [2, 3, 7, 11, 14, 20, 21, 24, 31, 32], "truth": [23, 24, 27], "try": [3, 6, 11, 12, 15, 16, 17, 22, 32], "tune": 11, "tupl": [3, 32], "turn": 6, "two": [1, 3, 8, 12, 15, 16, 21, 32], "txt": 30, "u": [10, 15], "u8": 22, "unabl": 20, "unclear": 22, "unfix_symbol": 6, "uniform": [3, 8, 32], "univari": [2, 31], "unlock": [3, 32], "unsignific": 7, "unsupervis": 29, "until": 16, "up": [3, 7, 13, 22, 23, 32], "updat": [3, 8, 32], "update_grid": [15, 25, 27], "update_grid_from_sampl": [3, 8, 24, 32, 33], "us": [2, 3, 5, 6, 7, 8, 9, 11, 12, 16, 17, 18, 22, 29, 31, 32], "user": 22, "usual": [3, 7, 12, 22, 32], "util": [15, 22, 23, 33], "uv": 15, "v": 15, "valid": 8, "valu": [3, 7, 9, 24, 32], "var": [22, 24], "vari": 11, "variabl": [2, 3, 7, 17, 22, 31, 32], "varianc": 8, "vdot": [2, 31], "verbos": [3, 32], "veri": [3, 22, 32], "via": 1, "video": 28, "video_img": 14, "video_nam": 14, "visibl": 7, "visual": [2, 7, 14, 31], "w": [2, 3, 31, 32], "wai": [1, 12, 13], "want": [5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 17, 19, 22, 23, 26], "we": [2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 31], "weight": [3, 32], "weight_shar": [3, 32], "well": [7, 16, 22], "were": 27, "what": [8, 15], "whch": 22, "when": [3, 10, 16, 17, 22, 32], "where": [2, 6, 7, 9, 10, 12, 16, 17, 23, 31], "wherea": 30, "which": [6, 8, 20, 22, 23, 27], "while": [8, 12, 17], "whole": [2, 13, 22, 31], "whose": [3, 32], "why": [22, 23], "wider": 16, "width": [2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 31], "win": 22, "within": 22, "without": 16, "won": 13, "worri": 8, "wors": 20, "would": 26, "write": 14, "write_videofil": 14, "written": [2, 31], "wrong": [13, 22], "wrt": 26, "wspace": 25, "x": [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 26, 27, 31, 32], "x_": [2, 15, 17, 21, 22, 23, 24, 27, 31], "x_1": [2, 14, 17, 18, 20, 21, 31], "x_2": [14, 17, 18, 20, 21], "x_3": [14, 17, 18, 20], "x_4": [14, 17, 20], "x_5": 17, "x_6": 17, "x_b": 24, "x_center": 25, "x_cor": 17, "x_eval": [3, 32], "x_grid": 25, "x_i": 24, "x_mesh": 24, "x_n": [2, 31], "x_p": [2, 31], "x_sampl": 25, "x_test": 17, "x_train": 17, "xb1": 24, "xb2": 24, "xb3": 24, "xb4": 24, "xlabel": [8, 19, 26], "xlim": 25, "xscale": [19, 20, 26], "y": [2, 3, 7, 9, 12, 16, 17, 21, 22, 23, 24, 25, 27, 31, 32], "y_eval": [3, 32], "y_mesh": 24, "y_pred": 25, "y_sampl": 25, "y_test": 17, "y_th": [3, 32], "y_train": 17, "yeah": 22, "yet": 9, "ylabel": [8, 19, 26], "ylim": 25, "you": [7, 12, 13, 22], "your": [13, 22], "yscale": [19, 20, 26], "zero": [3, 8, 10, 16, 17, 22, 26, 32], "zero_grad": 24, "zoom": [3, 32]}, "titles": ["API Demos", "Welcome to Kolmogorov Aarnold Network (KAN) documentation!", "Hello, KAN!", "kan package", "API", "Demo 10: Device", "Demo 1: Indexing", "Demo 2: Plotting", "Demo 3: Grid", "Demo 4: Extracting activation functions", "Demo 5: Initialization Hyperparamters", "Demo 6: Training Hyperparamters", "Demo 7: Pruning", "Demo 8: Checkpoint", "Demo 9: Videos", "Example 10: Use of lock for Relativity Addition", "Example 11: Encouraging linearity", "Example 12: Unsupervised learning", "Example 13: Phase transition", "Example 1: Function Fitting", "Example 2: Deep Formulas", "Example 3: Classification", "Example 4: Symbolic Regression", "Example 5: Special functions", "Example 6: Solving Partial Differential Equation (PDE)", "Example 7: Continual Learning", "Example 8: KANs\u2019 Scaling Laws", "Example 9: Singularity", "API Demos", "Examples", "Welcome to Kolmogorov Arnold Network (KAN) documentation!", "Hello, KAN!", "kan package", "API"], "titleterms": {"1": [3, 6, 11, 16, 19, 22, 32], "10": [5, 15], "11": 16, "12": 17, "13": 18, "1d": [16, 22], "2": [7, 11, 16, 20, 22], "2d": 16, "3": [8, 11, 21], "4": [9, 11, 22], "5": [10, 23], "6": [11, 24], "7": [12, 25], "8": [13, 26], "9": [14, 27], "aarnold": 1, "activ": [6, 9], "ad": 22, "addit": 15, "af_1": 22, "api": [0, 4, 28, 33], "arg": [3, 32], "arnold": [2, 30, 31], "attribut": [3, 32], "autom": 22, "automat": 12, "b": 22, "bf_2": 22, "bound": 22, "can": 22, "case": 16, "chaotic": 22, "checkpoint": 13, "classif": 21, "content": [3, 30, 32], "continu": 25, "deep": 20, "defin": 22, "demo": [0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 28], "devic": 5, "diagram": 22, "differenti": 24, "document": [1, 30], "edg": 6, "encourag": 16, "ent": 11, "entropi": 11, "equat": 24, "exact": 22, "exampl": [3, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 32], "exp": 22, "extract": 9, "f": 22, "f_1": 22, "f_2": 22, "f_3": 22, "fit": 19, "formul": 21, "formula": [20, 22], "fratcal": 22, "function": [6, 9, 16, 19, 22, 23], "g": 11, "get": [2, 22, 30, 31], "github": 30, "grid": [8, 11], "hard": 22, "hello": [2, 31], "how": 22, "hyperparamt": [10, 11], "i": 22, "ii": 22, "ill": 22, "index": 6, "indic": [1, 30], "initi": 10, "instal": 30, "kan": [1, 2, 3, 20, 21, 26, 30, 31, 32], "kanlay": [3, 32], "know": 22, "kolmogorov": [1, 2, 30, 31], "lambda": 11, "lambda_": 11, "law": 26, "layer": [6, 20], "lbfg": [3, 32], "learn": [17, 25], "linear": 16, "lock": 15, "manual": [12, 22], "method": [3, 32], "mix": 22, "modul": [3, 32], "my": 22, "network": [1, 2, 30, 31], "neuron": 6, "node": 6, "nois": 22, "overal": 11, "packag": [3, 32], "paramet": 11, "part": 22, "partial": 24, "pde": 24, "penalti": 11, "phase": [18, 22], "plot": 7, "prune": 12, "pypi": 30, "realli": 22, "region": 22, "regress": [21, 22], "rel": [11, 15], "represent": [2, 31], "requir": 30, "return": [3, 32], "rm": [11, 22], "scale": 26, "seed": 11, "sin": 22, "sine": 22, "singular": 27, "size": 11, "solv": 24, "special": 23, "spline": [3, 32], "start": [2, 30, 31], "strength": 11, "submodul": [3, 32], "symbol": 22, "symbolic_kanlay": [3, 32], "tabl": [1, 30], "theorem": [2, 31], "three": [20, 22], "train": [11, 21], "transit": 18, "two": 20, "unsupervis": 17, "us": 15, "util": [3, 32], "v": 22, "via": 30, "video": 14, "we": 22, "welcom": [1, 30], "x": 22}}) \ No newline at end of file