ricker_wavelet_expansion
Bases: discrete_wavelet_expansion
Ricker (Mexican Hat) Wavelet Expansion.
Applies the Ricker wavelet function for feature expansion.
Notes
Formally, given the input variable \(\mathbf{x} \in R^{m}\), to approximate the underlying mapping \(f: R^m \to R^n\) with wavelet analysis, we can define the approximated output as
\[ \begin{equation} f(\mathbf{x}) \approx \sum_{s, t} \left \langle f(\mathbf{x}), \phi_{s, t} (\mathbf{x} | a, b) \right \rangle \cdot \phi_{s, t} (\mathbf{x} | a, b), \end{equation} \]
where \(\phi_{s, t} (\cdot | a, b)\) denotes the child wavelet defined by hyper-parameters \(a > 1\) and \(b > 0\):
\[ \begin{equation} \phi_{s, t}(x | a, b) = \frac{1}{\sqrt{a^s}} \phi \left( \frac{x - t \cdot b \cdot a^s}{a^s} \right). \end{equation} \]
Based on the wavelet mapping \(\phi_{s, t} (\cdot | a, b)\), we can introduce the \(1_{st}\)-order and \(2_{nd}\)-order wavelet data expansion functions as follows:
\[ \begin{equation} \kappa(\mathbf{x} | d=1) = \left[ \phi_{0, 0}(\mathbf{x}), \phi_{0, 1}(\mathbf{x}), \cdots, \phi_{s, t}(\mathbf{x}) \right] \in R^{D_1}. \end{equation} \]
and
\[ \begin{equation} \kappa(\mathbf{x} | d=2) = \kappa(\mathbf{x} | d=1) \otimes \kappa(\mathbf{x} | d=1) \in R^{D_2}. \end{equation} \]
The output dimensions of the order-1 and order-2 wavelet expansions are \(D_1 = s \cdot t \cdot m\) and \(D_2 = (s \cdot t \cdot m)^2\), respectively.
Specifically, the functions \(\left\{ \phi_{s, t}\right\}_{ s, t \in Z}\) defines the orthonormal basis of the space and the mapping \(\phi(\cdot)\) used in the child wavelet may have different representations.
For Ricker wavelet, it can be represented as follows:
Ricker Wavelet:
\[ \begin{equation} \begin{aligned} &\phi(\tau) = \frac{2 \left( 1 - \left( \frac{\tau}{\sigma} \right)^2 \right)}{\sqrt{3 \sigma} \pi^{\frac{1}{4}}} \exp\left(- \frac{\tau^2}{2 \sigma^2} \right). \end{aligned} \end{equation} \]
Attributes:
Name | Type | Description |
---|---|---|
wavelet |
callable
|
Ricker wavelet function used during the transformation. |
Methods:
Name | Description |
---|---|
Inherits all methods from `discrete_wavelet_expansion`. |
|
Source code in tinybig/expansion/wavelet_expansion.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
|
__init__(name='ricker_wavelet_expansion', a=1.0, b=1.0, sigma=1.0, *args, **kwargs)
Initializes the Ricker (Mexican hat) wavelet expansion.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the transformation. Defaults to 'ricker_wavelet_expansion'. |
'ricker_wavelet_expansion'
|
a
|
float
|
The scaling factor for the wavelet. Defaults to 1.0. |
1.0
|
b
|
float
|
The translation factor for the wavelet. Defaults to 1.0. |
1.0
|
sigma
|
float
|
Standard deviation for the wavelet. Defaults to 1.0. |
1.0
|
*args
|
tuple
|
Additional positional arguments. |
()
|
**kwargs
|
dict
|
Additional keyword arguments. |
{}
|