Skip to content
Snippets Groups Projects
Commit 3b22c43e authored by Niklas Selke's avatar Niklas Selke
Browse files

Adapted the interface of the trends subpackage.

parent b9f41aed
No related branches found
No related tags found
2 merge requests!5Modified the test for the 'value_count' statistic. Now all available sampling...,!3Niklas issue009 feat calculate quantile regression
"""This module contains the public interface for the trends subpackage.
This module contains the following function:
calculate_quantile_regression - calculate the quantile regression
calculate_trend - calculate the trend using the requested method
"""
import statsmodels.formula.api as smf
def calculate_quantile_regression(quantiles, data):
"""Calculate the quantile regression.
def calculate_trend(method, data, formula="value ~ datetime", quantiles=None):
"""Calculate the trend using the requested method.
This function is the public interface for the ``trends`` subpackage.
It takes all the user inputs and returns the result of the requested
quantile regression.
trend analysis.
:param quantiles: a single quantile or a list of quantiles to
calculate, these must be between 0 and 1
:param method: either ``"OLS"`` or ``"quant"``
:param data: data containing a list of date time values and
associated parameter values on which to calculate the
quantile regression
trend
:param formula: the formula specifying the model
:param quantiles: a single quantile or a list of quantiles to
calculate, these must be between 0 and 1; only
needed when ``method="quant"``
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment