This is the base frame that holds flat 2 dimensional data
Parameter: | headerList (list<String>) – List of header for the columns |
---|
Parameter: | headerList (list<String>) – List of header for the rows |
---|
A simple parse function that read the the output of the internal software that I work with.
Parameter: | writer (csv.writer) – csv.writer object |
---|---|
Returns: | the data wrapped in timeSeriesFrame |
Return type: | TimeSeriesFrame |
Parameter: | headerList (list<String>) – List of header for the columns |
---|
This is a generator to iterate across different time series
Return type: | TimeSeriesFrame |
---|
This is a generator to iterate all the time series by date
Return type: | TimeSeriesFrame |
---|
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This fucntion will estimate the weight in the regression.
Returns: | reference to the object itself |
---|
This is an abstruct class for Regression Type of problem.
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This fucntion will estimate the weight in the regression.
FIXME
Returns: | reference to the object itself |
---|
This is an abstruct class for Regression Type of problem.
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This fucntion will estimate the weight in the regression.
Returns: | reference to the object itself |
---|
This module contains ordinary kalman filter classes
This is a KalmanFilter Class subclassed from Regression
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This is a KalmanFilter Class subclassed from Regression
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This is a Kalman filter Class subclassed from Regression
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This is a Kalman Smoother Class subclassed from Kalman Filter
FIX ME Simple R Squared by the definition on Wikipedia
Returns: | R squared statistics |
---|---|
Return type: | double |
Compute and return the estimation error
Parameter: | time (datetime.date) – The specific date of the weight |
---|---|
Reutrn: | TimeSeriesFrame of the estimation error |
Return type: | TimeSeriesFrame<double> |
Get the estimate of the regression
Parameter: | date (datetime.date) – return the weight on a specific date |
---|---|
Returns: | Weight computed from the regression |
Return type: | scipy.matrix |
Returns: | Boolean function to see if equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
Returns: | Boolean function to see if inequality and equality contraints can be imposed to the model. Default is True |
---|---|
Return type: | boolean |
This function take the (list of) date and return prediction in a timeseriesframe
Parameter: | time (datetime.date) – the specific date of the weight |
---|---|
Returns: | TimeSeriesFrame of estimate |
Return type: | TimeSeriesFram<double> |
This module contains a list of algoritm that is used for estimation. These algorithm are unsafe and all these type and bound check should be done in the wrapper level.
List of algorithm that has been inplemented:
Ordinary Least Squares Ordinary Least Squares with Linear Equality Constraints Ordinary Least Squares with Linear Inequality Constraints
Stepwise Least Squares Stepwise Least Squares with Linear Equality Constraints Stepwise Least Squares with Linear Inequality Constraints
Kalman Filter Kalman Smoother Kalman Filter with Linear Equality Constraints Kalman Filter with Linear Inequality Constraints
Flexible Least Squares with Linear Inequality Constraints
UNTESTED: Kalman Smoother with Linear Equality Constraints Kalman Smoother with Linear Inequality Constraints
A lot of matrix inversion are used in these function and singularity is not checked. Potential optimisation includes more stable inversion, large scale QP solver for Flexible Least Squares
Parameters: |
|
---|---|
Returns: | |
Return type: | scipy.matrix<float> |
This return the estimated weight on the following regression problem
constained to
The problem is solved using Lagrangian Multiplier and
This return the estimated weight on the following regression problem
constained to
This problem is translated nicely to quadratic programming problem. CVXOPT package is used to as the quadratic solver engine.
Parameters: |
|
---|---|
Returns: | |
Return type: | scipy.matrix<float> |
This fucntion is the predicted step of Kalman Filter
Parameters: |
|
---|---|
Returns: | |
Return type: | Tuple of scipy.matrix<float> |
This is the update step of kalman filter.
Return the estimated weight based on ordinary regression model. The algorithm used to solve for the weight is done by matrix inversion.
Parameters: |
|
---|---|
Returns: | |
Return type: | scipy.matrix<float> |