{ "info": { "author": "Rachit Jas, Jiaqi Liu, Qiuyi Han, Jie Ding", "author_email": "dingj@umn.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Education", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "# The 'slants' Python API\n\nThis package provides a Python implementation as well as an user-friendly API for the **Sequential Adaptive Nonlinear Modeling of Time Series** (SLANTS) algorithm, as proposed by **Q. Han, J. Ding, E. M. Airoldi and V. Tarokh** in the _IEEE Transactions on Signal Processing Journal, Vol. 65, NO. 19, October 2017, pages [4994, 5005]_. SLANTS provides a new method for online modeling and prediction of nonlinear and nonparametric autoregressive time series. \n\n- It uses **splines** to approximate a wide range of **nonlinear functions and adaptive filtering** to accommodate time varying data generating processes. \n- It is built on a **new online group LASSO algorithm** proposed in the reference paper. \n- It can be **applied to high dimensional time series** where the dimension is larger than the sample size.\n\nFurther details and theory about the algorithm can be found here [[PDF](http://jding.org/jie-uploads/2018/11/slant.pdf)]\n\n## A Quick Setup Guide\n\n### Getting Started \n\n#### 1. Install the 'slants' package using pip\n\n```bash\n# Installing test package\npython -m pip install slants\n```\n\n#### 2. Import the Model and Experiment API classes\n\nTwo fundamental API classes are available. The **Model Class API** provides online model fitting capabilities of the SLANTS algorithm for your data as well as diagnostic plot graphing functions to view learned optimal model parameters. The **Experiment Class API** is a utility data-loader class that will quickly set you up with the environment to test the SLANTS algorithm API by loading sample synthetic experiments. You may import both classes as follows:\n\n```python\nfrom slants import Model, Experiment\n```\n\n### Using the package\n\n#### Experiment Class API\n\n##### 1. Load a synthetic experiment dataset using the Experiment.load() method \nThis method returns a dictionary containing the design data matrix + tunable parameters for the model.\n\n```python\nexp = Experiment.load(1) # load synthetic experiment no. (1)\n```\n##### 2. View number of available synthetic datasets\n\n```python\nExperiment.load('?') \n```\n\nAll the tunable parameters for model fitting, inclusive of the data design matrix, can be accessed from the 'exp' dictionary.\n\n#### Model Class API\n\n##### 1. Instantiate Model objects and viewing available methods:\n\n```python\nmodel = Model()\nmodel.help(ls=True) #ls ~ inspiration from linux bash-style command\n```\n##### 2. Fit SLANTS algorithm on data design matrix:\n\n```python\n# Consolidating spline spline configuration + optional tunable parameters \nspline_info = {\n 'order': spline_info_order, \n 'num_Bsplines': spline_info_num_Bsplines\n}\n\noptional_params = {\n 'test_size': test_size, \n 'safe_shrink_lambda': safe_shrink_lambda, \n 'random_beta': random_beta\n}\n## Note: Many more optional tunable parameters are available; see documentation\n\n# Fitting the SLANTS model on the data \nmodel.fit(data, predict, maximum_lag, spline_info, forget_factor, \n lambda_init, tau2_init, sparse_lambda_tolerance,\t\t \t\t\t\t \n delta_multiplier, shrink_step_size, **optional_params) # unpacking optional args dictionary \n```\n\nEither check the **Complete_User_Guide.IPYNB** notebook or type the following to get additional documentation regarding the Model.fit() method:\n\n```python\nmodel.help('fit')\n```\n\n##### 3. View diagnostic plots\n\n```python\nmodel.plot('coef') # show trend of beta coefficients with time\nmodel.plot('lambda') # show trend of LASSO penalty term with time\nmodel.plot('tau') # show trend of EM decomposition parameter with time\nmodel.plot('trace') # show trace of nonlinear functions\n``` \n\n##### 4. Return learned model parameters\n\n```python\nlearned_model_params = model.model_params() # dictionary consisting of all learned parameters\n```\n\nEither check **Complete_User_Guide.IPYNB** notebook or type the following to get additional documentation regarding the Model.model_params() method:\n\n```python\nmodel.help('model_params')\n```\n\n##### 5. Reset the model in rare cases of unexpected behaviour\n\n```python\nmodel.reset_model()\n``` \n\n##### 6. View man-style documentation of the Model class/methods\n\n```python\nmodel.help(ls=True) # show list of methods in Model class \nmodel.help('fit') # show info about function name, for eg. fit()\nmodel.help('all') # show info about entire class\n```\n\n## Software Guide\n\nInteractive hands-on guides pertaining to the package may be accessed [[online](https://colab.research.google.com/drive/131JrKNapbWYMLUk67N2UUSBcFiiY_1kd)] on Google Colab or is available for download in the ```docs/``` folder of this project. Developers can avail all software-design charts of this project in the ```docs/``` folder. \n\n## Relevant Papers\n\nQ .Han, J. Ding, E. Airoldi, V. Tarokh, \"SLANTS: Sequential adaptive nonlinear modeling of time series,\" IEEE Transactions on Signal Processing 65 (19), 4994-5005. [[PDF](http://jding.org/jie-uploads/2018/11/slant.pdf)]\n\nX. Xian, J. Ding, \"Physics-assisted online learning,\" preprint.\n\n## Acknowledgement\n\nThis research is funded by the Defense Advanced Research Projects Agency (DARPA) under grant number HR00111890040.\n\n## License\n\nThe software is subjected to the GNU GPLv3 licensing terms and agreements. \n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JieGroup/slants", "keywords": "sequential adaptive online time series machine learning expectation maximization algorithm group lasso statistics", "license": "GNU GPLv3", "maintainer": "", "maintainer_email": "", "name": "slants", "package_url": "https://pypi.org/project/slants/", "platform": "", "project_url": "https://pypi.org/project/slants/", "project_urls": { "Homepage": "https://github.com/JieGroup/slants" }, "release_url": "https://pypi.org/project/slants/1.0.0/", "requires_dist": [ "numpy", "pandas", "matplotlib" ], "requires_python": "", "summary": "Sequential Learning Algorithm for Nonlinear Time Series (SLANTS)", "version": "1.0.0" }, "last_serial": 5575321, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8e5e0ee48a383ac28daa9b4d0ca7be0c", "sha256": "d94562d25fdabee8e38a22d9474fa4fac9ea235e4dde97d395d1a8e1b6e666a3" }, "downloads": -1, "filename": "slants-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8e5e0ee48a383ac28daa9b4d0ca7be0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 359266, "upload_time": "2019-07-24T02:10:37", "url": "https://files.pythonhosted.org/packages/8d/9f/a1d81c36d72b4f050ef1740ee580cff4f9da68857b0304dab04ddef52a5b/slants-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e258bd5ffeed899361753f1501e15f4c", "sha256": "c194a62d57a328d599549f44723e0a7a3cee9e2085f861ad20e0098e33bf5175" }, "downloads": -1, "filename": "slants-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e258bd5ffeed899361753f1501e15f4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 339967, "upload_time": "2019-07-24T02:10:40", "url": "https://files.pythonhosted.org/packages/61/78/0f7f1a1b1abf46b1935b38c18c85645ef707c105660ae326389888a679a7/slants-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e5e0ee48a383ac28daa9b4d0ca7be0c", "sha256": "d94562d25fdabee8e38a22d9474fa4fac9ea235e4dde97d395d1a8e1b6e666a3" }, "downloads": -1, "filename": "slants-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8e5e0ee48a383ac28daa9b4d0ca7be0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 359266, "upload_time": "2019-07-24T02:10:37", "url": "https://files.pythonhosted.org/packages/8d/9f/a1d81c36d72b4f050ef1740ee580cff4f9da68857b0304dab04ddef52a5b/slants-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e258bd5ffeed899361753f1501e15f4c", "sha256": "c194a62d57a328d599549f44723e0a7a3cee9e2085f861ad20e0098e33bf5175" }, "downloads": -1, "filename": "slants-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e258bd5ffeed899361753f1501e15f4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 339967, "upload_time": "2019-07-24T02:10:40", "url": "https://files.pythonhosted.org/packages/61/78/0f7f1a1b1abf46b1935b38c18c85645ef707c105660ae326389888a679a7/slants-1.0.0.tar.gz" } ] }