pytorch_forecasting.data.encoders.NaNLabelEncoder#
- class pytorch_forecasting.data.encoders.NaNLabelEncoder(add_nan: bool = False, warn: bool = True)[source]#
Labelencoder that can optionally always encode nan and unknown classes (in transform) as class
0init NaNLabelEncoder
- Returns:
add_nan – if to force encoding of nan at 0
warn – if to warn if additional nans are added because items are unknown
- __init__(add_nan: bool = False, warn: bool = True)[source]#
init NaNLabelEncoder
- Returns:
add_nan – if to force encoding of nan at 0
warn – if to warn if additional nans are added because items are unknown
Methods
__call__(data)Extract prediction from network output.
__delattr__(name, /)Implement delattr(self, name).
__dir__()Default dir() implementation.
__eq__(value, /)Return self==value.
__format__(format_spec, /)Default object formatter.
__ge__(value, /)Return self>=value.
__getattribute__(name, /)Return getattr(self, name).
__getstate__()Helper for pickle.
__gt__(value, /)Return self>value.
__hash__()Return hash(self).
__init_subclass__(**kwargs)Set the
set_{method}_requestmethods.__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__ne__(value, /)Return self!=value.
__new__(*args, **kwargs)__reduce__()Helper for pickle.
__reduce_ex__(protocol, /)Helper for pickle.
__repr__()Return repr(self).
__setattr__(name, value, /)Implement setattr(self, name, value).
__setstate__(state)__sizeof__()Size of object in memory, in bytes.
__sklearn_clone__()__sklearn_tags__()__str__()Return str(self).
__subclasshook__Abstract classes can override this to customize issubclass().
_get_class_level_metadata_request_values(...)Get class level metadata request values.
_get_doc_link()Generates a link to the API documentation for a given estimator.
_get_fitted_attr_html([doc_link])Get fitted attributes of the estimator.
_get_metadata_request()Get requested metadata for the instance.
_get_param_names()Get parameter names for the estimator
_get_params_html([deep, doc_link])Get parameters for this estimator with a specific HTML representation.
_html_repr()Build an HTML representation of an estimator.
_repr_html_inner()This function is returned by the @property _repr_html_ to make hasattr(estimator, "_repr_html_") return `True or False depending on get_config()["display"].
_repr_mimebundle_(**kwargs)Mime bundle used by jupyter kernels to display estimator
_validate_params()Validate types and values of constructor parameters
extra_repr()Return extra information about parameters for representation/logging.
fit(y[, overwrite])Fit transformer
fit_transform(y[, overwrite])Fit and transform data.
get_metadata_routing()Get metadata routing of this object.
get_parameters([groups, group_names])Get fitted scaling parameters for a given group.
get_params([deep])Get parameters for this estimator.
get_transform(transformation)Return transformation functions.
inverse_preprocess(y)Inverse preprocess re-scaled data (e.g. take exp).
inverse_transform(y)Decode data, i.e. transform from integers to labels.
is_numeric(y)Determine if series is numeric or not.
preprocess(y)Preprocess input data (e.g. take log).
set_fit_request(*[, overwrite])Configure whether metadata should be requested to be passed to the
fitmethod.set_output(*[, transform])Set output container.
set_params(**params)Set the parameters of this estimator.
set_transform_request(*[, ignore_na, ...])Configure whether metadata should be requested to be passed to the
transformmethod.transform(y[, return_norm, target_scale, ...])Encode iterable with integers.
Attributes
TRANSFORMATIONS__annotations____dict____doc____module____weakref__list of weak references to the object
_doc_link_module_doc_link_template_doc_link_url_param_generator_repr_html_HTML representation of estimator.
_sklearn_auto_wrap_output_keys