Skip to main content

Information Equivalent Designs (Two-Point Reduction)

Project description

Yes, the Information Equivalent Two-Point Design (or information-preserving reduction) is a concept from optimal experimental design and information theory in statistics, especially in design of experiments (DoE). Here's a deeper explanation of the theory behind your function and where it fits in:


THEORY: Information Equivalent Designs (Two-Point Reduction)

Objective:

To replace a complex dataset with a simplified two-point design that preserves the same information about a model parameter, usually the mean or location parameter, under a linear or polynomial regression framework.


💡 Context:

Suppose you have a weighted dataset $(x_i, f_i)$ where:

  • $x_i$: design points (levels of a factor)
  • $f_i$: frequencies or weights (how often that point appears)

Rather than keeping all these points, we want to approximate this design with only two support points, say:

  • $x_A$ with weight $r$
  • $x_B$ with weight $N - r$

Such that the statistical information about the mean or some parameter is unchanged.


Key Concepts Involved:

1. Information Matrix

In linear regression $y = \beta x + \epsilon$, the information matrix of the design is:

$$ I = \sum f_i (x_i - \bar{x})^2 $$

We aim to find two new values $x_A$ and $x_B$, with appropriate frequencies $r$ and $N - r$, such that the information matrix is the same.


2. Standardized Design

You normalize the data to make calculations scale-invariant:

$$ d_i = \frac{x_i - \bar{x}}{\max(x) - \bar{x}} $$

This allows focusing only on the relative spread and centrality.


3. Moments of the Design

  • $\mu_1 = \frac{1}{N} \sum f_i d_i$ : first central moment (mean)
  • $\mu_2 = \frac{1}{N} \sum f_i d_i^2$ : second raw moment
  • $\mu_{22} = \mu_2 - \mu_1^2$ : central second moment (variance)

These determine the shape of the distribution.


4. Finding Bounds (L and U)

You compute bounds $L$ and $U$ for feasible integer allocations of weight $r$ that will preserve the original information:

$$ L = \frac{N \cdot \mu_{22}}{(1 + \mu_1)^2 + \mu_{22}} \ U = \frac{N \cdot (1 - \mu_1)^2}{(1 - \mu_1)^2 + \mu_{22}} $$

Only if $U - L > 1$, do feasible two-point equivalents exist.


5. Finding Equivalent Points

For each valid $r \in [\lceil L \rceil, \lfloor U \rfloor]$, calculate:

  • Two symmetric points around the mean that match the original design's spread:

$$ x_A = \mu_1 - \sqrt{\frac{N - r}{r} \cdot \mu_{22}} \ x_B = \mu_1 + \sqrt{\frac{r}{N - r} \cdot \mu_{22}} $$

These will become the new support points with weights $r$ and $N - r$.


Applications:

  • Reducing design complexity in regression without losing information.
  • Simplifying optimal designs in statistics and engineering.
  • Used in experimental planning when cost or resources are limited.
  • Sometimes used in machine learning for data reduction or kernel approximation.

Example in Real Life:

If you’re testing 6 drug doses with varying frequencies and want to reduce the testing to just two key doses that statistically represent the same variability and effect, this method gives you the way to choose those two doses.


📊 Information Equivalent Design (Two-Point Reduction)

This Python package provides a method for reducing an original frequency distribution to a two-point design with equivalent information. The approach is based on preserving the first and second central moments, ensuring statistical equivalence in terms of spread and location.


📦 Installation

To install the package, use:

pip install infoeqv

Or, if you have the source code locally:

pip install .

🧠 Theory

Given a frequency distribution ((x, f)), the goal is to reduce the distribution into a two-point support design that retains its information structure.

We compute:

  • ( \mu_1 ): weighted mean of the normalized values
  • ( \mu_2 ): second raw moment
  • ( \mu_{22} = \mu_2 - \mu_1^2 ): second central moment
  • ( N ): total frequency

Then calculate:

[ L = \frac{N \cdot \mu_{22}}{(1 + \mu_1)^2 + \mu_{22}}, \quad U = \frac{N \cdot (1 - \mu_1)^2}{(1 - \mu_1)^2 + \mu_{22}} ]

Only if ( U - L > 1 ), feasible two-point equivalents exist.

Then for each ( r \in [ \lceil L \rceil , \lfloor U \rfloor ] ), calculate:

[ x_A = \mu_1 - \sqrt{ \frac{N - r}{r} \cdot \mu_{22} }, \quad x_B = \mu_1 + \sqrt{ \frac{r}{N - r} \cdot \mu_{22} } ]

These ( x_A ) and ( x_B ) are the new support points with weights ( r ) and ( N - r ) respectively.


Usage

from infeqvdesign import info_eqv_design

x = [1, 2, 3, 4, 5, 6]
f = [6, 5, 4, 3, 2, 1]

info_eqv_design(x, f)

Example Output

[[ 5.  16.  1.49  4.93]
 [ 6.  15.  1.33  5.09]
 [ 7.  14.  1.18  5.24]
 [ 8.  13.  1.04  5.38]
 [ 9.  12.  0.91  5.51]
 [10.  11.  0.79  5.63]]

Each row contains:

r N - r x_A x_B
weight 1 weight 2 equivalent point A equivalent point B

Requirements

  • Python 3.6+
  • NumPy

Install dependencies manually with:

pip install numpy

Author


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infoeqv-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infoeqv-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file infoeqv-1.0.0.tar.gz.

File metadata

  • Download URL: infoeqv-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for infoeqv-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e1485c01e11110a08e0cda2295e4e9ed30e3da41d08913c6c6fbe269196e54bb
MD5 21b2021e70daf8e05dbe0a6bb90c0708
BLAKE2b-256 7f2256ae8bacedc77b69e02c5f8974b394c13720b488a33ae5227cab023d8503

See more details on using hashes here.

File details

Details for the file infoeqv-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: infoeqv-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for infoeqv-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 294324131b4eeed6d4cfe43b35bd55c2482fa6714eb9abeb8e12b6698307ca35
MD5 6eec75243cc7817dbb461c228063b717
BLAKE2b-256 81117932d0144015b83f6a10d8e60c8b802588fa5425e5e4cdaa6eb76d463679

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page