Zurück zu den Modellen
Transformer

HOG1DTransformer

HOG1D transform.

This class is to calculate the HOG1D transform of a dataframe of time series data. Works by splitting the time series num_intervals times, and calculate a histogram of gradients within each interval.

Schnellstart

python
from sktime.transformations.hog1d import HOG1DTransformer

estimator = HOG1DTransformer(num_intervals=2, num_bins=8, scaling_factor=0.1)

Parameter(3)

num_intervalsint, default=2
length of interval.
num_binsint, default=8
num bins in the histogram.
scaling_factorfloat, default=0.1
a constant that is multiplied to modify the distribution.

Beispiele

>>> from sktime.transformations.hog1d import HOG1DTransformer
>>> from sktime.datasets import load_arrow_head
>>> 
>>> X, y = load_arrow_head (return_X_y = True)
>>> 
>>> # Initialize the transformer
>>> hog1d_transformer = HOG1DTransformer (
... num_intervals = 5, num_bins = 8, scaling_factor = 0.1
... )
>>> 
>>> # Transform the data
>>> Xt = hog1d_transformer. fit_transform (X)