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
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
- Open source use: AGPL-3.0
- Commercial use: Available for proprietary use - contact support@elara.ai
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.
- @elaraai/east-node-std: Console, FileSystem, Fetch, Crypto, Time, Path, Random
- @elaraai/east-node-io: SQLite, PostgreSQL, MySQL, MongoDB, Redis, S3, FTP, SFTP, XLSX, XML, compression
- @elaraai/east-node-cli: CLI for running East IR programs in Node.js
-
East C: C11 native runtime for executing East IR. Tarballed for
linux-x64andlinux-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, Randomeast-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.
- @elaraai/east-ui: 50+ typed UI components for layouts, forms, charts, tables, dialogs
- @elaraai/east-ui-components: React renderer with Chakra UI v3 styling
- @elaraai/e3-ui: e3 + UI bridge — Data bindings,
e3.ui()task, manifest - @elaraai/e3-ui-components: React Query hooks and preview components for the e3 API
- east-ui-preview: VS Code extension for live East UI component 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.
- @elaraai/e3: SDK for authoring e3 packages with typed tasks and pipelines
- @elaraai/e3-core: Object store, dataflow orchestrator, execution state
- @elaraai/e3-types: Shared type definitions for e3 packages
- @elaraai/e3-cli:
e3 repo,e3 package,e3 workspace,e3 start,e3 watch,e3 logscommands - @elaraai/e3-api-client: HTTP client for remote e3 repositories
- @elaraai/e3-api-server: REST API server for e3 repositories
- @elaraai/e3-api-tests: Shared API compliance test suites
Links
- Website: https://elaraai.com/
- East Repository: https://github.com/elaraai/east-workspace/tree/main/libs/east
- Issues: https://github.com/elaraai/east-workspace/issues
- Email: support@elara.ai
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 785.5 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e960e19149464b010680bc4de8712d94977af9cd987eb383436b98e5f66d7df
|
|
| MD5 |
21a795b91230d5506a80fe30ef238c84
|
|
| BLAKE2b-256 |
9d0be141db209a70866617d08f875ce390eca65a251dbf7cf0957cc588198cb0
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 644.1 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99d1c0aa0111775afcf55fa75f1b532f8a524a6b1022cefc299d893a83c95559
|
|
| MD5 |
8bca64be0bf444932c69855a0c3e5aab
|
|
| BLAKE2b-256 |
bb00ca933030a75a318f9d7c77373046eedade7bfe13d485d7371ae7fd84b2a5
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp313-cp313-macosx_10_13_x86_64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp313-cp313-macosx_10_13_x86_64.whl
- Upload date:
- Size: 691.7 kB
- Tags: CPython 3.13, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58ac0ea48fa07a2b84a1aef0a92d3230fe6efcd31f7b5f69aec25dff723c3fc2
|
|
| MD5 |
f6e13905b4887a18fcede386096f45ce
|
|
| BLAKE2b-256 |
2d57c9b8c0fa8558ce4697b05cda04cfcc1d2a16548cf4f4db4639b04cd73769
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 785.5 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c0950a29f57cc0ea9275a006e5ab8367d8ce850c6decb25b224061b79cf35c8
|
|
| MD5 |
9c80798b5b9600e0a0e3376936d74a96
|
|
| BLAKE2b-256 |
6f4442eab43641bc40c6fbffca11831f3fc163e2eb9fa54b4fb20ab70de00936
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 644.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1fbe8f3e3422c8480fdb0628769e57fb9ce099f3ec3d10682708fa0d7909894
|
|
| MD5 |
32ea82b9a055c15aa70a18dd51f024d1
|
|
| BLAKE2b-256 |
13542bce167bff1ff7d215921ac46b1b1dadf92fa158b2bb419b50a072aaa8eb
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp312-cp312-macosx_10_13_x86_64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 691.7 kB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5d657612295315625e9091e42a52d51a5ae9aeb91e0bb56200c40ff3be6d24c
|
|
| MD5 |
3422e36e08578d4ccb663662b42c7dcb
|
|
| BLAKE2b-256 |
c56f97a9c7d7c39d3da3c27dcb6746f50f45fae366a33bc4c3ce53c8032b7b48
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 785.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a71e4d854f77827dcd1d2d2f461930260c6ea31ec11442728335d191a8cd9e1
|
|
| MD5 |
10c26107c0efff5648fbbfbc6fc10d02
|
|
| BLAKE2b-256 |
ec9e36a14aed929362593ea5b1dd8e5ac49c9d7d189572bb055c45e8cc9f8d2f
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 644.0 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dc876fe60c0ace72c017813ae1efe47a5343af2ee923c5b805bfe58bde4954d
|
|
| MD5 |
02f39a8903110ad714fdf2bbe23a03cb
|
|
| BLAKE2b-256 |
7671f99af5566908c9ea1ce5971dd6e9d6017e7533db25742dfb41862d5196ef
|
File details
Details for the file elaraai_east_py_datascience-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: elaraai_east_py_datascience-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 691.5 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bda989076123d8ae3da89babe4c7d3fe4e864be10a79c849e1b9bba9185f02a3
|
|
| MD5 |
7c4a53d5652522273933e3f96b3014ba
|
|
| BLAKE2b-256 |
05941dda5d89a931320474252e927748ef2ef6ffaf4ab56866cd4082c2769513
|