|
Advanced Chunk Processing Library 0.2.0
A comprehensive C++ library for advanced data chunking strategies and processing operations
|
Class implementing neural network-based chunking. More...
#include <neural_chunking.hpp>
Collaboration diagram for neural_chunking::NeuralChunking< T >:Public Member Functions | |
| NeuralChunking (size_t window_size=8, double threshold=0.5) | |
| std::vector< std::vector< T > > | chunk (const std::vector< T > &data) const |
| std::string | get_activation () const |
| Get the current activation function type. | |
| size_t | get_batch_size () const |
| Get the current batch size. | |
| size_t | get_epochs () const |
| Get the current number of training epochs. | |
| double | get_learning_rate () const |
| Get the current learning rate. | |
| double | get_threshold () const |
| size_t | get_window_size () const |
| void | set_activation (const std::string &activation) |
| Set the activation function type. | |
| void | set_batch_size (size_t size) |
| Set the batch size for training. | |
| void | set_epochs (size_t num_epochs) |
| Set the number of training epochs. | |
| void | set_learning_rate (double rate) |
| Set the learning rate for neural network training. | |
| void | set_threshold (double threshold) |
| void | set_window_size (size_t size) |
| std::vector< double > | train (const std::vector< T > &data) |
| Train the neural network on the provided data. | |
Private Member Functions | |
| double | activation_derivative (double x) const |
| double | apply_activation (double x) const |
| template<typename U > | |
| double | compute_feature (const U &arr) const |
| std::vector< double > | prepare_batch (const std::vector< T > &data, size_t start_idx) const |
Private Attributes | |
| std::string | activation_ |
| size_t | batch_size_ |
| size_t | epochs_ |
| double | learning_rate_ |
| double | threshold_ |
| size_t | window_size_ |
Class implementing neural network-based chunking.
| T | Data type of elements to chunk |
Definition at line 81 of file neural_chunking.hpp.
|
inline |
Definition at line 149 of file neural_chunking.hpp.
|
inlineprivate |
Definition at line 101 of file neural_chunking.hpp.
|
inlineprivate |
Definition at line 91 of file neural_chunking.hpp.
|
inline |
Definition at line 167 of file neural_chunking.hpp.
|
inlineprivate |
Definition at line 129 of file neural_chunking.hpp.
|
inline |
Get the current activation function type.
Definition at line 260 of file neural_chunking.hpp.
|
inline |
Get the current batch size.
Definition at line 240 of file neural_chunking.hpp.
|
inline |
Get the current number of training epochs.
Definition at line 279 of file neural_chunking.hpp.
|
inline |
Get the current learning rate.
Definition at line 221 of file neural_chunking.hpp.
|
inline |
Definition at line 163 of file neural_chunking.hpp.
|
inline |
Definition at line 160 of file neural_chunking.hpp.
Referenced by main().
|
inlineprivate |
Definition at line 114 of file neural_chunking.hpp.
|
inline |
Set the activation function type.
| activation | Activation function name ("relu", "sigmoid", or "tanh") |
Definition at line 248 of file neural_chunking.hpp.
|
inline |
Set the batch size for training.
| size | Batch size (must be positive) |
Definition at line 229 of file neural_chunking.hpp.
|
inline |
Set the number of training epochs.
| num_epochs | Number of epochs (must be positive) |
Definition at line 268 of file neural_chunking.hpp.
|
inline |
Set the learning rate for neural network training.
| rate | Learning rate value (must be positive) |
Definition at line 210 of file neural_chunking.hpp.
|
inline |
Definition at line 156 of file neural_chunking.hpp.
Referenced by main().
|
inline |
Definition at line 153 of file neural_chunking.hpp.
|
inline |
Train the neural network on the provided data.
| data | Training data |
Definition at line 288 of file neural_chunking.hpp.
References neural_chunking::Layer< T >::forward().
|
private |
Definition at line 87 of file neural_chunking.hpp.
|
private |
Definition at line 86 of file neural_chunking.hpp.
|
private |
Definition at line 88 of file neural_chunking.hpp.
|
private |
Definition at line 85 of file neural_chunking.hpp.
|
private |
Definition at line 84 of file neural_chunking.hpp.
|
private |
Definition at line 83 of file neural_chunking.hpp.