├── .github └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── econfigs ├── artificial-data-continuous.json ├── artificial-data-discrete-binomials.json ├── artificial-data-discrete-categoricals.json ├── gaussian-ring-pcs.json ├── gpt2-commongen.json ├── image-binomials.json ├── uci-data-random-bt.json └── uci-data-random-lt.json ├── pytest.ini ├── requirements.txt ├── slurm ├── launch.sh ├── logs │ ├── .gitignore │ └── .gitkeep └── run.sh └── src ├── datasets ├── __init__.py ├── loaders.py └── wrappers │ ├── __init__.py │ ├── artificial.py │ ├── bsds300.py │ ├── cifar10.py │ ├── gas.py │ ├── gpt2_commongen.py │ ├── hepmass.py │ ├── miniboone.py │ ├── mnist.py │ ├── power.py │ ├── utils.py │ ├── wikitext103.py │ └── wikitext2.py ├── graphics ├── __init__.py ├── distributions.py ├── samples.py └── utils.py ├── optimization ├── __init__.py └── schedulers.py ├── pcs ├── __init__.py ├── hmm.py ├── initializers.py ├── layers │ ├── __init__.py │ ├── candecomp.py │ ├── compute.py │ ├── input.py │ ├── mixture.py │ ├── scope.py │ └── tucker.py ├── losses.py ├── models.py ├── optimizers.py ├── sampling.py └── utils.py ├── region_graph ├── __init__.py ├── linear_vtree.py ├── quad_tree.py ├── random_binary_tree.py ├── region_graph.py ├── rg_node.py └── utils.py ├── scripts ├── __init__.py ├── benchmark.py ├── benchmark_vars.py ├── engine.py ├── experiment.py ├── grid.py ├── logger.py ├── plots │ ├── __init__.py │ ├── artificial │ │ ├── __init__.py │ │ ├── lines.py │ │ ├── pdfs.py │ │ └── pmfs.py │ ├── bsplines.py │ ├── gpt2dist │ │ ├── __init__.py │ │ └── lines.py │ ├── mpline.py │ ├── pf_overflow.py │ ├── ring │ │ ├── __init__.py │ │ ├── distgif.py │ │ └── pdfs.py │ ├── uci │ │ ├── __init__.py │ │ ├── biscatter.py │ │ └── violin.py │ └── wdist.py ├── results.py ├── tables │ ├── __init__.py │ └── uci │ │ ├── __init__.py │ │ └── tables.py └── utils.py ├── splines ├── __init__.py ├── bsplines.py └── polynomial.py └── tests ├── __init__.py ├── conftest.py ├── region_graph ├── __init__.py ├── test_linear_vtree.py ├── test_quad_tree.py ├── test_random_binary_tree.py ├── test_region_graph.py └── test_rg_node.py ├── test_likelihood.py ├── test_sampling.py └── test_utils.py /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/README.md -------------------------------------------------------------------------------- /econfigs/artificial-data-continuous.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/artificial-data-continuous.json -------------------------------------------------------------------------------- /econfigs/artificial-data-discrete-binomials.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/artificial-data-discrete-binomials.json -------------------------------------------------------------------------------- /econfigs/artificial-data-discrete-categoricals.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/artificial-data-discrete-categoricals.json -------------------------------------------------------------------------------- /econfigs/gaussian-ring-pcs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/gaussian-ring-pcs.json -------------------------------------------------------------------------------- /econfigs/gpt2-commongen.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/gpt2-commongen.json -------------------------------------------------------------------------------- /econfigs/image-binomials.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/image-binomials.json -------------------------------------------------------------------------------- /econfigs/uci-data-random-bt.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/uci-data-random-bt.json -------------------------------------------------------------------------------- /econfigs/uci-data-random-lt.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/econfigs/uci-data-random-lt.json -------------------------------------------------------------------------------- /pytest.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/pytest.ini -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/requirements.txt -------------------------------------------------------------------------------- /slurm/launch.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/slurm/launch.sh -------------------------------------------------------------------------------- /slurm/logs/.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | -------------------------------------------------------------------------------- /slurm/logs/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slurm/run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/slurm/run.sh -------------------------------------------------------------------------------- /src/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/datasets/loaders.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/loaders.py -------------------------------------------------------------------------------- /src/datasets/wrappers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/__init__.py -------------------------------------------------------------------------------- /src/datasets/wrappers/artificial.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/artificial.py -------------------------------------------------------------------------------- /src/datasets/wrappers/bsds300.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/bsds300.py -------------------------------------------------------------------------------- /src/datasets/wrappers/cifar10.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/cifar10.py -------------------------------------------------------------------------------- /src/datasets/wrappers/gas.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/gas.py -------------------------------------------------------------------------------- /src/datasets/wrappers/gpt2_commongen.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/gpt2_commongen.py -------------------------------------------------------------------------------- /src/datasets/wrappers/hepmass.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/hepmass.py -------------------------------------------------------------------------------- /src/datasets/wrappers/miniboone.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/miniboone.py -------------------------------------------------------------------------------- /src/datasets/wrappers/mnist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/mnist.py -------------------------------------------------------------------------------- /src/datasets/wrappers/power.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/power.py -------------------------------------------------------------------------------- /src/datasets/wrappers/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/utils.py -------------------------------------------------------------------------------- /src/datasets/wrappers/wikitext103.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/wikitext103.py -------------------------------------------------------------------------------- /src/datasets/wrappers/wikitext2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/datasets/wrappers/wikitext2.py -------------------------------------------------------------------------------- /src/graphics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/graphics/distributions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/graphics/distributions.py -------------------------------------------------------------------------------- /src/graphics/samples.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/graphics/samples.py -------------------------------------------------------------------------------- /src/graphics/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/graphics/utils.py -------------------------------------------------------------------------------- /src/optimization/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/optimization/schedulers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/optimization/schedulers.py -------------------------------------------------------------------------------- /src/pcs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pcs/hmm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/hmm.py -------------------------------------------------------------------------------- /src/pcs/initializers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/initializers.py -------------------------------------------------------------------------------- /src/pcs/layers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/__init__.py -------------------------------------------------------------------------------- /src/pcs/layers/candecomp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/candecomp.py -------------------------------------------------------------------------------- /src/pcs/layers/compute.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/compute.py -------------------------------------------------------------------------------- /src/pcs/layers/input.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/input.py -------------------------------------------------------------------------------- /src/pcs/layers/mixture.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/mixture.py -------------------------------------------------------------------------------- /src/pcs/layers/scope.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/scope.py -------------------------------------------------------------------------------- /src/pcs/layers/tucker.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/layers/tucker.py -------------------------------------------------------------------------------- /src/pcs/losses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/losses.py -------------------------------------------------------------------------------- /src/pcs/models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/models.py -------------------------------------------------------------------------------- /src/pcs/optimizers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/optimizers.py -------------------------------------------------------------------------------- /src/pcs/sampling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/sampling.py -------------------------------------------------------------------------------- /src/pcs/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/pcs/utils.py -------------------------------------------------------------------------------- /src/region_graph/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/__init__.py -------------------------------------------------------------------------------- /src/region_graph/linear_vtree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/linear_vtree.py -------------------------------------------------------------------------------- /src/region_graph/quad_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/quad_tree.py -------------------------------------------------------------------------------- /src/region_graph/random_binary_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/random_binary_tree.py -------------------------------------------------------------------------------- /src/region_graph/region_graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/region_graph.py -------------------------------------------------------------------------------- /src/region_graph/rg_node.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/rg_node.py -------------------------------------------------------------------------------- /src/region_graph/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/region_graph/utils.py -------------------------------------------------------------------------------- /src/scripts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/benchmark.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/benchmark.py -------------------------------------------------------------------------------- /src/scripts/benchmark_vars.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/benchmark_vars.py -------------------------------------------------------------------------------- /src/scripts/engine.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/engine.py -------------------------------------------------------------------------------- /src/scripts/experiment.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/experiment.py -------------------------------------------------------------------------------- /src/scripts/grid.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/grid.py -------------------------------------------------------------------------------- /src/scripts/logger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/logger.py -------------------------------------------------------------------------------- /src/scripts/plots/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/plots/artificial/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/plots/artificial/lines.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/artificial/lines.py -------------------------------------------------------------------------------- /src/scripts/plots/artificial/pdfs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/artificial/pdfs.py -------------------------------------------------------------------------------- /src/scripts/plots/artificial/pmfs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/artificial/pmfs.py -------------------------------------------------------------------------------- /src/scripts/plots/bsplines.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/bsplines.py -------------------------------------------------------------------------------- /src/scripts/plots/gpt2dist/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/plots/gpt2dist/lines.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/gpt2dist/lines.py -------------------------------------------------------------------------------- /src/scripts/plots/mpline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/mpline.py -------------------------------------------------------------------------------- /src/scripts/plots/pf_overflow.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/pf_overflow.py -------------------------------------------------------------------------------- /src/scripts/plots/ring/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/plots/ring/distgif.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/ring/distgif.py -------------------------------------------------------------------------------- /src/scripts/plots/ring/pdfs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/ring/pdfs.py -------------------------------------------------------------------------------- /src/scripts/plots/uci/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/plots/uci/biscatter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/uci/biscatter.py -------------------------------------------------------------------------------- /src/scripts/plots/uci/violin.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/uci/violin.py -------------------------------------------------------------------------------- /src/scripts/plots/wdist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/plots/wdist.py -------------------------------------------------------------------------------- /src/scripts/results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/results.py -------------------------------------------------------------------------------- /src/scripts/tables/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/tables/uci/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/scripts/tables/uci/tables.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/tables/uci/tables.py -------------------------------------------------------------------------------- /src/scripts/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/scripts/utils.py -------------------------------------------------------------------------------- /src/splines/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/splines/bsplines.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/splines/bsplines.py -------------------------------------------------------------------------------- /src/splines/polynomial.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/splines/polynomial.py -------------------------------------------------------------------------------- /src/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/tests/conftest.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/conftest.py -------------------------------------------------------------------------------- /src/tests/region_graph/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/tests/region_graph/test_linear_vtree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/region_graph/test_linear_vtree.py -------------------------------------------------------------------------------- /src/tests/region_graph/test_quad_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/region_graph/test_quad_tree.py -------------------------------------------------------------------------------- /src/tests/region_graph/test_random_binary_tree.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/region_graph/test_random_binary_tree.py -------------------------------------------------------------------------------- /src/tests/region_graph/test_region_graph.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/region_graph/test_region_graph.py -------------------------------------------------------------------------------- /src/tests/region_graph/test_rg_node.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/region_graph/test_rg_node.py -------------------------------------------------------------------------------- /src/tests/test_likelihood.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/test_likelihood.py -------------------------------------------------------------------------------- /src/tests/test_sampling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/test_sampling.py -------------------------------------------------------------------------------- /src/tests/test_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/april-tools/squared-npcs/HEAD/src/tests/test_utils.py --------------------------------------------------------------------------------