This project uses pattern recognition to perform time series forecasting.
byronknoll/predcast
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
predcast https://code.google.com/p/predcast/ Made by Byron Knoll in 2013. This project is in the public domain - attribution is appreciated but not required. This project uses pattern recognition to perform time series forecasting: given a sequence of floating point numbers, the program will output predictions for the next N data points. It has linear time complexity and is robust to noisy input data. It has few parameters, so is easy to apply to new data sets. Although the algorithm can easily be extended to multi-dimensional input, this release only supports one-dimensional data. The algorithm has two main components: 1) Context matching (memory.cpp). This component tries to find the portion of the input history that is the closest match to the most recent input. It uses cross-correlation to find the match. It uses least squares fitting to find linear trends in the data. It also supports data smoothing to increase robustness to noise. 2) Frequency analysis (brain.cpp). This component uses a discrete cosine transform (DCT) to separate different frequency components of the input data. DCT is performed on a sliding Hann window function. The context matching algorithm described above is used independently on each DCT component to predict future input. The high frequency DCT components can be discarded to increase robustness to noise. This project contains two executables: 1) simple-predictor. This only uses the context matching component described above. It has three integer parameters: - num_predictions (default = 100): The number of future data point predictions to output. - context_length (default = 100): The size of the window used for context matching. - smoothing (default = 2): The smoothing factor (1 = no smoothing, higher values = more smoothing). 2) complex-predictor. This uses the frequency analysis component described above. It has five integer parameters: - num_predictions (default = 100): The number of future data point predictions to output. - window_size (default = 50): The size of the Hann window function. - memory_size (default = 3): The number of DCT components to use (should be less than or equal to window_size). - context_length (default = 100): The size of the window used for context matching. - smoothing (default = 2): The smoothing factor (1 = no smoothing, higher values = more smoothing). Both of these programs use standard input/output. Input should be a sequence of floating point numbers separated by line breaks.
About
This project uses pattern recognition to perform time series forecasting.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published