|
Advanced Chunk Processing Library 0.2.0
A comprehensive C++ library for advanced data chunking strategies and processing operations
|
Dynamic time warping based chunking for sequence alignment. More...
#include <sophisticated_chunking.hpp>
Collaboration diagram for sophisticated_chunking::DTWChunking< T >:Public Member Functions | |
| DTWChunking (size_t window_size=10, double dtw_threshold=1.0) | |
| Constructor for DTW-based chunking. | |
| std::vector< std::vector< T > > | chunk (const std::vector< T > &data) const |
| Chunk data based on DTW analysis. | |
| std::string | get_distance_metric () const |
| Get the distance metric. | |
| double | get_dtw_threshold () const |
| Get the threshold for chunk boundaries. | |
| size_t | get_window_size () const |
| Get the size of the warping window. | |
| void | set_distance_metric (const std::string &metric) |
| Set the distance metric. | |
| void | set_dtw_threshold (double threshold) |
| Set the threshold for chunk boundaries. | |
| void | set_window_size (size_t size) |
| Set the size of the warping window. | |
Private Member Functions | |
| double | calculate_distance (double a, double b) const |
| double | compute_dtw_core (const std::vector< double > &seq1, const std::vector< double > &seq2) const |
| double | compute_dtw_distance (const std::vector< T > &seq1, const std::vector< T > &seq2) const |
| double | computeDTWDistance (const std::vector< T > &seq1, const std::vector< T > &seq2) const |
| Compute DTW distance between sequences. | |
| template<typename U > | |
| std::vector< double > | flatten_features (const U &data) const |
Private Attributes | |
| std::string | distance_metric_ |
| double | dtw_threshold_ |
| size_t | window_size_ |
Dynamic time warping based chunking for sequence alignment.
| T | The type of elements to be chunked |
Definition at line 310 of file sophisticated_chunking.hpp.
|
inline |
Constructor for DTW-based chunking.
| window_size | Size of the warping window |
| dtw_threshold | Threshold for chunk boundaries |
Definition at line 408 of file sophisticated_chunking.hpp.
|
inlineprivate |
Definition at line 316 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::distance_metric_.
Referenced by sophisticated_chunking::DTWChunking< T >::compute_dtw_core().
|
inline |
Chunk data based on DTW analysis.
| data | Input data to be chunked |
Definition at line 416 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::compute_dtw_distance(), and sophisticated_chunking::DTWChunking< T >::dtw_threshold_.
Referenced by demonstrate_dtw_chunking(), TEST_F(), and TEST_F().
|
inlineprivate |
Definition at line 332 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::calculate_distance(), and sophisticated_chunking::DTWChunking< T >::window_size_.
Referenced by sophisticated_chunking::DTWChunking< T >::compute_dtw_distance().
|
inlineprivate |
Definition at line 377 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::compute_dtw_core(), and sophisticated_chunking::DTWChunking< T >::flatten_features().
Referenced by sophisticated_chunking::DTWChunking< T >::chunk().
|
private |
Compute DTW distance between sequences.
| seq1 | First sequence |
| seq2 | Second sequence |
|
inlineprivate |
Definition at line 357 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::flatten_features().
Referenced by sophisticated_chunking::DTWChunking< T >::compute_dtw_distance(), and sophisticated_chunking::DTWChunking< T >::flatten_features().
|
inline |
Get the distance metric.
Definition at line 489 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::distance_metric_.
|
inline |
Get the threshold for chunk boundaries.
Definition at line 463 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::dtw_threshold_.
|
inline |
Get the size of the warping window.
Definition at line 455 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::window_size_.
|
inline |
Set the distance metric.
| metric | Distance metric |
Definition at line 497 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::distance_metric_.
|
inline |
Set the threshold for chunk boundaries.
| threshold | Threshold for chunk boundaries |
Definition at line 481 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::dtw_threshold_.
|
inline |
Set the size of the warping window.
| size | Size of the warping window |
Definition at line 471 of file sophisticated_chunking.hpp.
References sophisticated_chunking::DTWChunking< T >::window_size_.
|
private |
|
private |
Definition at line 313 of file sophisticated_chunking.hpp.
Referenced by sophisticated_chunking::DTWChunking< T >::chunk(), sophisticated_chunking::DTWChunking< T >::get_dtw_threshold(), and sophisticated_chunking::DTWChunking< T >::set_dtw_threshold().
|
private |
Definition at line 312 of file sophisticated_chunking.hpp.
Referenced by sophisticated_chunking::DTWChunking< T >::compute_dtw_core(), sophisticated_chunking::DTWChunking< T >::get_window_size(), and sophisticated_chunking::DTWChunking< T >::set_window_size().