.. index:: single: regression_dataset_protocol
.. _regression_dataset_protocol/0:

.. rst-class:: right

**protocol**

``regression_dataset_protocol``
===============================

Protocol for datasets used with regression algorithms.

| **Availability:** 
|    ``logtalk_load(regression_protocols(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-04-21

| **Compilation flags:**
|    ``static``


| **Dependencies:**
|   (none)


| **Remarks:**
|    (none)

| **Inherited public predicates:**
|    (none)

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. index:: attribute_values/2
.. _regression_dataset_protocol/0::attribute_values/2:

``attribute_values/2``
^^^^^^^^^^^^^^^^^^^^^^

Enumerates by backtracking the attributes and their possible values. For discrete attributes, ``Values`` is a list of possible values. For continuous (numeric) attributes, ``Values`` is the atom ``continuous``.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``attribute_values(Attribute,Values)``
| **Mode and number of proofs:**
|    ``attribute_values(?atom,-list(atom))`` - ``zero_or_more``
|    ``attribute_values(?atom,-atom)`` - ``zero_or_more``


------------

.. index:: target/1
.. _regression_dataset_protocol/0::target/1:

``target/1``
^^^^^^^^^^^^

Returns the name of the numeric target attribute.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``target(Target)``
| **Mode and number of proofs:**
|    ``target(-atom)`` - ``one``


------------

.. index:: example/3
.. _regression_dataset_protocol/0::example/3:

``example/3``
^^^^^^^^^^^^^

Enumerates by backtracking the examples in the dataset. Each example has an ``Id``, a numeric ``Target`` value, and a list of ``Attribute-Value`` pairs.

| **Compilation flags:**
|    ``static``

| **Template:**
|    ``example(Id,Target,AttributeValues)``
| **Mode and number of proofs:**
|    ``example(-integer,-number,-list(pair))`` - ``zero_or_more``


------------

Protected predicates
--------------------

(none)

Private predicates
------------------

(none)

Operators
---------

(none)

