Metadata-Version: 2.1
Name: spcqe
Version: 0.0.3
Summary: Smooth periodic consistent quantile estimation
Author-email: Mehmet Giray Ogut <giray98@stanford.edu>, Aramis Dufour <adufour@stanford.edu>, Bennet Meyers <bennetm@stanford.edu>
License: BSD 2-Clause License
        
        Copyright (c) 2023, Stanford University Convex Optimization Group
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://github.com/cvxgrp/spcqe
Project-URL: Bug Tracker, https://github.com/cvxgrp/spcqe/issues
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: cvxpy
Requires-Dist: scikit-learn
Requires-Dist: tqdm
Requires-Dist: sig-decomp

# spcqe
Smooth (multi-) periodic consistent quantile estimation. We attempt to follow the sklearn "fit/transform" API, and the main class inherets `TransformerMixin` and `BaseEstimator` from `sklearn.base`.


## Installation

The package is available on both PyPI and conda-forge.

pip installation:

```
pip install spcqe
```

conda installation:

```
conda install conda-forge::spcqe 
```

You may also clone the repository to your local machine and install with pip by navigating to the project directory and running:

```
pip install .
```

If working on the files in this package (i.e. fixing bugs or adding features), it useful to install in [editable mode](https://setuptools.pypa.io/en/latest/userguide/development_mode.html):

```
pip install -e .
```


## Usage

```
from spcqe.quantiles import SmoothPeriodicQuantiles

y1 = ... # some data with hourly measurement exhibiting daily, weekly, and yearly periodicities
P1 = int(365*24)
P2 = int(7*24)
P3 = int(24)
K = 3
l = 0.1
spq = SmoothPeriodicQuantiles(K, [P1, P2, P3], weight=l)
spq.fit(y1)
```

## Examples 

Many examples Jupyter notebooks are available in the `notebooks` folder.

## Acknowledgement 

This material is based upon work supported by the U.S. Department of Energy's Office of Energy Efficiency and Renewable Energy (EERE) under the Solar Energy Technologies Office Award Number 38529, "PVInsight".
