Skip to main content

East Data Science - ML/optimization platform functions for East Python runtime

Project description

East Data Science

Data science and ML platform functions for the East language

TypeScript: AGPL-3.0 Python: BSL 1.1 Node Version

East Data Science provides machine learning and optimization platform functions for the East language.

Installation

npm install @elaraai/east-py-datascience @elaraai/east

Python Optional Dependencies

Each module has its own optional Python dependencies to avoid installing unnecessary packages. Install only the extras you need:

# Single extra
pip install "east-py-datascience[scipy]"

# Multiple extras
pip install "east-py-datascience[scipy,sklearn,xgboost]"

# All extras
pip install "east-py-datascience[all]"

When using a git dependency in pyproject.toml:

"east-py-datascience[scipy] @ git+https://github.com/elaraai/east-workspace@main#subdirectory=libs/east-py/packages/east-py-datascience"
Module Extra Python Packages
MADS mads PyNomadBBO
Optuna optuna optuna
SimAnneal simanneal simanneal
Scipy scipy scipy, cloudpickle
Optimization (none) (core only — numpy)
GoogleOr google-or ortools
Sklearn sklearn scikit-learn, skl2onnx, onnxruntime, cloudpickle
XGBoost xgboost xgboost, cloudpickle
LightGBM lightgbm lightgbm, cloudpickle
NGBoost ngboost ngboost, cloudpickle
Torch torch torch, cloudpickle
GP gp scikit-learn, cloudpickle
Lightning lightning torch, pytorch-lightning, cloudpickle
Shap shap shap, cloudpickle
MAPIE mapie mapie, cloudpickle
ALNS alns alns
PyMC pymc pymc, cloudpickle
Simulation (none) (core only — numpy)
Causal causal dowhy, econml, PyALE, pandas, matplotlib, scikit-learn, cloudpickle

Quick Start

import { East, FloatType, variant } from "@elaraai/east";
import { MADS } from "@elaraai/east-py-datascience";

// Define objective function: minimize sum of squares
const objective = East.function([MADS.Types.VectorType], FloatType, ($, x) => {
    const x0 = $.let(x.get(0n));
    const x1 = $.let(x.get(1n));
    return $.return(x0.multiply(x0).add(x1.multiply(x1)));
});

// Optimize
const optimize = East.function([], MADS.Types.ResultType, $ => {
    const x0 = $.let([0.5, 0.5]);
    const bounds = $.let({
        lower: [-1.0, -1.0],
        upper: [1.0, 1.0],
    });
    const config = $.let({
        max_bb_eval: variant('some', 100n),
        display_degree: variant('some', 0n),
        direction_type: variant('none', null),
        initial_mesh_size: variant('none', null),
        min_mesh_size: variant('none', null),
        seed: variant('some', 42n),
    });

    return $.return(MADS.optimize(objective, x0, bounds, variant('none', null), config));
});

Modules

Optimization

Module Description Use Cases
MADS Derivative-free blackbox optimization using NOMAD algorithm Functions without derivatives, expensive evaluations, noisy/discontinuous objectives
Optuna Bayesian optimization with TPE sampler Hyperparameter tuning, mixed-type parameters, efficient search with few evaluations
SimAnneal Simulated annealing for discrete optimization TSP, scheduling, subset selection, knapsack, assignment problems
Scipy Scientific optimization and curve fitting Gradient-based minimization, curve fitting, interpolation, statistics
Optimization Iterative coordinate descent optimization Parameter tuning, sequential optimization across parameter groups
GoogleOr Google OR-Tools constraint programming, routing, LP, and graph algorithms CP-SAT, vehicle routing (TSP/VRP), linear/mixed-integer programming, min-cost flow, max flow, assignment

Machine Learning

