{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/aggregators/representation.distribution.aggregator.ts",
          "name": "result",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-distribution-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.distribution.aggregator.ts",
            "label": "core/aggregators/representation.distribution.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.distribution.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-distribution-aggregator-ts"
          }
        },
        {
          "file": "core/aggregators/representation.graph.aggregator.ts",
          "name": "result",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-graph-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.graph.aggregator.ts",
            "label": "core/aggregators/representation.graph.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.graph.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-graph-aggregator-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 98,
      "name": "uniformity",
      "signature": "export const uniformity = function uniformity(counts: ReadonlyMap<string, number>): Uniformity {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/analyzers/baseline.analyzer.ts",
          "name": "erf",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/analyzers/baseline.analyzer.ts",
            "label": "core/analyzers/baseline.analyzer.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.md",
            "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "core/analyzers/baseline.analyzer.ts",
          "name": "chiSquareSf",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/analyzers/baseline.analyzer.ts",
            "label": "core/analyzers/baseline.analyzer.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.md",
            "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts"
          }
        }
      ],
      "exported": true,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 30,
      "name": "erfc",
      "signature": "export const erfc = function erfc(x: number): number {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/analyzers/baseline.analyzer.ts",
          "name": "erfc",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/analyzers/baseline.analyzer.ts",
            "label": "core/analyzers/baseline.analyzer.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.md",
            "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 22,
      "name": "erf",
      "signature": "export const erf = function erf(x: number): number {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/analyzers/baseline.analyzer.ts",
          "name": "autocorrelationSignificance",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/analyzers/baseline.analyzer.ts",
            "label": "core/analyzers/baseline.analyzer.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.md",
            "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 34,
      "name": "normalSignificance",
      "signature": "export const normalSignificance = function normalSignificance(z: number): Significance {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/aggregators/representation.sequence.aggregator.ts",
          "name": "result",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-sequence-aggregator-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.sequence.aggregator.ts",
            "label": "core/aggregators/representation.sequence.aggregator.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.sequence.aggregator.ts.md",
            "ref": "anatomy:file-patterns-core-aggregators-representation-sequence-aggregator-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 81,
      "name": "transitionIndependence",
      "signature": "export const transitionIndependence = function transitionIndependence("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/counters/base.counter.ts",
          "name": "increment",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-counters-base-counter-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/counters/base.counter.ts",
            "label": "core/counters/base.counter.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/counters/base.counter.ts.md",
            "ref": "anatomy:file-patterns-core-counters-base-counter-ts"
          }
        },
        {
          "file": "core/counters/base.counter.ts",
          "name": "increment",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-counters-base-counter-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/counters/base.counter.ts",
            "label": "core/counters/base.counter.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/counters/base.counter.ts.md",
            "ref": "anatomy:file-patterns-core-counters-base-counter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 56,
      "name": "marginalsOf",
      "signature": "const marginalsOf = function marginalsOf(transitions: readonly Transition[]): Marginals {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/analyzers/baseline.analyzer.ts",
          "name": "erfc",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/analyzers/baseline.analyzer.ts",
            "label": "core/analyzers/baseline.analyzer.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.md",
            "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 39,
      "name": "chiSquareSf",
      "signature": "export const chiSquareSf = function chiSquareSf(statistic: number, dof: number): number {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/analyzers/baseline.analyzer.ts",
          "name": "normalSignificance",
          "source": {
            "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
            "json": "https://banes-lab.com/json/source/patterns/core/analyzers/baseline.analyzer.ts",
            "label": "core/analyzers/baseline.analyzer.ts",
            "markdown": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.md",
            "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "autocorrelationSignificance",
      "signature": "export const autocorrelationSignificance = function autocorrelationSignificance("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 4,
      "name": "A1",
      "signature": "const A1 = 0.254829592;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 5,
      "name": "A2",
      "signature": "const A2 = -0.284496736;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 6,
      "name": "A3",
      "signature": "const A3 = 1.421413741;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 7,
      "name": "A4",
      "signature": "const A4 = -1.453152027;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 8,
      "name": "A5",
      "signature": "const A5 = 1.061405429;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 9,
      "name": "P",
      "signature": "const P = 0.3275911;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "ERFC_MAX",
      "signature": "const ERFC_MAX = 2;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 11,
      "name": "ALPHA",
      "signature": "const ALPHA = 0.05;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 12,
      "name": "NINE",
      "signature": "const NINE = 9;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 13,
      "name": "THREE",
      "signature": "const THREE = 3;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 14,
      "name": "THIRD",
      "signature": "const THIRD = 1 / THREE;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 15,
      "name": "MIN_SERIES",
      "signature": "const MIN_SERIES = 3;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "HALF",
      "signature": "const HALF = 0.5;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "TWO",
      "signature": "const TWO = 2;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "SQUARE",
      "signature": "const SQUARE = 2;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 20,
      "name": "INSIGNIFICANT",
      "signature": "const INSIGNIFICANT: Significance = { pValue: 1, significant: false, statistic: 0 };"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 23,
      "name": "sign",
      "signature": "const sign = x < 0 ? -1 : 1;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "ax",
      "signature": "const ax = Math.abs(x);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "t",
      "signature": "const t = 1 / (1 + P * ax);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "y",
      "signature": "const y = 1 - ((((A5 * t + A4) * t + A3) * t + A2) * t + A1) * t * Math.exp(-ax * ax);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "cubeRoot",
      "signature": "const cubeRoot = (statistic / dof) ** THIRD;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "mean",
      "signature": "const mean = 1 - TWO / (NINE * dof);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 45,
      "name": "stddev",
      "signature": "const stddev = Math.sqrt(TWO / (NINE * dof));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 57,
      "name": "row",
      "signature": "const row = new Map<string, number>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 58,
      "name": "col",
      "signature": "const col = new Map<string, number>();"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 66,
      "name": "chiFromTransitions",
      "signature": "const chiFromTransitions = function chiFromTransitions("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 71,
      "name": "sum",
      "signature": "let sum = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 88,
      "name": "marginals",
      "signature": "const marginals = marginalsOf(transitions);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 93,
      "name": "chi",
      "signature": "const chi = chiFromTransitions(transitions, marginals, total);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "categories",
      "signature": "const categories = counts.size;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 100,
      "name": "total",
      "signature": "const total = sumOf(counts.values());"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 104,
      "name": "expected",
      "signature": "const expected = total / categories;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 105,
      "name": "statistic",
      "signature": "const statistic = sumOf([...counts.values()].map((count) => (count - expected) ** SQUARE / expected));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 106,
      "name": "dof",
      "signature": "const dof = categories - 1;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 107,
      "name": "pValue",
      "signature": "const pValue = chiSquareSf(statistic, dof);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-baseline-analyzer-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "baseline.analyzer.ts",
  "path": "core/analyzers/baseline.analyzer.ts",
  "ref": "anatomy:file-patterns-core-analyzers-baseline-analyzer-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-analyzers",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-analyzers",
          "label": "core/analyzers",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-analyzers.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-analyzers"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-counters-base-counter-ts",
          "json": "https://banes-lab.com/json/source/patterns/core/counters/base.counter.ts",
          "label": "core/counters/base.counter.ts",
          "markdown": "https://banes-lab.com/source/patterns/core/counters/base.counter.ts.md",
          "ref": "anatomy:file-patterns-core-counters-base-counter-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-distribution-aggregator-ts",
          "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.distribution.aggregator.ts",
          "label": "core/aggregators/representation.distribution.aggregator.ts",
          "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.distribution.aggregator.ts.md",
          "ref": "anatomy:file-patterns-core-aggregators-representation-distribution-aggregator-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-graph-aggregator-ts",
          "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.graph.aggregator.ts",
          "label": "core/aggregators/representation.graph.aggregator.ts",
          "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.graph.aggregator.ts.md",
          "ref": "anatomy:file-patterns-core-aggregators-representation-graph-aggregator-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-aggregators-representation-sequence-aggregator-ts",
          "json": "https://banes-lab.com/json/source/patterns/core/aggregators/representation.sequence.aggregator.ts",
          "label": "core/aggregators/representation.sequence.aggregator.ts",
          "markdown": "https://banes-lab.com/source/patterns/core/aggregators/representation.sequence.aggregator.ts.md",
          "ref": "anatomy:file-patterns-core-aggregators-representation-sequence-aggregator-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-aggregators.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-aggregators"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-analyzers",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-analyzers",
          "label": "core/analyzers",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-analyzers.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-analyzers"
        },
        {
          "href": "https://banes-lab.com/anatomy/patterns#folder-patterns-core-counters",
          "json": "https://banes-lab.com/json/anatomy/patterns/folder-patterns-core-counters",
          "label": "core/counters",
          "markdown": "https://banes-lab.com/anatomy/patterns/folder-patterns-core-counters.md",
          "ref": "chapter:/anatomy/patterns#folder-patterns-core-counters"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "analyzer",
    "subject": "baseline",
    "variant": null
  },
  "stats": {
    "bytes": 3768,
    "callable": 9,
    "definitions": 43,
    "edges": 5,
    "exported": 22,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 4,
      "relay": 1,
      "entry": 3,
      "isolated": 35
    },
    "lines": {
      "blank": 11,
      "code": 98,
      "total": 109
    }
  },
  "summary": "98 lines of code and 43 definitions.",
  "text": "https://banes-lab.com/source/patterns/core/analyzers/baseline.analyzer.ts.txt",
  "tree": "patterns",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/patterns#file-patterns-core-analyzers-code-analyzer-ts",
      "json": "https://banes-lab.com/json/source/patterns/core/analyzers/code.analyzer.ts",
      "label": "core/analyzers/code.analyzer.ts",
      "markdown": "https://banes-lab.com/source/patterns/core/analyzers/code.analyzer.ts.md",
      "ref": "anatomy:file-patterns-core-analyzers-code-analyzer-ts"
    },
    "previous": null
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/patterns/core/analyzers",
    "label": "core/analyzers",
    "markdown": "https://banes-lab.com/api/source/patterns/core/analyzers.md",
    "ref": "api:source/patterns/core/analyzers"
  }
}
