Skip to main content

Information Equivalent Designs (Two-Point Reduction)

Project description

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 .

Usage (How to Use)

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

Rohit Kumar Behera GitHub: @muinrohit


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-4.0.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

infoeqv-4.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for infoeqv-4.0.0.tar.gz
Algorithm Hash digest
SHA256 6c824cfe96805643187f65ccd401d88d62b091ea63d125aa1df79743dd6b680b
MD5 ec0688f59d331193bcf60e6ebeb7470f
BLAKE2b-256 4738ea5b67de527e5fbfbd29a4b0f849229020d980240698443488b824be5622

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for infoeqv-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06094978b1b1779aeebb72e1318e06ccf41d7f336d573cee61388cf6fea3fd77
MD5 d303e071dbfb367e6e14d5181b283d57
BLAKE2b-256 30456076a7b78e1144586e11bd928726ec891d070ecc6639c14c498993f2cd04

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