Metadata-Version: 2.4
Name: lobster-ml
Version: 1.1.418
Summary: Machine learning agents for Lobster AI (feature selection, survival analysis, interpretability)
Author-email: Omics-OS <info@omics-os.com>
License-Expression: AGPL-3.0-or-later
Project-URL: Homepage, https://omics-os.com
Project-URL: Documentation, https://docs.omics-os.com
Project-URL: Repository, https://github.com/the-omics-os/lobster
Keywords: bioinformatics,machine-learning,deep-learning,scVI,feature-selection,survival-analysis,SHAP,pytorch,lobster-ai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Requires-Python: <3.14,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: lobster-ai~=1.1.0
Requires-Dist: anndata>=0.9.0
Requires-Dist: h5py>=3.9.0
Requires-Dist: numpy>=1.23.0
Requires-Dist: pandas>=1.5.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: scikit-learn>=1.3.0
Provides-Extra: xgboost
Requires-Dist: xgboost>=1.7.0; extra == "xgboost"
Provides-Extra: multiomics
Requires-Dist: mofapy2>=0.7.0; extra == "multiomics"
Provides-Extra: ml
Requires-Dist: torch>=2.0.0; extra == "ml"
Requires-Dist: scvi-tools>=1.0.0; extra == "ml"
Provides-Extra: survival
Requires-Dist: scikit-survival>=0.22.0; extra == "survival"
Provides-Extra: interpretability
Requires-Dist: shap>=0.44.0; extra == "interpretability"
Requires-Dist: interpret>=0.4.0; extra == "interpretability"
Provides-Extra: imbalanced
Requires-Dist: imbalanced-learn>=0.11.0; extra == "imbalanced"
Provides-Extra: tuning
Requires-Dist: hyperopt>=0.2.7; extra == "tuning"
Provides-Extra: full
Requires-Dist: lobster-ml[imbalanced,interpretability,ml,multiomics,survival,tuning,xgboost]; extra == "full"
Dynamic: license-file

# lobster-ml

Machine learning and deep learning for biological data analysis and framework export.

## Installation

```bash
# Basic installation
pip install lobster-ml

# With deep learning dependencies (scVI, PyTorch)
pip install lobster-ml[ml]
```

## Agents

| Agent | Description |
|-------|-------------|
| `machine_learning_expert` | ML specialist for biological data. Feature engineering, data splitting, framework export, and deep learning embeddings. |

## Services

| Service | Purpose |
|---------|---------|
| MLPreparationService | Feature selection, scaling, and train/test/validation splitting |
| MLTranscriptomicsServiceALPHA | Transcriptomics-specific ML workflows (ALPHA) |
| MLProteomicsServiceALPHA | Proteomics-specific ML workflows (ALPHA) |
| scVIEmbeddingService | Deep learning embeddings using scVI for single-cell data |

## Features

### ML Readiness Assessment
- Evaluate biological datasets for machine learning suitability
- Check sample size, class balance, and feature quality
- Identify potential data leakage and batch effects
- Recommend preprocessing steps before ML pipeline

### Feature Engineering
- Highly variable gene selection for dimensionality reduction
- PCA-based feature extraction with variance thresholds
- Marker gene features from differential expression
- Z-score normalization and scaling

### Data Splitting
- Stratified train/test/validation splits
- Configurable split ratios (default: 70/15/15)
- Class balance preservation across splits
- Batch-aware splitting to prevent data leakage

### Framework Export
- NumPy arrays for scikit-learn workflows
- CSV export for general ML frameworks
- PyTorch tensor datasets with DataLoader support
- TensorFlow NPZ format for Keras models

### Deep Learning Embeddings
- scVI integration for variational autoencoder embeddings
- Latent space visualization and clustering
- Transfer learning from pre-trained models
- GPU acceleration when available

## Requirements

- Python 3.12+
- lobster-ai >= 1.0.0
- Optional: torch, scvi-tools (for deep learning features)

## Tier Requirement

This is a **premium** agent. Access is controlled at runtime via Lobster AI's tier system.

## Documentation

Full documentation: [docs.omics-os.com/docs/agents/ml](https://docs.omics-os.com/docs/agents/ml)

## License

MIT
