DummyFeature#

class deeptrack.features.DummyFeature(_input: Any | None = None, **kwargs: Any)#

Bases: Feature

A no-op feature that simply returns the inputs unchanged.

DummyFeature can serve as a container for properties that do not directly transform the data but need to be logically grouped.

Any keyword arguments passed to the constructor are stored as Property instances in self.properties, enabling dynamic behavior or parameterization without performing any transformations on the input data.

Parameters#

inputs: Any, optional

Optional inputs for the feature. Defaults to an empty list.

**kwargs: Any

Additional keyword arguments are wrapped as Property instances and stored in self.properties.

Methods#

get(inputs, **kwargs) -> Any

Simply returns the inputs unchanged.

Examples#

>>> import deeptrack as dt

Pass some input through a DummyFeature to demonstrate no changes.

Create the input:

>>> dummy_input = [1, 2, 3, 4, 5]

Initialize the DummyFeature with two property:

>>> dummy_feature = dt.DummyFeature(prop1=42, prop2=3.14)

Pass the input through the DummyFeature:

>>> dummy_output = dummy_feature(dummy_input)
>>> dummy_output
[1, 2, 3, 4, 5]

The output is identical to the input.

Access a property stored in DummyFeature:

>>> dummy_feature.prop1()
42

Methods Summary

get(inputs, **kwargs)

Return the input unchanged.

Methods Documentation

get(inputs: Any, **kwargs: Any) Any#

Return the input unchanged.

This method simply returns the input without any transformation. It adheres to the Feature interface by accepting additional keyword arguments for consistency, although they are not used.

Parameters#

inputs: Any

The input to pass through without modification.

**kwargs: Any

Additional properties sampled from self.properties or passed externally. These are unused here but provided for consistency with the Feature interface.

Returns#

Any

The input without modifications.