Skip to main content

zeromodel-analysis

zeromodel-analysis contains deterministic analysis utilities for ZeroModel Visual Policy Map artifacts. It is the second package in the ZeroModel 1.0.13 split and exposes its API through zeromodel.analysis.

The package depends on the validated core distribution, zeromodel==1.0.13. Core data objects such as ScoreTable, LayoutRecipe, and VPMArtifact should be imported from zeromodel.core, not re-exported from this package.

Install

python -m pip install zeromodel==1.0.13 zeromodel-analysis==1.0.13

Includes

  • Field comparison and fuzzy field composition.
  • Hierarchical matrix reduction and pyramids.
  • PHOS packing and top-left concentration analysis.
  • Spatial optimization and optimized view generation.
  • Matrix-pattern detection and discovered views.
  • Decision manifolds and inflection-point detection.
  • Policy diagnostics and finite policy-property checking.
  • Critic, learning, and training-progress artifact builders.
  • Lightweight tracker-export adapters for training checkpoint records.

Excludes

zeromodel-analysis deliberately excludes observation capture, vision encoders, video runtime/instrumentation, SQLAlchemy persistence, research orchestration, examples, Torch, TorchVision, Transformers, Pillow, and database runtimes.

Analysis functions operate over numeric artifacts and bounded finite policies. They do not claim semantic reasoning, causal detection, continuous formal verification, or benchmark adjudication beyond the explicit deterministic contracts documented by each API.

Minimal Comparison

import numpy as np

from zeromodel.analysis import compare_fields, vpm_and

baseline = np.array([[0.2, 0.8], [0.4, 0.1]])
candidate = np.array([[0.5, 0.7], [0.4, 0.3]])

comparison = compare_fields(baseline, candidate)
intersection = vpm_and(baseline, candidate)

Spatial Analysis

from zeromodel.analysis import SpatialOptimizer, build_optimized_view
from zeromodel.core import ScoreTable

table = ScoreTable(
    values=[[0.1, 1.0], [0.9, 0.2], [0.8, 0.3]],
    row_ids=["background", "target-a", "target-b"],
    metric_ids=["target", "noise"],
)

optimizer = SpatialOptimizer(Kc=1, Kr=2, max_evals=20)
view = build_optimized_view(table, name="target-first", optimizer=optimizer)

Finite Policy Verification

from zeromodel.analysis import PolicyPropertyChecker, PolicyPropertySpec
from zeromodel.core import LayoutRecipe, ScoreTable, build_vpm

table = ScoreTable(
    values=[[0.0, 1.0], [1.0, 0.0]],
    row_ids=["enabled=true", "enabled=false"],
    metric_ids=["WAIT", "ACT"],
)
recipe = LayoutRecipe.from_dict(
    {
        "version": "vpm-layout/0",
        "name": "policy",
        "row_order": {"kind": "source", "tie_break": "row_id"},
        "column_order": {"kind": "source"},
        "normalization": {"kind": "per_metric_minmax", "clip": True},
    }
)
artifact = build_vpm(table, recipe)

spec = PolicyPropertySpec.from_dict(
    {
        "id": "act_requires_enabled",
        "version": "1",
        "assert": {
            "implies": [
                {"eq": [{"var": "winner"}, "ACT"]},
                {"eq": [{"var": "state.enabled"}, True]},
            ]
        },
    }
)
report = PolicyPropertyChecker(artifact, action_metric_ids=("WAIT", "ACT")).check(
    [spec]
)

Download files

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

Source Distribution

zeromodel_analysis-1.1.0.tar.gz (51.9 kB view details)

Uploaded Source

Built Distribution

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

zeromodel_analysis-1.1.0-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

Details for the file zeromodel_analysis-1.1.0.tar.gz.

File metadata

  • Download URL: zeromodel_analysis-1.1.0.tar.gz
  • Upload date:
  • Size: 51.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for zeromodel_analysis-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c161f24795271ed57aaae751adf0baf9d86444ff9b22b7b623057abd48481ddb
MD5 351dc60385910c77faf43dab44609f91
BLAKE2b-256 ff4037137a8bda57a43eb2dec6b09b36046f7c8abb8d83f7c602755c1bb4d020

See more details on using hashes here.

File details

Details for the file zeromodel_analysis-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zeromodel_analysis-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 476cab53710d71eb21113a25049c081d1833e791915d7e7faff4e29a783f27e9
MD5 2f9fb31dbd386444330ea29a588125ff
BLAKE2b-256 2e4d9d54850b6fb532716e705a6084409aefe45b5bd2781d183ae7121f8df904

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.0

1 file

This release

1.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page