Collecting actupac
Downloading https://files.pythonhosted.org/packages/78/6d/100b147d64d2b2653f93818af3da6013f23b53120bdc66e1092133500ff3/actupac-0.1.tar.gz
Building wheels for collected packages: actupac
Building wheel for actupac (setup.py): started
Building wheel for actupac (setup.py): finished with status 'done'
Created wheel for actupac: filename=actupac-0.1-cp37-none-any.whl size=5979 sha256=7eb4984f5edbdd2af0de32a2fb795215bc159ce70f39eb398dead35d5f97950f
Stored in directory: C:\Users\jasonguo\AppData\Local\pip\Cache\wheels\83\19\8e\472924dcac472b470f64c7e2fdd5553ea1af6857d213253170
Successfully built actupac
Installing collected packages: actupac
Successfully installed actupac-0.1
Note: you may need to restart the kernel to use updated packages.
导入包
1 2
from actupac import Interpolation from actupac import Extrapolation
# plot the distribution of the dataset sample.plot_histogram()
1 2 3 4
# interpolate with piecewise linear model with 9 interpolated points between each known year linear = sample.piecewise_linear(9) print(linear.head()) sample.piecewise_linear_plot()
# interpolate with piecewise constant model with 9 interpolated points between each known year constant = sample.piecewise_constant(9) print(constant.head()) sample.piecewise_constant_plot()
# interpolate with cubic spline (natural spline) model with 9 interpolated points between each known year cubic = sample.cubic(9) print(cubic.head()) sample.cubic_plot()