Metadata-Version: 2.1
Name: pairwiseprediction
Version: 0.240306.5
Summary: Handle a regression problem inducing the model on pairs A,B of instances
Author: davips
Author-email: dpsabc@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: scikit-learn (>=1.3.2,<2.0.0)
Description-Content-Type: text/markdown

![test](https://github.com/davips/pairwiseprediction/workflows/test/badge.svg)
[![codecov](https://codecov.io/gh/davips/pairwiseprediction/branch/main/graph/badge.svg)](https://codecov.io/gh/davips/pairwiseprediction)
<a href="https://pypi.org/project/pairwiseprediction">
<img src="https://img.shields.io/pypi/v/pairwiseprediction.svg?label=release&color=blue&style=flat-square" alt="pypi">
</a>
![Python version](https://img.shields.io/badge/python-3.10+-blue.svg)
[![license: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

[![API documentation](https://img.shields.io/badge/API-autogenerated-a030a0.svg)](https://davips.github.io/pairwiseprediction)
[![Downloads](https://static.pepy.tech/badge/pairwiseprediction)](https://pepy.tech/project/pairwiseprediction)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pairwiseprediction)

# pairwiseprediction
[Latest Release](https://pypi.org/project/pairwiseprediction) |
[Current Code](https://github.com/davips/pairwiseprediction) |
[API Documentation](https://davips.github.io/pairwiseprediction)

---


Handle a regression problem inducing the model on pairs A,B of instances.

Last column of `X` is the continuous target. `y` is ignored.

Four modes are hipotetically possible, although only mode 2 is provided by now to ease compatibility with sklearn:
* a classification algorithm is trained to tell when instance A has higher target than instance B
  * 1) the prediction is based on interpolation which is the type of result expected from a regression
  * 2) the interpolated value can be converted to a hard prediction through binarization
* a regression algorithm is trained to predict the difference between target values of A,B
  * 3) the prediction is the value provided directly by the regressor
  * 4) the regression value can be converted to a hard prediction through binarization

