.. index:: single: dimension_reducer_protocol .. _dimension_reducer_protocol/0: .. rst-class:: right **protocol** ``dimension_reducer_protocol`` ============================== Protocol for machine learning dimension reducers. | **Availability:** | ``logtalk_load(dimension_reduction_protocols(loader))`` | **Author:** Paulo Moura | **Version:** 1:0:0 | **Date:** 2026-04-30 | **Compilation flags:** | ``static`` | **Dependencies:** | (none) | **Remarks:** | (none) | **Inherited public predicates:** | (none) .. contents:: :local: :backlinks: top Public predicates ----------------- .. index:: learn/3 .. _dimension_reducer_protocol/0::learn/3: ``learn/3`` ^^^^^^^^^^^ Learns a dimension reducer from the given dataset object using the given options. | **Compilation flags:** | ``static`` | **Template:** | ``learn(Dataset,DimensionReducer,Options)`` | **Mode and number of proofs:** | ``learn(+object_identifier,-compound,++list(compound))`` - ``one`` ------------ .. index:: learn/2 .. _dimension_reducer_protocol/0::learn/2: ``learn/2`` ^^^^^^^^^^^ Learns a dimension reducer from the given dataset object using default options. | **Compilation flags:** | ``static`` | **Template:** | ``learn(Dataset,DimensionReducer)`` | **Mode and number of proofs:** | ``learn(+object_identifier,-compound)`` - ``one`` ------------ .. index:: transform/3 .. _dimension_reducer_protocol/0::transform/3: ``transform/3`` ^^^^^^^^^^^^^^^ Transforms a new instance into a reduced representation using the learned dimension reducer. The instance is a list of ``Attribute-Value`` pairs and the reduced representation is a list of ``Component-Value`` pairs. | **Compilation flags:** | ``static`` | **Template:** | ``transform(DimensionReducer,Instance,ReducedInstance)`` | **Mode and number of proofs:** | ``transform(+compound,+list,-list(pair))`` - ``one`` ------------ .. index:: check_dimension_reducer/1 .. _dimension_reducer_protocol/0::check_dimension_reducer/1: ``check_dimension_reducer/1`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Checks that a learned dimension reducer term is structurally valid for the receiving implementation. Throws an exception when the term is not a valid dimension reducer representation. | **Compilation flags:** | ``static`` | **Template:** | ``check_dimension_reducer(DimensionReducer)`` | **Mode and number of proofs:** | ``check_dimension_reducer(@compound)`` - ``one_or_error`` | **Exceptions:** | ``DimensionReducer`` is a variable: | ``instantiation_error`` | ``DimensionReducer`` is neither a variable nor a valid dimension reducer: | ``domain_error(dimension_reducer,DimensionReducer)`` ------------ .. index:: valid_dimension_reducer/1 .. _dimension_reducer_protocol/0::valid_dimension_reducer/1: ``valid_dimension_reducer/1`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ True when a learned dimension reducer term is structurally valid for the receiving implementation. Succeeds iff ``check_dimension_reducer/1`` succeeds without throwing an exception. | **Compilation flags:** | ``static`` | **Template:** | ``valid_dimension_reducer(DimensionReducer)`` | **Mode and number of proofs:** | ``valid_dimension_reducer(@compound)`` - ``zero_or_one`` ------------ .. index:: diagnostics/2 .. _dimension_reducer_protocol/0::diagnostics/2: ``diagnostics/2`` ^^^^^^^^^^^^^^^^^ Returns diagnostics and metadata associated with a learned dimension reducer in a representation-independent way. | **Compilation flags:** | ``static`` | **Template:** | ``diagnostics(DimensionReducer,Diagnostics)`` | **Mode and number of proofs:** | ``diagnostics(+compound,-list(compound))`` - ``one`` ------------ .. index:: diagnostic/2 .. _dimension_reducer_protocol/0::diagnostic/2: ``diagnostic/2`` ^^^^^^^^^^^^^^^^ Tests or enumerates individual diagnostics metadata terms for a learned dimension reducer. | **Compilation flags:** | ``static`` | **Template:** | ``diagnostic(DimensionReducer,Diagnostic)`` | **Mode and number of proofs:** | ``diagnostic(+compound,?compound)`` - ``zero_or_more`` ------------ .. index:: dimension_reducer_options/2 .. _dimension_reducer_protocol/0::dimension_reducer_options/2: ``dimension_reducer_options/2`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns the effective training options recorded in a learned dimension reducer diagnostics list. | **Compilation flags:** | ``static`` | **Template:** | ``dimension_reducer_options(DimensionReducer,Options)`` | **Mode and number of proofs:** | ``dimension_reducer_options(+compound,-list(compound))`` - ``zero_or_one`` ------------ .. index:: export_to_clauses/4 .. _dimension_reducer_protocol/0::export_to_clauses/4: ``export_to_clauses/4`` ^^^^^^^^^^^^^^^^^^^^^^^ Converts a dimension reducer into a list of predicate clauses. ``Functor`` is the functor for the generated single-argument predicate clauses whose argument is the serialized dimension reducer term. | **Compilation flags:** | ``static`` | **Template:** | ``export_to_clauses(Dataset,DimensionReducer,Functor,Clauses)`` | **Mode and number of proofs:** | ``export_to_clauses(+object_identifier,+compound,+callable,-list(clause))`` - ``one`` ------------ .. index:: export_to_file/4 .. _dimension_reducer_protocol/0::export_to_file/4: ``export_to_file/4`` ^^^^^^^^^^^^^^^^^^^^ Exports a dimension reducer to a file. ``Functor`` is the functor for the generated single-argument predicate clauses whose argument is the serialized dimension reducer term. | **Compilation flags:** | ``static`` | **Template:** | ``export_to_file(Dataset,DimensionReducer,Functor,File)`` | **Mode and number of proofs:** | ``export_to_file(+object_identifier,+compound,+callable,+atom)`` - ``one`` ------------ .. index:: print_dimension_reducer/1 .. _dimension_reducer_protocol/0::print_dimension_reducer/1: ``print_dimension_reducer/1`` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prints a dimension reducer to the current output stream in a human-readable format. | **Compilation flags:** | ``static`` | **Template:** | ``print_dimension_reducer(DimensionReducer)`` | **Mode and number of proofs:** | ``print_dimension_reducer(+compound)`` - ``one`` ------------ Protected predicates -------------------- (none) Private predicates ------------------ (none) Operators --------- (none) .. seealso:: :ref:`dimension_reduction_dataset_protocol `, :ref:`supervised_dimension_reduction_dataset_protocol `, :ref:`target_supervised_dimension_reduction_dataset_protocol `