| Crates.io | ahuvista-nn |
| lib.rs | ahuvista-nn |
| version | 0.1.1 |
| created_at | 2025-11-13 07:06:34.97977+00 |
| updated_at | 2025-11-13 07:47:39.336116+00 |
| description | A multi-modal neural network focused on maternal health predictions |
| homepage | |
| repository | https://github.com/dandychux/ahuvista-nn |
| max_upload_size | |
| id | 1930584 |
| size | 413,857 |
A lightweight, Rust-based neural network library optimized for multi-modal data processing in low-compute environments, with a focus on maternal health outcome predictions.
# Clone the repository
git clone https://github.com/dandychux/ahuvista-nn.git
cd ahuvista-nn
# Build the project (debug mode)
cargo build
# Build optimized release version
cargo build --release
# Run tests to verify installation
cargo test --release
After building, you'll find two binaries in target/release/:
ahuvista-train: Training binary with full configuration optionsahuvista-predict: Lightweight inference binary for production deployment# Check training binary
cargo run --release --bin ahuvista-train -- --help
# Check prediction binary
cargo run --release --bin ahuvista-predict -- --help
# Train with minimal configuration
cargo run --release --bin ahuvista-train -- \
--modalities tabular \
--epochs 20 \
--batch-size 32 \
--verbose
# Train with tabular and temporal data
cargo run --release --bin ahuvista-train -- \
--modalities tabular,temporal \
--epochs 50 \
--batch-size 32 \
--learning-rate 0.001 \
--output-dir ./models
First, create an input file patient_data.json:
{
"patient_id": "PAT-001",
"tabular": [0.5, 0.3, 0.8, 0.1, 0.9, 0.4, 0.7, 0.2, 0.6, 0.5],
"temporal": [
[120.0, 80.0, 98.6, 72.0, 16.0],
[125.0, 82.0, 98.8, 75.0, 18.0]
]
}
Then run prediction:
cargo run --release --bin ahuvista-predict -- \
--model models/maternal_mortality_model_modular.bin \
--modalities tabular,temporal \
--input patient_data.json \
--output result.json
Ahuvista-NN uses a late fusion architecture where each modality is processed by a specialized neural network before features are combined:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Modular Late Fusion Network โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโ
โ โ Tabular โ โ Temporal โ โ Text โ โ Image โโ
โ โ Network โ โ Network โ โ Network โ โNetwork โโ
โ โ (Feed-Fwd) โ โ (RNN) โ โ (RNN + โ โ (CNN) โโ
โ โ โ โ โ โ Embedding) โ โ โโ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโฌโโโโโโ
โ โ โ โ โ โ
โ โ Feature โ Feature โ Feature โ โ
โ โ Vector โ Vector โ Vector โ โ
โ โ (16-32d) โ (16-32d) โ (32-64d) โ โ
โ โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโผโโโโโโโโโ โ
โ โ Concatenation โ โ
โ โ Fusion Layer โ โ
โ โโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโผโโโโโโโโโ โ
โ โ Classifier โ โ
โ โ Network โ โ
โ โ (64โ32โ1) โ โ
โ โโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโผโโโโโโโโโ โ
โ โ Prediction โ โ
โ โ Risk Score โ โ
โ โ (0.0-1.0) โ โ
โ โโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Modality | Description | Network Type | Use Cases |
|---|---|---|---|
| Tabular | Structured clinical data | Feed-forward MLP | Demographics, lab results, vital signs |
| Temporal | Time-series sequences | Recurrent (RNN) | Continuous monitoring, longitudinal data |
| Text | Unstructured text | RNN + Embeddings | Clinical notes, reports, documentation |
| Image | Visual data | Convolutional (CNN) | Medical imaging, ultrasounds, photographs |
Ahuvista-NN offers three methods for training models, each suited for different use cases.
Best for: Production deployments, reproducible experiments, complex configurations
Create config.json:
{
"modalities": {
"use_tabular": true,
"use_temporal": true,
"use_text": false,
"use_image": false
},
"data_paths": {
"data_dir": "datasets",
"patient_id_column": "PatientID",
"tabular_files": ["patient_demographics.csv", "lab_results.csv"],
"temporal_files": ["vitals_timeseries.csv"],
"text_files": null,
"image_files": null
},
"training": {
"epochs": 100,
"batch_size": 32,
"learning_rate": 0.001
},
"model": {
"tabular_hidden_sizes": [128, 64],
"tabular_output_size": 32,
"temporal_hidden_size": 64,
"temporal_output_size": 32,
"text_embedding_dim": 100,
"text_hidden_size": 64,
"text_max_vocab": 10000,
"image_channels": 3,
"image_height": 224,
"image_width": 224,
"classifier_hidden_sizes": [128, 64]
}
}
cargo run --release --bin ahuvista-train -- --config config.json
# Use config but override training parameters
cargo run --release --bin ahuvista-train -- \
--config config.json \
--epochs 200 \
--learning-rate 0.0005 \
--batch-size 64
Best for: Quick experiments, testing, simple configurations
cargo run --release --bin ahuvista-train -- \
--modalities tabular,temporal \
--epochs 50 \
--batch-size 32 \
--learning-rate 0.001 \
--output-dir ./trained_models \
--verbose
| Option | Short | Description | Example |
|---|---|---|---|
--config |
-c |
Path to JSON config file | --config config.json |
--modalities |
-m |
Comma-separated modalities | --modalities tabular,text |
--epochs |
-e |
Number of training epochs | --epochs 100 |
--batch-size |
-b |
Training batch size | --batch-size 64 |
--learning-rate |
-l |
Learning rate | --learning-rate 0.001 |
--output-dir |
-o |
Model output directory | --output-dir ./models |
--verbose |
-v |
Enable verbose logging | --verbose |
# Quick test with verbose output
cargo run --release --bin ahuvista-train -- \
--modalities tabular \
--epochs 10 \
--verbose
# Production training with all options
cargo run --release --bin ahuvista-train -- \
--config production.json \
--epochs 200 \
--batch-size 64 \
--learning-rate 0.0001 \
--output-dir ./production_models
# Multi-modal with custom output
cargo run --release --bin ahuvista-train -- \
--modalities tabular,temporal,text,image \
--epochs 150 \
--batch-size 32 \
--output-dir ./multimodal_models
Best for: Custom training pipelines, research, integration with other systems
use ahuvista_nn::{
config::{ModalityConfig, Settings},
core::fusion_modular::{LateFusionNet, MultiModalInput},
training::training_loop::TrainingConfig,
};
use std::collections::HashMap;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// 1. Configure modalities
let modality_config = ModalityConfig {
use_tabular: true,
use_temporal: true,
use_text: false,
use_image: false,
};
// 2. Build model
let mut model = LateFusionNet::new(
modality_config,
Some((10, vec![64, 32], 16)), // tabular: (input_size, hidden_layers, output_size)
Some((5, 32, 16)), // temporal: (input_size, hidden_size, output_size)
None, // text: disabled
None, // image: disabled
&[64, 32], // classifier hidden sizes
)?;
println!("Model created with modalities: {:?}", model.enabled_modalities());
// 3. Load and prepare data
// ... your data loading code ...
// 4. Configure training
let training_config = TrainingConfig {
epochs: 50,
batch_size: 32,
learning_rate: 0.001,
val_frequency: 1,
};
// 5. Train model
// ... your training loop ...
// 6. Save model
model.save("models/my_model.bin")?;
Ok(())
}
fn create_model_from_available_data(
has_tabular: bool,
has_temporal: bool,
has_text: bool,
has_image: bool,
) -> Result<LateFusionNet, Box<dyn std::error::Error>> {
// Build configuration from available data
let config = ModalityConfig {
use_tabular: has_tabular,
use_temporal: has_temporal,
use_text: has_text,
use_image: has_image,
};
// Validate at least one modality
config.validate()?;
// Build model with appropriate parameters
let model = LateFusionNet::new(
config,
if has_tabular { Some((10, vec![64, 32], 16)) } else { None },
if has_temporal { Some((5, 32, 16)) } else { None },
if has_text { Some((HashMap::new(), 50, 32)) } else { None },
if has_image { Some((3, 224, 224)) } else { None },
&[64, 32],
)?;
Ok(model)
}
Create patient_input.json:
{
"patient_id": "PAT-12345",
"tabular": [0.5, 0.3, 0.8, 0.1, 0.9, 0.4, 0.7, 0.2, 0.6, 0.5],
"temporal": [
[120.0, 80.0, 98.6, 72.0, 16.0],
[125.0, 82.0, 98.8, 75.0, 18.0],
[130.0, 85.0, 99.0, 78.0, 20.0]
],
"text": null,
"image_path": null
}
cargo run --release --bin ahuvista-predict -- \
--model models/maternal_mortality_model_modular.bin \
--config config.json \
--input patient_input.json \
--output prediction_result.json
Or using modality specification:
cargo run --release --bin ahuvista-predict -- \
--model models/model.bin \
--modalities tabular,temporal \
--input patient_input.json \
--output result.json
Output file prediction_result.json:
{
"risk_score": 0.73,
"calibrated_score": null,
"risk_category": "HIGH",
"confidence": 0.89,
"modalities_used": ["tabular", "temporal"],
"patient_id": "PAT-12345",
"timestamp": "2024-01-15T10:30:00Z"
}
Process multiple patients efficiently:
mkdir patient_inputs
# Add patient_001.json, patient_002.json, patient_003.json, etc.
cargo run --release --bin ahuvista-predict -- \
--model models/model.bin \
--config config.json \
--input patient_inputs \
--output batch_results.json \
--batch
Output batch_results.json contains an array of all predictions:
[
{
"risk_score": 0.73,
"risk_category": "HIGH",
"patient_id": "PAT-001",
...
},
{
"risk_score": 0.24,
"risk_category": "LOW",
"patient_id": "PAT-002",
...
}
]
Apply Bayesian calibration for more accurate probability estimates:
cargo run --release --bin ahuvista-predict -- \
--model models/model.bin \
--config config.json \
--input patient.json \
--calibrate 0.001 \
--output result.json
The --calibrate parameter specifies the population prevalence (e.g., 0.001 = 0.1% prevalence).
Why Use Calibration?
Each modality processes a different type of healthcare data:
| Modality | Data Type | Examples | When to Use |
|---|---|---|---|
| Tabular | Structured | Demographics, lab results, vitals | Always include if available |
| Temporal | Time-series | Continuous monitoring, trends | When tracking changes over time |
| Text | Unstructured | Clinical notes, reports | Rich qualitative information available |
| Image | Visual | Ultrasounds, X-rays, photos | Visual diagnosis required |
Use Case: EMR/EHR systems with structured data
cargo run --release --bin ahuvista-train -- \
--modalities tabular,temporal \
--epochs 50
Configuration:
{
"modalities": {
"use_tabular": true,
"use_temporal": true,
"use_text": false,
"use_image": false
}
}
Use Case: Radiology, ultrasound analysis
cargo run --release --bin ahuvista-train -- \
--modalities image \
--epochs 100
Use Case: Systems with extensive clinical notes
cargo run --release --bin ahuvista-train -- \
--modalities tabular,temporal,text \
--epochs 75
Use Case: Comprehensive healthcare systems with all data types
cargo run --release --bin ahuvista-train -- \
--modalities tabular,temporal,text,image \
--epochs 150
Do you have structured patient data?
โโ YES โ Enable TABULAR
โ โ
โ โโ Do you have time-series data?
โ โโ YES โ Enable TEMPORAL
โ โโ NO โ Continue
โ
โโ Do you have clinical notes?
โโ YES โ Enable TEXT
โโ NO โ Continue
Do you have medical images?
โโ YES โ Enable IMAGE
โโ NO โ Complete configuration
| Configuration | Memory | Speed | Accuracy Potential |
|---|---|---|---|
| Tabular only | ~50MB | Very Fast | Good |
| Tabular + Temporal | ~75MB | Fast | Better |
| Tabular + Text | ~100MB | Moderate | Better |
| Tabular + Image | ~150MB | Moderate | Better |
| All modalities | ~200MB | Slower | Best |
Format: CSV files with headers
Requirements:
PatientID column (or configured identifier)Example (patient_data.csv):
PatientID,Age,BMI,BloodPressure,HeartRate,Temperature,Hemoglobin,Glucose,RiskFactor1,RiskFactor2
PAT-001,28,24.5,120,75,98.6,12.5,95,0.8,0.3
PAT-002,35,28.1,130,82,99.1,11.8,110,0.6,0.5
PAT-003,22,22.3,115,70,98.4,13.2,88,0.2,0.1
Format: CSV with timestamp column
Requirements:
PatientID columnTimestamp or time-ordered rowsExample (vitals_timeseries.csv):
PatientID,Timestamp,SystolicBP,DiastolicBP,Temperature,HeartRate,RespiratoryRate
PAT-001,2024-01-01 08:00,120,80,98.6,72,16
PAT-001,2024-01-01 12:00,125,82,98.8,75,18
PAT-001,2024-01-01 16:00,130,85,99.0,78,20
PAT-002,2024-01-01 08:00,135,88,99.2,85,22
Format: Plain text files or CSV with text column
Requirements:
Example (clinical_notes.txt):
PAT-001: Patient presents with mild hypertension. Blood pressure elevated but stable...
PAT-002: Routine prenatal visit. Patient reports feeling well. No complications noted...
Format: Standard image formats (JPG, PNG, TIFF)
Requirements:
Directory Structure:
images/
โโโ PAT-001.jpg
โโโ PAT-002.png
โโโ PAT-003.jpg
JSON Structure:
{
"patient_id": "string (optional)",
"tabular": [array of numbers] or null,
"temporal": [[array of numbers per timestep]] or null,
"text": "string" or null,
"image_path": "path/to/image.jpg" or null
}
Complete Example:
{
"patient_id": "PAT-12345",
"tabular": [28.0, 24.5, 120.0, 75.0, 98.6, 12.5, 95.0, 0.8, 0.3, 0.1],
"temporal": [
[120.0, 80.0, 98.6, 72.0, 16.0],
[125.0, 82.0, 98.8, 75.0, 18.0],
[130.0, 85.0, 99.0, 78.0, 20.0]
],
"text": "Patient presents with mild hypertension during routine prenatal visit.",
"image_path": "images/ultrasound_001.jpg"
}
{
"modalities": {
"use_tabular": true, // Enable/disable tabular data processing
"use_temporal": true, // Enable/disable temporal/time-series processing
"use_text": false, // Enable/disable text/NLP processing
"use_image": false // Enable/disable image processing
},
"data_paths": {
"data_dir": "datasets", // Root directory for all data files
"patient_id_column": "PatientID", // Column name for patient identifiers
"tabular_files": ["file1.csv", "file2.csv"], // List of tabular CSV files
"temporal_files": ["timeseries.csv"], // List of temporal CSV files
"text_files": ["notes.txt", "reports.txt"], // List of text files
"image_files": ["images/", "scans/"] // Image directories or file lists
},
"training": {
"epochs": 50, // Number of complete passes through training data
"batch_size": 32, // Number of samples per training batch
"learning_rate": 0.001 // Learning rate for gradient descent
},
"model": {
// Tabular network architecture
"tabular_hidden_sizes": [64, 32], // Hidden layer sizes (2 layers: 64โ32 neurons)
"tabular_output_size": 16, // Size of tabular feature vector
// Temporal network architecture
"temporal_hidden_size": 32, // RNN hidden state size
"temporal_output_size": 16, // Size of temporal feature vector
// Text network architecture
"text_embedding_dim": 50, // Word embedding dimension
"text_hidden_size": 32, // Text RNN hidden state size
"text_max_vocab": 5000, // Maximum vocabulary size
// Image network architecture
"image_channels": 3, // Number of image channels (3=RGB, 1=grayscale)
"image_height": 224, // Target image height in pixels
"image_width": 224, // Target image width in pixels
// Classifier network
"classifier_hidden_sizes": [64, 32] // Final classifier hidden layers
}
}
| Parameter | Type | Default | Description |
|---|---|---|---|
use_tabular |
boolean | true |
Process structured tabular data |
use_temporal |
boolean | true |
Process time-series sequences |
use_text |
boolean | false |
Process unstructured text |
use_image |
boolean | false |
Process image data |
Note: At least one modality must be enabled.
| Parameter | Type | Range | Recommended | Description |
|---|---|---|---|---|
epochs |
integer | 1-1000 | 50-100 | Full training passes |
batch_size |
integer | 1-256 | 16-64 | Samples per batch |
learning_rate |
float | 0.00001-0.1 | 0.001-0.01 | Gradient step size |
Tuning Tips:
Tabular Network:
tabular_hidden_sizes: List of hidden layer sizes. Example: [128, 64] creates two layerstabular_output_size: Feature vector dimension (typically 16-32)Temporal Network:
temporal_hidden_size: RNN memory size (typically 32-64)temporal_output_size: Feature vector dimension (typically 16-32)Text Network:
text_embedding_dim: Word vector size (typically 50-300)text_hidden_size: RNN memory size (typically 32-128)text_max_vocab: Vocabulary limit (typically 5000-20000)Image Network:
image_channels: 3 for RGB, 1 for grayscaleimage_height/image_width: Target dimensions (commonly 224x224 or 256x256)Classifier:
classifier_hidden_sizes: Final layers that combine modality featuresuse ahuvista_nn::training::balancing::{
compute_sample_weights,
BayesianCalibrator,
CauseWeights
};
use std::collections::HashMap;
// Define population-level cause frequencies
let mut cause_frequencies = HashMap::new();
cause_frequencies.insert(0, 0.25); // Hemorrhage: 25%
cause_frequencies.insert(1, 0.20); // Hypertensive disorders: 20%
cause_frequencies.insert(2, 0.15); // Infection: 15%
cause_frequencies.insert(3, 0.10); // Thromboembolism: 10%
cause_frequencies.insert(4, 0.30); // Other: 30%
let cause_weights = CauseWeights::from_population_frequencies(&cause_frequencies);
// Define demographic strata
let mut stratum_multipliers = HashMap::new();
stratum_multipliers.insert("urban_young".to_string(), 1.0);
stratum_multipliers.insert("urban_old".to_string(), 1.2);
stratum_multipliers.insert("rural_young".to_string(), 1.5);
stratum_multipliers.insert("rural_old".to_string(), 1.8);
// Compute sample weights
let sample_weights = compute_sample_weights(
&targets,
Some(&patient_strata),
Some(&stratum_multipliers)
);
// Check enabled modalities
let modalities = model.enabled_modalities();
println!("Active modalities: {:?}", modalities);
// Verify specific modality
if model.is_enabled("tabular") {
println!("Tabular processing enabled");
}
// Get model configuration
let config = model.config();
println!("Modality config: {:?}", config);
// Save trained model
model.save("models/my_model.bin")?;
// Load model for inference
let mut loaded_model = LateFusionNet::new(
config,
tabular_params,
temporal_params,
text_params,
image_params,
&classifier_sizes,
)?;
loaded_model.load("models/my_model.bin")?;
use ahuvista_nn::core::fusion_modular::MultiModalInput;
// Build input programmatically
let mut input = MultiModalInput::new();
if has_tabular_data {
input = input.with_tabular(tabular_vector);
}
if has_temporal_data {
input = input.with_temporal(temporal_sequences);
}
// Make prediction
let risk_score = model.predict(input)?;
// Apply custom thresholds
let risk_level = if risk_score > 0.8 {
"CRITICAL"
} else if risk_score > 0.5 {
"HIGH"
} else {
"MODERATE"
};
| Configuration | RAM Usage | Training Time* | Inference Time** |
|---|---|---|---|
| Tabular only | ~50 MB | 2-5 min | < 10 ms |
| Tabular + Temporal | ~75 MB | 5-10 min | < 20 ms |
| Tabular + Text | ~100 MB | 10-15 min | < 30 ms |
| Tabular + Image | ~150 MB | 15-25 min | < 50 ms |
| All modalities | ~200 MB | 30-45 min | < 100 ms |
* Training time for 10,000 samples, 50 epochs on CPU (Intel i7) ** Single prediction on CPU
For Faster Training:
cargo build --releaseFor Lower Memory:
For Faster Inference:
--release# Step 1: Create minimal config
cat > quick_config.json << 'EOF'
{
"modalities": {
"use_tabular": true,
"use_temporal": false,
"use_text": false,
"use_image": false
},
"training": {
"epochs": 20,
"batch_size": 16,
"learning_rate": 0.001
}
}
EOF
# Step 2: Train
cargo run --release --bin ahuvista-train -- \
--config quick_config.json \
--verbose
# Step 3: Test prediction
cat > test_input.json << 'EOF'
{
"tabular": [0.5, 0.3, 0.8, 0.1, 0.9, 0.4, 0.7, 0.2, 0.6, 0.5]
}
EOF
cargo run --release --bin ahuvista-predict -- \
--model models/maternal_mortality_model_modular.bin \
--modalities tabular \
--input test_input.json
# Step 1: Create production configuration
cat > production_config.json << 'EOF'
{
"modalities": {
"use_tabular": true,
"use_temporal": true,
"use_text": true,
"use_image": false
},
"data_paths": {
"data_dir": "/data/healthcare",
"patient_id_column": "MRN",
"tabular_files": ["demographics.csv", "labs.csv"],
"temporal_files": ["vitals_monitoring.csv"],
"text_files": ["clinical_notes.txt"]
},
"training": {
"epochs": 150,
"batch_size": 64,
"learning_rate": 0.0005
},
"model": {
"tabular_hidden_sizes": [256, 128, 64],
"tabular_output_size": 64,
"temporal_hidden_size": 128,
"temporal_output_size": 64,
"text_embedding_dim": 200,
"text_hidden_size": 128,
"text_max_vocab": 15000,
"classifier_hidden_sizes": [256, 128]
}
}
EOF
# Step 2: Train with production settings
cargo run --release --bin ahuvista-train -- \
--config production_config.json \
--output-dir /models/production
# Step 3: Deploy for inference with calibration
cargo run --release --bin ahuvista-predict -- \
--model /models/production/maternal_mortality_model_modular.bin \
--config production_config.json \
--input /data/inference/patient.json \
--calibrate 0.0015 \
--output /results/prediction.json
# Process 1000 patients
mkdir -p batch_inputs batch_outputs
# Generate input files (your data preparation script)
# ...
# Run batch prediction
cargo run --release --bin ahuvista-predict -- \
--model models/research_model.bin \
--config research_config.json \
--input batch_inputs \
--output batch_outputs/results.json \
--batch \
--calibrate 0.001
# Test different modality combinations
for combo in "tabular" "temporal" "tabular,temporal" "tabular,text" "all"; do
echo "Testing: $combo"
if [ "$combo" = "all" ]; then
modalities="tabular,temporal,text,image"
else
modalities="$combo"
fi
cargo run --release --bin ahuvista-train -- \
--modalities $modalities \
--epochs 30 \
--output-dir experiments/$combo
done
Cause: No modalities selected in configuration
Solution:
# Ensure at least one modality is enabled
cargo run --release --bin ahuvista-train -- \
--modalities tabular \
--epochs 10
Cause: Model expects tabular data but input doesn't include it
Solution: Ensure input JSON includes all required modalities:
{
"tabular": [/* your data */],
"temporal": null
}
Solutions:
--batch-size 16--epochs 20--releaseSolutions:
--batch-size 8Solution: Use Bayesian calibration:
cargo run --release --bin ahuvista-predict -- \
--model model.bin \
--config config.json \
--input patient.json \
--calibrate 0.001
Causes & Solutions:
jsonlint--verbose flag for detailed outputexamples/ directoryContributions are welcome! We appreciate:
# Clone repository
git clone https://github.com/dandychux/ahuvista-nn.git
cd ahuvista-nn
# Create feature branch
git checkout -b feature/my-new-feature
# Make changes and test
cargo test
cargo fmt
cargo clippy
# Submit pull request
cargo fmt)cargo clippy)This project is dual-licensed under:
You may choose either license for your use.
This project was developed to improve maternal health outcomes through accessible, efficient AI systems that can run in resource-constrained environments.
Special thanks to the open-source Rust community and healthcare professionals who provided domain expertise.
This is a research and development tool. It is NOT approved for clinical use.
When using this system with patient data:
If using for research:
# Basic
cargo run --release --bin ahuvista-train -- --modalities tabular --epochs 20
# With config
cargo run --release --bin ahuvista-train -- --config config.json
# Full options
cargo run --release --bin ahuvista-train -- \
--config config.json \
--modalities tabular,temporal \
--epochs 100 \
--batch-size 32 \
--learning-rate 0.001 \
--output-dir ./models \
--verbose
# Single
cargo run --release --bin ahuvista-predict -- \
--model model.bin \
--config config.json \
--input patient.json
# Batch
cargo run --release --bin ahuvista-predict -- \
--model model.bin \
--config config.json \
--input patients_dir \
--batch
# Calibrated
cargo run --release --bin ahuvista-predict -- \
--model model.bin \
--config config.json \
--input patient.json \
--calibrate 0.001
tabular - Structured datatemporal - Time-seriestext - Clinical notesimage - Medical imagesCombine with commas: --modalities tabular,temporal,text
Version: 2.0.0 Last Updated: 2025 Status: Active Development