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)

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

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. Tarballed for linux-x64 and linux-arm64, attached to each GitHub Release.

    • east-c: Core runtime — type system, IR interpreter, 200+ 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.4.tar.gz (447.9 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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (785.1 kB view details)

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

elaraai_east_py_datascience-1.0.4-cp313-cp313-macosx_11_0_arm64.whl (643.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

elaraai_east_py_datascience-1.0.4-cp313-cp313-macosx_10_13_x86_64.whl (691.2 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

elaraai_east_py_datascience-1.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (785.2 kB view details)

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

elaraai_east_py_datascience-1.0.4-cp312-cp312-macosx_11_0_arm64.whl (643.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

elaraai_east_py_datascience-1.0.4-cp312-cp312-macosx_10_13_x86_64.whl (691.3 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

elaraai_east_py_datascience-1.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (784.9 kB view details)

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

elaraai_east_py_datascience-1.0.4-cp311-cp311-macosx_11_0_arm64.whl (643.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

elaraai_east_py_datascience-1.0.4-cp311-cp311-macosx_10_9_x86_64.whl (690.9 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b77ce95ab0d9d04e631a87edbcec092446587ffe6bb51a979c0bac84878065e1
MD5 5848c4f81e01b0dbe35c47196b2937bd
BLAKE2b-256 a88b714361afab4f9f84f91d833c7a88efb79c753263c5c502af8dd72dcb616b

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.4-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.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e41fde2ea1335bd5c47b266fc9c9d66a1fd574e606f7d69278c2e444bd2f9518
MD5 c4a24188af86961ef7d14c40748e33aa
BLAKE2b-256 dff5772f0877255cd4db666cff5c7cbb8c4a7bf4af2ed74a85e7e51159f96f22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0649fc8e0f8b8bbc160259390c39fb46ed10e353a887d9087494c780809d9d2b
MD5 48289489901037cbda06ff555ac52980
BLAKE2b-256 358616ddce04f7d133b617ce73b4782d772e13d429d449752d3bc876e6cb9173

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d3e75262040175dc5a7fd6dfaa68c39cdd926536c49b2912173aea92062fcbc7
MD5 a7c490b148a80c7e5a9117d693eb3c52
BLAKE2b-256 a1b7c134f72cb100e5e0a2d95d0e47dbf9623dfe8370ef41aefe5ba98996560e

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.4-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.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9a80316c10ae0545fdde99753665574f2caa5592dfcb312596c37f98b36d0a62
MD5 7d56d375a5193353a4b4f34d8090c43e
BLAKE2b-256 5936bca2ce75a61868e4a3a4718603a0e820a012d5a6dc7ead8fbcc5f1aef163

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f59c7b57ca504485082ba75f7675c54e8bcd4e12396756359c7d686521e98a7
MD5 e6f855d731c2346662be4bd4ba99a869
BLAKE2b-256 e55a3a9f6d2d2c138fb4c29b76cd5c6b2cd111583f211427d1ac7532f57f1ea3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 b58a844ebc59aca7d661ddfe5ab0b3e7e0bfec9b98449b6bfe220659f802f895
MD5 3b43b1e08e8f2dda32df447b688491fb
BLAKE2b-256 60a1d0b309013573bba2724c57fa44677d62da9d1441b09d0c9cd135f6677435

See more details on using hashes here.

File details

Details for the file elaraai_east_py_datascience-1.0.4-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.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af3a284908cd8ec0f8374157815e14c821b392e9af698a8d782dee6de91796ac
MD5 9bb8dd1517c32f1c4ffa077c80cd0b40
BLAKE2b-256 ba40bd12dc59d51579eb9bb6378036adb141f0faf9a56b8b612a94bf53310084

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50186c284887754a9886bc44d7a3352a7c47e541d02a6ed22382af4d26b07107
MD5 9edeb1cbe578956073904cb55664e578
BLAKE2b-256 c77c426f29b50254d8214722cd2b38c90ff8e9fe5a70f68ac7eb17cde6dae7c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for elaraai_east_py_datascience-1.0.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c94cadcf3c754f28d322a8948fdaa594486017ade1d02e04b9c194eeb9959ea
MD5 6c126474dc21eceb82f12da9e5c11ac6
BLAKE2b-256 77995a5b7b7f8c1104a6edec49a01e9cdd8d32417e3d58a0b506f3ab86cbdd15

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