dasf.transforms.base
Definition of the generic operators of the pipeline.
Classes
Class representing a generic Operator of the pipeline. |
|
Class representing a Fit operation of the pipeline. |
|
Class representing a Fit with Predict operation of the pipeline. |
|
Class representing a Fit with Transform operation of the pipeline. |
|
Class representing a Predict operation of the pipeline. |
|
Class representing a Get Parameters operation of the pipeline. |
|
Class representing a Set Parameters operation of the pipeline. |
|
Class representing a Transform operation of the pipeline. |
|
Class representing a Targetered Transform operation of the pipeline. |
|
Class representing a MappedTransform based on Transform |
|
Class representing a Reduction based on Transform |
Module Contents
- class dasf.transforms.base.Fit[source]
Bases:
Operator
Class representing a Fit operation of the pipeline.
- abstract _fit_cpu(X, y=None, **kwargs)[source]
Respective immediate fit mocked function for local CPU(s).
- class dasf.transforms.base.FitPredict[source]
Bases:
Operator
Class representing a Fit with Predict operation of the pipeline.
- abstract _lazy_fit_predict_cpu(X, y=None, **kwargs)[source]
Respective lazy fit with predict mocked function for CPUs.
- abstract _lazy_fit_predict_gpu(X, y=None, **kwargs)[source]
Respective lazy fit with predict mocked function for GPUs.
- abstract _fit_predict_cpu(X, y=None, **kwargs)[source]
Respective immediate fit with predict mocked function for local CPU(s).
- class dasf.transforms.base.FitTransform[source]
Bases:
Operator
Class representing a Fit with Transform operation of the pipeline.
- abstract _lazy_fit_transform_cpu(X, y=None, **kwargs)[source]
Respective lazy fit with transform mocked function for CPUs.
- abstract _lazy_fit_transform_gpu(X, y=None, **kwargs)[source]
Respective lazy fit with transform mocked function for GPUs.
- abstract _fit_transform_cpu(X, y=None, **kwargs)[source]
Respective immediate fit with transform mocked function for local CPU(s).
- class dasf.transforms.base.Predict[source]
Bases:
Operator
Class representing a Predict operation of the pipeline.
- abstract _lazy_predict_cpu(X, sample_weight=None, **kwargs)[source]
Respective lazy predict mocked function for CPUs.
- abstract _lazy_predict_gpu(X, sample_weight=None, **kwargs)[source]
Respective lazy predict mocked function for GPUs.
- abstract _predict_cpu(X, sample_weight=None, **kwargs)[source]
Respective immediate predict mocked function for local CPU(s).
- class dasf.transforms.base.GetParams[source]
Bases:
Operator
Class representing a Get Parameters operation of the pipeline.
- abstract _lazy_get_params_cpu(deep=True, **kwargs)[source]
Respective lazy get_params mocked function for CPUs.
- abstract _lazy_get_params_gpu(deep=True, **kwargs)[source]
Respective lazy get_params mocked function for GPUs.
- abstract _get_params_cpu(deep=True, **kwargs)[source]
Respective immediate get_params mocked function for local CPU(s).
- class dasf.transforms.base.SetParams[source]
Bases:
Operator
Class representing a Set Parameters operation of the pipeline.
- abstract _lazy_set_params_cpu(**params)[source]
Respective lazy set_params mocked function for CPUs.
- abstract _lazy_set_params_gpu(**params)[source]
Respective lazy set_params mocked function for GPUs.
- abstract _set_params_cpu(**params)[source]
Respective immediate set_params mocked function for local CPU(s).
- class dasf.transforms.base.Transform[source]
Bases:
Operator
Class representing a Transform operation of the pipeline.
- abstract _lazy_transform_cpu(X, **kwargs)[source]
Respective lazy transform mocked function for CPUs.
- abstract _lazy_transform_gpu(X, **kwargs)[source]
Respective lazy transform mocked function for GPUs.
- abstract _transform_cpu(X, **kwargs)[source]
Respective immediate transform mocked function for local CPU(s).
- class dasf.transforms.base.TargeteredTransform(run_local=None, run_gpu=None)[source]
Bases:
Transform
Class representing a Targetered Transform operation of the pipeline.
This specific transform operates according the parameters of the constructor.
Parameters
- run_localbool
Define that the operator will run locally and not distributed.
- run_gpubool
Define if the operator will use GPU(s) or not.
Constructor of the class TargeteredTransform.
- _run_local
- _run_gpu
- class dasf.transforms.base.MappedTransform(function, depth=None, boundary=None, trim=True, output_chunk=None, drop_axis=None, new_axis=None)[source]
Bases:
Transform
Class representing a MappedTransform based on Transform object.
This object refers to any operation that can be done in blocks. In special, for Dask chunks. There are several ways of doing that. This class tries to simplify how the functions are applied into a block.
Parameters
- functionCallable
A function that will be applied in a block.
- depthtuple
The value of the boundary elements per axis (the default is None).
- boundarystr
The type of the boundary. See Dask boundaries for more examples (the default is None).
- trimbool
Option to trim the data after an overlap (the default is True).
- output_chunktuple
New shape of the output after computing the function (the default is None).
- drop_axistuple
Which axis should be deleted after computing the function (the default is None).
- new_axistuple
Which axis represent a new axis after computing the function (the default is None).
- function
- depth
- boundary
- trim
- output_chunk
- drop_axis
- new_axis
- __lazy_transform_generic(X, xp, **kwargs)
- _transform_cpu(X, **kwargs)[source]
Respective immediate transform mocked function for local CPU(s).
- class dasf.transforms.base.ReductionTransform(output_size, func_aggregate, func_chunk, func_combine=None)[source]
Bases:
Transform
Class representing a Reduction based on Transform object.
This is a simple MapReduction operation using Dask.
Parameters
- output_sizetuple
The size of the new output.
- func_aggregateCallable
The function called to aggregate the result of each chunk.
- func_chunkCallable
The function applied in each chunk.
- func_combineCallable
The function to combine each reduction of aggregate (the default is None).
- output_size
- func_aggregate
- func_chunk
- func_combine
- _lazy_transform_cpu(X, *args, **kwargs)[source]
Respective lazy transform mocked function for CPUs.
- _lazy_transform_gpu(X, *args, **kwargs)[source]
Respective lazy transform mocked function for GPUs.
- _transform_cpu(X, *args, **kwargs)[source]
Respective immediate transform mocked function for local CPU(s).