Module Description Use Cases
Sklearn Core ML utilities from scikit-learn N-way splits, preprocessing (Standard/MinMax/RobustScaler), encoding (Label/Ordinal), metrics, GMM clustering, multi-target regression
XGBoost Gradient boosting with XGBoost Regression, classification, feature importance, fast training
LightGBM Fast gradient boosting with leaf-wise growth Large datasets, high cardinality features, faster than XGBoost on big data
NGBoost Natural gradient boosting with uncertainty Probabilistic predictions, confidence intervals, uncertainty quantification
Torch Neural networks with PyTorch MLP regression/classification, deep learning, custom architectures
Lightning PyTorch Lightning neural networks MLP, autoencoder, conv1d, sequential, transformer architectures
GP Gaussian Process regression Small datasets, uncertainty quantification, Bayesian optimization surrogate
MAPIE Conformal prediction intervals Prediction intervals, prediction sets, uncertainty quantification

Bayesian Inference

Module Description Use Cases
PyMC Bayesian inference with PyMC Bayesian linear regression, hierarchical models, multi-layer joint estimation, posterior analysis

Causal Inference

Module Description Use Cases
Causal One declarative causal experiment (Causal.experiment) over DoWhy / EconML / PyALE internals, plus Causal.designValidation (statsmodels power) Naive vs adjusted effect, confounder balance, propensity overlap, placebo/E-value robustness, and an honesty verdict (refuses when the data can't support an answer); and the real controlled-trial recipe that would confirm it — sample size, split, match-on categories, and a power curve

Simulation

Module Description Use Cases
Simulation Economic ontology simulation via DES Simulating economic resources, events, and processes; single deterministic runs, Monte Carlo trajectories

Explainability

Module Description Use Cases
Shap SHAP values for model interpretation Feature importance, model explanations, debugging predictions

Documentation

See USAGE.md for detailed API reference with examples.

Development

npm run build     # Compile TypeScript
npm run test      # Run test suite
npm run lint      # Check code quality

Claude Code plugin

The East ecosystem also ships a Claude Code plugin — East language skills, example search, and preemptive diagnostics for East code — installed separately from the elaraai marketplace:

# Inside Claude Code
/plugin marketplace add elaraai/east-workspace
/plugin install east@elaraai
# From a terminal
claude plugin marketplace add elaraai/east-workspace
claude plugin install east@elaraai

License

This package has different licenses for TypeScript and Python code:

TypeScript (type definitions): Dual AGPL-3.0 / Commercial

Python (runtime implementations): BSL 1.1 (Business Source License)

  • Non-production use (evaluation, testing, development) is free
  • Production use by or on behalf of for-profit entities requires a commercial license
  • Code becomes AGPL-3.0 four years after each release

See LICENSE.md for full details.

Commercial licensing: support@elara.ai

Ecosystem

  • East: Statically typed, expression-based language with serializable IR. Run portable logic across TypeScript, Python, C, and other runtimes.

    • @elaraai/east: Core language SDK with type system, expressions, and reference JS compiler
  • East Node: Node.js platform functions for I/O, databases, and system operations.

  • East C: C11 native runtime for executing East IR. Distributed via npm (launcher + per-platform optional dependencies) and as tarballs on each GitHub Release.

    • @elaraai/east-c-cli: npm launcher — installs the matching native binary as an optional dependency
    • east-c: Core runtime — type system, IR interpreter, builtins, serialization (Beast2, JSON, CSV, East text)
    • east-c-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
    • east-c-cli: CLI for running East IR programs natively
  • East Python: Python runtime, standard platform, I/O, and data-science platform functions. Published to PyPI.

    • east-py: Core Python runtime — type system, IR compiler, 212+ builtins, Cython-accelerated hot paths
    • east-py-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
    • east-py-io: SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
    • east-py-cli: CLI for running East IR programs in Python
    • east-py-datascience (PyPI) + @elaraai/east-py-datascience (npm): Optimization (MADS, Optuna, ALNS, GoogleOR), ML (XGBoost, LightGBM, NGBoost, PyTorch, Lightning, GP), Bayesian inference (PyMC), explainability (SHAP), conformal prediction (MAPIE)
  • East UI: Typed UI component definitions and React renderer, plus VS Code preview.

  • e3 — East Execution Engine: Durable execution engine for running East pipelines at scale. Git-like content-addressable storage, automatic memoization, reactive dataflow, real-time monitoring.

Links

About Elara

East is developed by Elara AI Pty Ltd, an AI-powered platform that creates economic digital twins of businesses that optimize performance. Elara combines business objectives, decisions and data to help organizations make data-driven decisions across operations, purchasing, sales and customer engagement, and project and investment planning. East powers the computational layer of Elara solutions, enabling the expression of complex business logic and data in a simple, type-safe and portable language.


Developed by Elara AI Pty Ltd.


Developed by Elara AI Pty Ltd

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

elaraai_east_py_datascience-1.0.26.tar.gz (559.5 kB view details)

Uploaded Source

Built Distributions

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

elaraai_east_py_datascience-1.0.26-cp313-cp313-win_amd64.whl (239.2 kB view details)

Uploaded CPython 3.13Windows x86-64

elaraai_east_py_datascience-1.0.26-cp313-cp313-win32.whl (236.8 kB view details)

Uploaded CPython 3.13Windows x86

elaraai_east_py_datascience-1.0.26-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (237.0 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

elaraai_east_py_datascience-1.0.26-cp313-cp313-macosx_11_0_arm64.whl (235.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

elaraai_east_py_datascience-1.0.26-cp313-cp313-macosx_10_13_x86_64.whl (235.8 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

elaraai_east_py_datascience-1.0.26-cp312-cp312-win_amd64.whl (239.2 kB view details)

Uploaded CPython 3.12Windows x86-64

elaraai_east_py_datascience-1.0.26-cp312-cp312-win32.whl (236.9 kB view details)

Uploaded CPython 3.12Windows x86

elaraai_east_py_datascience-1.0.26-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (237.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

elaraai_east_py_datascience-1.0.26-cp312-cp312-macosx_11_0_arm64.whl (235.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

elaraai_east_py_datascience-1.0.26-cp312-cp312-macosx_10_13_x86_64.whl (235.9 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

elaraai_east_py_datascience-1.0.26-cp311-cp311-win_amd64.whl (238.9 kB view details)

Uploaded CPython 3.11Windows x86-64

elaraai_east_py_datascience-1.0.26-cp311-cp311-win32.whl (236.5 kB view details)

Uploaded CPython 3.11Windows x86

elaraai_east_py_datascience-1.0.26-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (236.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

elaraai_east_py_datascience-1.0.26-cp311-cp311-macosx_11_0_arm64.whl (234.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

elaraai_east_py_datascience-1.0.26-cp311-cp311-macosx_10_9_x86_64.whl (235.6 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

Details for the file elaraai_east_py_datascience-1.0.26.tar.gz.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26.tar.gz
Algorithm Hash digest
SHA256 2885dd76f122cc49584f1b36bdfd86446a033296d9be2b6b8dc235c56ec7427b
MD5 63f5b6cd17f00e525305913894ba55a8
BLAKE2b-256 30e02d649eacecfc67a282cd1a44717f24b7b2aa0f06a82c917254d37ca707c9

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 534c29b9af549f376b96ddd3eba184cf75b38114f947ffae5e703af7fe6bf4ce
MD5 93c4b5ec315f2becdec9d7961308dacd
BLAKE2b-256 f0fa899cfcbcb9b23169d9b7dadf288296d20fd172abc603b9b8221ca50ef6f6

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp313-cp313-win32.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 6ae7b26e3d20d3d2e9368bdbc5e438f7f3767593dc089dbc8c5f468a858e3791
MD5 8d34b830520f866ce387b19e3e65b579
BLAKE2b-256 4e32ceeb7768b5c5a9c90c7812cfb60d17dd868e455f82c667ced092e9577434

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b80c31318a610543b5c68d980a58a1fa365522da949c8f316729984aae106f1
MD5 4bdee0ef18bda2db502e64e5a2157b2a
BLAKE2b-256 768721d200a74f308948242be6210d311024dbcadc8251eabe942589e3873d2d

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42627251d607f1c7060d87e61da7b534a57122364175f0419011a2b0e057bb93
MD5 8a9451eb6eaf279f342985bcafcd09ab
BLAKE2b-256 b44aa1e27f6ae6a664688b7b023049f7fbc057216a00a5bb95592b8f71c0a930

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 c522270a8126973b7e62855e8595df466cddef7ab11f6c51fce3589a57fb7623
MD5 ffd5ad74ea276dd643ea0f8b6b0755f8
BLAKE2b-256 f9c83ddce97a8aebbb7c5629f68293d32c1b2216f48d99e1ea953c544b79085d

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c6371db6f6665d25f9be6e5726ac40808c2076a9ef354f0af14158b251b3b039
MD5 3c6415b9dbc1b96aa3edac9866a1d431
BLAKE2b-256 6cbb2b9c035f86dbf823cca85d53a58288cd3cf848ef17c6951c80f1a8a08ab1

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 1fab252225c67b65c95d4d38802a5a85fb96e900dbdfa75daa25817587782a6f
MD5 41d1feb288d926a73e06be6602094521
BLAKE2b-256 b7055d352ee266b7a8a9bf0b73806fd67ad2ab66b804fe43a0febd71dbcdd236

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f255e4ceac9edda6ffa8811dcfd50584bd5dfd417b7f963833dfaecbbc09a6c6
MD5 ddc888e7a7ee94fda857c53a70867105
BLAKE2b-256 b5fc34314c356d5ca0a2ee62b007289c44d42219479a13ff5a3b650c772f27e9

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1af67ab32c81ecc859d2f0f57f98769ac6b413ac7ab2f0fc55690e3aba2eae89
MD5 9ce9270614860853fa14d1aaf6a2cb8d
BLAKE2b-256 f242faa8c2423f3ec017ddf633d97fe80cc4e7957f4db808f1e7ea950bf67911

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 86d6c3ad0e3a90a702d45f67cdedaf83793165dca784afe24945f69bc9c4c2d2
MD5 d21f95538d7ffec8a0a9938213d81d73
BLAKE2b-256 466da99ab00bee1505f0df8ee00e9001e7f35222fbb6f89971d130295d62402f

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f576e60f492d231cdaaed2dde601108b786c1b45aa706e3b0c712ca262d28230
MD5 c6a307a8347c72170adeb18dbdc54d58
BLAKE2b-256 47cdcff88227e780e9d0eb236f68c83b86db6833ad0f32db74ce12aa23e9d995

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 c9e79bf494833ca922a2424dadf226f41d4ee7d3331bd03e56ec2f3f163b2ddf
MD5 ffe0997d1f3111bb7c3054471624c8fc
BLAKE2b-256 bd889a692629d53891bd08d5959f668aee181aa057d6a7ea3a47aef3bb907e2f

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 402e7370bc89013236d87fbe3e78bb0a1d306094bc6f3d56756cbdda1a4db0ed
MD5 40455927ecb412408f0b150e300d79b5
BLAKE2b-256 eb1a713065ea88020661ab904f6a36aa0775b8ba3478bf1af45e9ad2ac57cb8c

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50ccae8df7d2d673c71f6fc21ee37e90de3eb439421b011061e474671ffb341d
MD5 91ab05f10042b0a8d7b1a8f6a96d2f01
BLAKE2b-256 955bf5763a73953ee4c00da63442abf4e94d13b8686b256249c6fd86204080b0

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.26-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.26-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5fce013a7a033e792e5c7c7a914494c16009d4b4feb8b915ca792a82f68a1ea5
MD5 f0f12cd993396287bd9d293318327c6a
BLAKE2b-256 16b76a73fb0bb0c9e9e8989fdcac36d400dbc5c4d9d29c69ee03cf86f2d04a00

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