A Python package for smoothing data and estimating first- and second-order derivatives and their errors.
Covariance functions can either be linear, squared exponential, neural network-like, or squared exponential with a linear trend.
An example workflow to smooth data (x, y), where the columns of y are replicates, is
>>> import gaussian process as gp
>>> g= gp.maternGP({0: (-4, 4), 1: (-4, 4), 2: (-4, -2)}, x, y)
The dictionary sets bounds on the hyperparameters, so that 0: (-4, 4) means that the bounds on the first hyperparameter are 1e-4 and 1e4.
>>> g.info()
explains what each hyperparameter does.
Once g is instantiated,
>>> g.findhyperparameters()
>>> g.results()
>>> g.predict(x, derivs= 2)
optimises the hyperparameters and determines a smoothed version of the data and estimates the derivatives.
The results can be visualised by
>>> import matplotlib.pylab as plt
>>> plt.figure()
>>> plt.subplot(2,1,1)
>>> g.sketch('.')
>>> plt.subplot(2,1,2)
>>> g.sketch('.', derivs= 1)
>>> plt.show()
and are available as g.f and g.fvar (smoothed data and error), g.df and g.dfvar (estimate of dy/dx), and g.ddf and g.ddfvar (estimate of d2y/dx2).
Raw data
{
"_id": null,
"home_page": "",
"name": "gaussianprocessderivatives",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<3.11",
"maintainer_email": "",
"keywords": "gaussian process,derivative",
"author": "Peter Swain",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/3b/b1/0ff186b5a67ea870b5accc07a7c02319846c5bbd41a02ce89de5dede1da1/gaussianprocessderivatives-0.1.64.tar.gz",
"platform": null,
"description": "A Python package for smoothing data and estimating first- and second-order derivatives and their errors.\n\nCovariance functions can either be linear, squared exponential, neural network-like, or squared exponential with a linear trend.\n\nAn example workflow to smooth data (x, y), where the columns of y are replicates, is\n\n>>> import gaussian process as gp\n>>> g= gp.maternGP({0: (-4, 4), 1: (-4, 4), 2: (-4, -2)}, x, y)\n\nThe dictionary sets bounds on the hyperparameters, so that 0: (-4, 4) means that the bounds on the first hyperparameter are 1e-4 and 1e4.\n\n>>> g.info()\n\nexplains what each hyperparameter does.\n\nOnce g is instantiated,\n\n>>> g.findhyperparameters()\n>>> g.results()\n>>> g.predict(x, derivs= 2)\n\noptimises the hyperparameters and determines a smoothed version of the data and estimates the derivatives.\n\nThe results can be visualised by\n\n>>> import matplotlib.pylab as plt\n>>> plt.figure()\n>>> plt.subplot(2,1,1)\n>>> g.sketch('.')\n>>> plt.subplot(2,1,2)\n>>> g.sketch('.', derivs= 1)\n>>> plt.show()\n\nand are available as g.f and g.fvar (smoothed data and error), g.df and g.dfvar (estimate of dy/dx), and g.ddf and g.ddfvar (estimate of d2y/dx2).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Uses Gaussian processes to smooth data and estimate first- and second-order derivatives",
"version": "0.1.64",
"split_keywords": [
"gaussian process",
"derivative"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "71a0ebd8ae223211b31fe4bad2481af2ef4edc72d509ed0c419504e467f59182",
"md5": "6884a96696a380aeaf020e684313f3a2",
"sha256": "c03d8ae2b98abd0e7d2476d2451b143ad6339ec05caeb4e6940096d631ff6115"
},
"downloads": -1,
"filename": "gaussianprocessderivatives-0.1.64-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6884a96696a380aeaf020e684313f3a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<3.11",
"size": 16064,
"upload_time": "2023-01-30T16:33:31",
"upload_time_iso_8601": "2023-01-30T16:33:31.532728Z",
"url": "https://files.pythonhosted.org/packages/71/a0/ebd8ae223211b31fe4bad2481af2ef4edc72d509ed0c419504e467f59182/gaussianprocessderivatives-0.1.64-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3bb10ff186b5a67ea870b5accc07a7c02319846c5bbd41a02ce89de5dede1da1",
"md5": "43b06f3729f74d44d9005f837dfa2e9e",
"sha256": "0696a05414d7ef01d96ebc88891d3f8917ca16e4f76411ad07e6357da539f826"
},
"downloads": -1,
"filename": "gaussianprocessderivatives-0.1.64.tar.gz",
"has_sig": false,
"md5_digest": "43b06f3729f74d44d9005f837dfa2e9e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<3.11",
"size": 11497,
"upload_time": "2023-01-30T16:33:33",
"upload_time_iso_8601": "2023-01-30T16:33:33.459673Z",
"url": "https://files.pythonhosted.org/packages/3b/b1/0ff186b5a67ea870b5accc07a7c02319846c5bbd41a02ce89de5dede1da1/gaussianprocessderivatives-0.1.64.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-30 16:33:33",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "gaussianprocessderivatives"
}