cuvis_ai.deciders.combining_decider.CombiningDecider
- class cuvis_ai.deciders.combining_decider.CombiningDecider(channel_count: int | None = None, rule: Callable[[ndarray], bool] | None = None)[source]
Bases:
BaseDecider
Decider using values of multiple channels to classify the result. The data of all channels at a spatial location are utilized in the chosen decision strategy to classify each data point.
- Parameters:
channel_count (int) – The number of channels to expect
rule (Callable[[np.ndarray], bool]) – The decision strategy to use.
all_agree()
andat_least_n_agree()
are provided here. Custom strategies may also be used.
- __init__(channel_count: int | None = None, rule: Callable[[ndarray], bool] | None = None) None [source]
Methods
__init__
([channel_count, rule])Check that the parameters for the input data data match user expectations
Check that the parameters for the output data data match user expectations
fit
(X)forward
(X)Apply the chosen :arg:`rule` to the input data. :param X: Data to classify. :type X: np.ndarray.
load
(params, filepath)Load this node from a serialized graph.
serialize
(directory)Convert the class into a serialized representation
set_fit_meta_request
(**kwargs)set_forward_meta_request
(**kwargs)Attributes
Returns the needed shape for the input data.
Returns the provided shape for the output data.
- check_input_dim(X)
Check that the parameters for the input data data match user expectations
Parameters: X (array-like): Input data.
Returns: (Bool) Valid data
- check_output_dim(X)
Check that the parameters for the output data data match user expectations
Parameters: X (array-like): Input data.
Returns: (Bool) Valid data
- fit(X)
- forward(X: ndarray) ndarray [source]
Apply the chosen :arg:`rule` to the input data. :param X: Data to classify. :type X: np.ndarray
- Returns:
Data classified to a single channel boolean matrix.
- Return type:
np.ndarray
- get_fit_requested_meta()
- get_forward_requested_meta()
- property input_dim
Returns the needed shape for the input data. If a dimension is not important, it will return -1 in the specific position.
Returns: (tuple) needed shape for data
- property output_dim
Returns the provided shape for the output data. If a dimension is not important it will return -1 in the specific position.
- Returns:
Provided shape for data
- Return type:
- set_fit_meta_request(**kwargs)
- set_forward_meta_request(**kwargs)