paper_cpsplines_1d
is a GitHub repository containing all the figures and
simulations results shown in the paper
@article{NAVARROGARCIA2023,
title = {On constrained smoothing and out-of-range prediction using P-splines: A conic optimization approach},
journal = {Applied Mathematics and Computation},
volume = {441},
pages = {127679},
year = {2023},
issn = {0096-3003},
doi = {https://doi.org/10.1016/j.amc.2022.127679},
url = {https://www.sciencedirect.com/science/article/pii/S0096300322007470},
author = {Manuel Navarro-García and Vanesa Guerrero and María Durban},
keywords = {Data science, Penalized splines, Conic optimization, Smoothing, Prediction},
}
All the simulation studies carried out in this work use the routines implemented in cpsplines, which requires a MOSEK license to solve the optimization problems.
The current version of the project is structured as follows:
- paper_cpsplines_1d: the main directory of the project, which consist of:
- figures.ipynb: A Jupyter notebook containing the code used to generate the figures and the tables of the paper.
- aux_func.py: constituted by a collection of auxiliary functions to generate the figures and tables.
- multiple_curves.py: contains the code to fit simultaneously multiple curves using the methodology proposed in Section 4.3 of the paper.
- data: a folder containing CSV files with simulated and real data sets.
- img: a folder containing the figures shown in the paper.
paper_cpsplines_1d
mainly depends on the following packages:
- cpsplines.
- Matplotlib.
- MOSEK. License Required
- Numpy.
- Pandas.
- To clone the repository on your own device, use
git clone https://github.com/ManuelNavarroGarcia/paper_cpsplines_1d.git
cd paper_cpsplines_1d
- To install the dependencies, there are two options according to your installation preferences:
- Create and activate a virtual environment with
conda
(recommended)
conda env create -f env.yml
conda activate paper_cpsplines_1d
- Install the setuptools dependencies via
pip
pip install -r requirements.txt
pip install -e .[dev]
- If neccessary, add version requirements to existing dependencies or add new
ones on
setup.py
. Then, updaterequirements.txt
file using
pip-compile --extra dev > requirements.txt
and update the environment with pip-sync
.
If you have encountered any problem or doubt while using paper_cpsplines_1d
,
please feel free to let me know by sending me an email:
- Name: Manuel Navarro García (he/his)
- Email: manuelnavarrogithub@gmail.com
If you find paper_cpsplines_1d
or cpsplines
useful, please cite it in your
publications.