Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Classical Methods (Sample-centric, 8D)
|
| 3 |
+
emoji: 📊
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
+
sdk: python
|
| 7 |
+
tags:
|
| 8 |
+
- transcriptomics
|
| 9 |
+
- dimensionality-reduction
|
| 10 |
+
- pca
|
| 11 |
+
|
| 12 |
+
license: mit
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Classical Dimensionality Reduction (Sample-centric, 8D)
|
| 16 |
+
|
| 17 |
+
Pre-trained PCA models for transcriptomics data compression, part of the TRACERx Datathon 2025 project.
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
|
| 21 |
+
- **Methods**: PCA
|
| 22 |
+
- **Compression Mode**: Sample-centric
|
| 23 |
+
- **Output Dimensions**: 8
|
| 24 |
+
- **Training Data**: TRACERx open dataset (VST-normalized counts)
|
| 25 |
+
|
| 26 |
+
## Contents
|
| 27 |
+
|
| 28 |
+
The model file contains:
|
| 29 |
+
- **PCA**: Principal Component Analysis model
|
| 30 |
+
- **UMAP**: Uniform Manifold Approximation and Projection model (2-4D only)
|
| 31 |
+
- **Scaler**: StandardScaler fitted on TRACERx data
|
| 32 |
+
- **Feature Order**: Gene/sample order for alignment
|
| 33 |
+
|
| 34 |
+
## Usage
|
| 35 |
+
|
| 36 |
+
These models are designed to be used with the TRACERx Datathon 2025 analysis pipeline.
|
| 37 |
+
They will be automatically downloaded and cached when needed.
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
import joblib
|
| 41 |
+
|
| 42 |
+
# Load the model bundle
|
| 43 |
+
model_data = joblib.load("model.joblib")
|
| 44 |
+
|
| 45 |
+
# Access components
|
| 46 |
+
pca = model_data['pca']
|
| 47 |
+
scaler = model_data['scaler']
|
| 48 |
+
gene_order = model_data.get('gene_order') # For sample-centric
|
| 49 |
+
|
| 50 |
+
# Transform new data
|
| 51 |
+
scaled_data = scaler.transform(aligned_data)
|
| 52 |
+
embeddings = pca.transform(scaled_data)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Training Details
|
| 56 |
+
|
| 57 |
+
- **Input Features**: 20,136 genes
|
| 58 |
+
- **Training Samples**: 1,051 samples
|
| 59 |
+
- **Preprocessing**: StandardScaler normalization
|
| 60 |
+
|
| 61 |
+
## Files
|
| 62 |
+
|
| 63 |
+
- `model.joblib`: Model bundle containing PCA, scaler, and feature order
|