Skip to contents

Pilar 1 — Causal AI

Backdoor adjustment, LLM-driven Knowledge Graphs, causal discovery, effect posteriors.

causal_4d_plot()
Plot a time-varying causal effect trajectory
causal_adjustment_set()
Suggest a backdoor-adjustment set from a DAG
causal_augment_dag()
Augment a base DAG with edges from a Knowledge Graph
causal_augment_diff()
Diff between a base DAG and an augmented DAG
causal_cerrado_dag()
DAG tailored to the bundled Cerrado dataset (br_cerrado)
causal_cerrado_real_dag()
Real-data Cerrado pedogenetic DAG
causal_clorpt_dag()
Canonical CLORPT pedogenetic DAG
causal_corpus_deduplicate()
Deduplicate a corpus by DOI or title
causal_corpus_openalex()
Query the OpenAlex corpus
causal_corpus_scielo()
Query the SciELO literature corpus
causal_effect_bootstrap()
Block-bootstrap the backdoor-adjusted direct effect
causal_effect_posterior()
Posterior distribution of a backdoor-adjusted direct effect
causal_effect_time_varying()
Time-varying causal effect beta(t) over a sliding window
causal_effect_trend_test()
Mann-Kendall trend test on a beta(t) trajectory
causal_estimate_effect()
Estimate a causal effect using DAG-guided backdoor adjustment
causal_iv_first_stage()
First-stage regression diagnostics for an IV design
causal_iv_fit_2sls()
Two-stage least squares (2SLS) instrumental variable estimator
causal_iv_from_embeddings()
Fit 2SLS using foundation-model (or proxy) embeddings as instruments
causal_iv_posterior()
Bootstrap posterior for a 2SLS effect as an edaphos_posterior
causal_iv_sargan_test()
Sargan test for instrument over-identification
causal_kg_add_edge()
Add a causal edge to a pedogenetic Knowledge Graph
causal_kg_alignment()
Align Knowledge-Graph node labels to a canonical vocabulary
causal_kg_edges()
Tidy edge list of a pedogenetic Knowledge Graph
causal_kg_load()
Load a Knowledge Graph from disk
causal_kg_new()
Create an empty pedogenetic Knowledge Graph
causal_kg_rank_edges()
Rank Knowledge-Graph edges by evidence strength
causal_kg_rename()
Rename Knowledge-Graph nodes from an alignment mapping
causal_kg_save()
Save a Knowledge Graph to disk
causal_kg_to_dagitty()
Export a Knowledge Graph to a dagitty DAG
causal_kg_to_turtle()
Export a Knowledge Graph to RDF 1.1 Turtle
causal_llm_extract()
Extract causal claims from text via an LLM backend
causal_llm_ingest_abstract()
Ingest an abstract into a pedogenetic Knowledge Graph
causal_llm_ingest_abstract_voted()
Ingest an abstract into a KG via multi-extractor voting
causal_llm_ingest_corpus()
Ingest a corpus of abstracts into a Knowledge Graph (resumable)
causal_llm_vote()
Multi-extractor consensus over LLM-extracted causal claims
causal_ontology_agrovoc()
Query the AGROVOC SPARQL endpoint
causal_ontology_agrovoc_align()
Live AGROVOC alignment for a vector of free-text terms
causal_ontology_agrovoc_align_batch()
Concurrent AGROVOC alignment for a large vocabulary
causal_ontology_cerrado()
Canonical Cerrado pedometric vocabulary
causal_ontology_envo()
Load an ENVO ontology from a local .obo file
causal_sensitivity_from_iv()
Sensitivity analysis of an edaphos_causal_iv fit
causal_sensitivity_from_lm()
Sensitivity analysis of an lm backdoor fit
causal_sensitivity_grid()
Bias-adjustment grid for a Cinelli & Hazlett sensitivity contour
causal_sensitivity_summary()
Cinelli & Hazlett (2020) sensitivity summary for a causal effect
causal_structure_learn()
Structure learning from horizon data -> Knowledge Graph
llm_annotation_export()
Export a reviewed JSONL into the canonical gold-standard format
llm_annotation_launch()
Launch the interactive gold-standard review app
llm_annotation_to_zenodo()
Package a reviewed gold-standard into a Zenodo-ready deposit bundle
llm_annotation_validate()
Validate a gold-standard JSONL file
llm_annotation_vocabulary()
Canonical pedometric vocabulary for LLM-KG claims
llm_benchmark_cost()
Estimate per-1 000-claim extraction cost
llm_benchmark_kappa()
Pairwise Cohen's kappa between backends on edge presence
llm_benchmark_match()
Match extracted LLM claims against a gold-standard set
llm_benchmark_metrics()
Compute precision / recall / F1 from a match table
llm_benchmark_simulate()
Simulate backend extractions from a gold-standard set
llm_preannotate()
Pre-annotate a corpus with an LLM to produce draft claims
summary(<edaphos_causal_kg>)
One-line summary of a Knowledge Graph

Pilar 2 — Physics-Informed ML

Pedogenetic ODE, Bayesian posterior, Neural ODE + ensemble.

piml_bayes_posterior()
Posterior predictive distribution from a Bayesian Pillar 2 fit
piml_hierarchical_fit()
Hierarchical Neural ODE over multiple pedons (Pillar 2 × Pillar 5)
piml_hierarchical_predict()
Predict depth profiles for new locations from covariates
piml_neural_ode_fit()
Fit a Neural ODE depth profile (Pillar 2, deep variant)
piml_neural_ode_fit_ensemble()
Train a deep ensemble of Neural ODEs for uncertainty quantification
piml_neural_ode_posterior()
Posterior predictive distribution from a Pillar 2 deep ensemble
piml_neural_ode_predict()
Predict a depth profile from a fitted Neural ODE
piml_profile_fit()
Fit a Physics-Informed depth-profile model (Pillar 2)
piml_profile_fit_bayesian()
Bayesian posterior for the Pillar 2 pedogenetic ODE
piml_profile_fit_group()
Fit the Pillar 2 profile model to a group of pedons independently
piml_profile_predict()
Forward-integrate a Physics-Informed depth profile
piml_qkrr_fit()
Fit a Physics-Informed Quantum Kernel Ridge Regression
piml_quantum_kernel()
Physics-informed quantum kernel via ODE-residual fusion
predict(<edaphos_piml_bayes>)
Posterior predictive distribution of a Bayesian Pillar 2 fit
predict(<edaphos_piml_neural_ode_ensemble>)
Predictive posterior from a Neural-ODE deep ensemble

Pilar 3 — 4D Pedometry

ConvLSTM, rollout, mass-balance physics loss, stochastic EnKF.

temporal_convlstm_cell()
Build a standalone ConvLSTM cell (Pillar 3 primitive)
temporal_convlstm_ensemble_fit()
K-seed deep ensemble of stacked ConvLSTMs
temporal_convlstm_ensemble_rollout()
Roll every ensemble member forward and stack the forecasts
temporal_convlstm_fit()
Fit a stacked ConvLSTM on a 4D covariate cube
temporal_convlstm_mcdropout_predict()
MC-dropout predictive draws from a ConvLSTM fit
temporal_convlstm_predict()
Predict with a fitted stacked ConvLSTM
temporal_convlstm_rollout()
Multi-step rollout forecast
temporal_cube_to_tensor()
Assemble a 4D input tensor-ready array from a synthetic cube
temporal_kalman_update()
Ensemble Kalman update of a Pillar 3 forecast by new point observations
temporal_piml_loss()
Physics-informed ConvLSTM mass-balance loss (Pilar 2 x Pilar 3)
temporal_synth_soc_cube()
Generate a synthetic 4D soil-dynamics cube (Pillar 3 helper)

Pilar 4 — Foundation Models

SimCLR + MoCo v2 pretraining, Zenodo-hosted weights, raster extraction.

foundation_build_cerrado_stack()
Build the Cerrado raster stack for IV / quantum-foundation benchmarks
foundation_embed_at_coords()
Extract foundation-model embeddings at a set of query coordinates
foundation_finetune_ensemble()
Deep-ensemble fine-tune of a Pillar 4 foundation encoder
foundation_fit_classifier()
Fine-tune or linearly probe a Pillar 4 encoder for classification
foundation_fit_regressor()
Fine-tune or linearly probe a Pillar 4 encoder for regression
foundation_mcdropout_predict()
MC-dropout predictive draws from a fine-tuned Pillar 4 fit
foundation_moco_embed()
Extract backbone embeddings from a fitted MoCo v2 encoder
foundation_moco_embed_raster()
Apply a fitted MoCo v2 encoder over a full raster mosaic
foundation_moco_pretrain()
Pillar 4 – MoCo v2 pre-training on raster covariate patches
foundation_moco_pretrain_tiles()
Dataset-backed MoCo v2 pre-training for planetary-scale corpora
foundation_simclr_embed()
Extract embeddings from a pretrained SimCLR encoder
foundation_simclr_pretrain()
SimCLR pre-training on raster covariate patches (Pillar 4 scaffold)
foundation_tile_align()
Align multiple raster sources onto a common analysis grid
foundation_tile_dataset()
Build a lazy patch dataset over a terra::SpatRaster
foundation_tile_source_era5()
ERA5 source stub (needs Copernicus CDS key)
foundation_tile_source_modis()
MODIS source stub (needs NASA EarthData credentials)
foundation_tile_source_soilgrids()
Fetch a SoilGrids 250 m stack over an AoI
foundation_tile_source_srtm()
Fetch an SRTM elevation raster over an AoI
foundation_tile_source_worldclim()
Fetch a WorldClim 2.1 climate stack over an AoI
foundation_weights_download()
Download a pretrained Pillar 4 encoder from Zenodo
foundation_weights_list()
Catalogue of pretrained Pillar 4 encoders
foundation_weights_load()
Load a pretrained encoder into an edaphos_foundation_moco wrapper
predict(<edaphos_foundation_classifier>)
Predict class probabilities / labels from a fine-tuned classifier
predict(<edaphos_foundation_regressor>)
Predict numeric targets from a fine-tuned regressor
predict(<edaphos_foundation_ensemble>)
Predict with an edaphos_foundation_ensemble

Pilar 5 — Active Learning

Hybrid policy, BatchBALD, physics gate, posterior calibration.

al_fit()
Fit a Quantile Regression Forest for Active Learning
al_history()
Extract the learning curve from a fitted Active-Learning model
al_initial_design()
Initial sampling design via Conditioned Latin Hypercube (cLHS)
al_loop()
Closed-loop Autonomous Active Learning for soil mapping
al_physics_gate_piml()
Build a physics gate from a PIML profile fit
al_physics_gate_piml_hierarchical()
Per-location physics gate backed by a hierarchical PIML fit
al_query()
Query the most informative unlabeled candidates
al_query_batchbald()
BatchBALD information-theoretic batch acquisition
al_query_bhs()
Bayesian Hierarchical Active Learning (Pilar 7 x Pilar 5)
al_query_causal()
Causal Active Learning: query the next sample(s) that most reduce the uncertainty of a targeted causal effect
al_query_diffusion()
Diffusion-posterior-driven AL (Pilar 9 x Pilar 5)
al_query_neural_operator()
Causal-driven AL via Neural Operator disagreement (Pilar 8 x Pilar 5)
al_query_temporal()
Temporal Active Learning: rank candidate cells by their Kalman gain norm after the latest EnKF assimilation
al_update()
Append newly labeled samples and refit the model
active_learning_posterior()
Posterior predictive distribution of an edaphos Active-Learning fit

Pilar 6 — Quantum ML

ZZFeatureMap, Quantum KRR, Qiskit VQE, organo-mineral Hamiltonians.

quantum_feature_map()
Quantum feature map (Pillar 6)
quantum_hamiltonian()
Build a quantum Hamiltonian from Pauli-string coefficients
quantum_hamiltonian_from_pyscf()
Build a quantum Hamiltonian from a molecular geometry
quantum_hamiltonian_h2()
Molecular H2 in the Bravyi-Kitaev-tapered 2-qubit basis
quantum_hamiltonian_ising_1d()
Transverse-field Ising Hamiltonian on an n-qubit chain
quantum_hamiltonian_organo_mineral()
Toy organo-mineral Hamiltonian (4-qubit Fe + ligand coupling)
quantum_hamiltonian_organo_mineral_nature()
Organo-mineral Hamiltonians derived from ab initio molecular models
quantum_ibmq_available()
Check whether an IBM Quantum backend is reachable
quantum_ibmq_backends()
List IBM Quantum backends available to the current account
quantum_ibmq_least_busy()
Pick the least-busy operational IBM Quantum backend
quantum_ibmq_submit()
Submit a single expectation-value PUB to IBM Quantum hardware
quantum_kernel()
Quantum kernel Gram matrix via ZZFeatureMap overlap
quantum_krr_fit()
Fit a Quantum Kernel Ridge Regression (Pillar 6)
quantum_krr_posterior()
GP-equivalent posterior for a Quantum Kernel Ridge Regression fit
quantum_nature_available()
Check whether the qiskit-nature + PySCF stack is available
quantum_nature_total_energy()
Total molecular energy from an active-space VQE result
quantum_scale()
Rescale a covariate matrix into [lower, upper] column-wise
quantum_vqe_exact()
Exact ground-state energy via classical diagonalisation
quantum_vqe_fit()
Variational Quantum Eigensolver (Pillar 6 main entry point)

Pilar 7 — Bayesian Hierarchical Spatial (v2.3.0+)

Gaussian process + Gibbs sampler (R fast-path / RcppArmadillo / spBayes).

bhs_fit()
Fit a Bayesian hierarchical spatial linear model (Pilar 7)
predict(<edaphos_bhs>)
Predict at new sites from a fitted Bayesian hierarchical spatial model

Pilar 8 — Neural Operators (v2.4.0+)

DeepONet + FNO over depth function space.

no_deeponet_fit()
Fit a DeepONet for depth-profile operators
no_fno_fit()
Fit a 1-D Fourier Neural Operator for depth-profile operators

Pilar 9 — Diffusion Models (v2.5.0+)

DDPM with cosine schedule + ancestral sampling.

dm_cosine_schedule()
Build a DDPM noise schedule
dm_fit()
Train a tiny DDPM on a collection of soil-map patches
dm_sample()
Sample new soil-map patches from a trained DDPM

Pilar 10 — Graph Attention Networks (v2.6.0+)

k-NN co-location graphs + multi-head attention; v3.6.0 sparse.

gnn_build_graph()
Build a k-NN co-location graph from a profile frame
gnn_causal_discovery()
Graph-based causal discovery (Pilar 10 x Pilar 1)
gnn_embed()
Node-level embeddings from a fitted GAT
gnn_fit()
Fit a Graph Attention Network on a WoSIS-style co-location graph

Cross-pillar bridges (v1.9.x + v2.0.0 + v3.0.0)

Foundation embeddings as causal instruments; quantum kernels over foundation embeddings; six v3.0.0 bridges (P7/8/9 x P5 + P10 x P1 + P2 x P3 + P6 x P10).

qf_embed_reduce()
Reduce foundation-model embeddings to PCs and scale to quantum range
qf_kernel_compare()
Compare quantum, RBF, and linear kernels on the same feature set
qf_krr_benchmark()
Benchmark quantum-foundation KRR against classical baselines
qf_krr_fit()
Quantum Kernel Ridge Regression on foundation embeddings
qf_krr_on_gat_embeddings()
Quantum KRR over GAT node embeddings (Pilar 6 x Pilar 10)
al_query_batchbald()
BatchBALD information-theoretic batch acquisition
al_query_bhs()
Bayesian Hierarchical Active Learning (Pilar 7 x Pilar 5)
al_query_causal()
Causal Active Learning: query the next sample(s) that most reduce the uncertainty of a targeted causal effect
al_query_diffusion()
Diffusion-posterior-driven AL (Pilar 9 x Pilar 5)
al_query_neural_operator()
Causal-driven AL via Neural Operator disagreement (Pilar 8 x Pilar 5)
al_query_temporal()
Temporal Active Learning: rank candidate cells by their Kalman gain norm after the latest EnKF assimilation
gnn_causal_discovery()
Graph-based causal discovery (Pilar 10 x Pilar 1)
temporal_piml_loss()
Physics-informed ConvLSTM mass-balance loss (Pilar 2 x Pilar 3)

Unified uncertainty API (v1.6.0)

Common edaphos_posterior class + single calibration diagnostic.

uncertainty_calibrate()
Calibration diagnostics for an edaphos_posterior
uncertainty_plot_reliability()
Reliability diagram from a calibration result
edaphos_posterior()
Unified posterior object for the edaphos pillars
as_edaphos_posterior()
Coerce a native pillar object to edaphos_posterior
autoplot.edaphos_posterior()
Default ggplot for an edaphos_posterior
edaphos_bias()
Mean bias (observed minus predicted)
edaphos_ece()
Expected calibration error (ECE) for a regression reliability diagram
edaphos_interval_score()
Interval score (Gneiting and Raftery 2007)
edaphos_mae()
Mean absolute error
edaphos_metrics_summary()
Summarise a pointwise + interval prediction against observations
edaphos_picp()
Prediction-interval coverage probability (PICP)
edaphos_r2()
Coefficient of determination (Nash-Sutcliffe efficiency)
edaphos_rmse()
Root-mean-square error
edaphos_zenodo_release()
Build a Zenodo-ready release bundle for the edaphos package

Benchmark wrappers (v3.1.0)

Plug-and-play wrappers for the 6-pilar WoSIS Cerrado benchmark.

benchmark_fit_p10_gat()
Benchmark wrapper: Pilar 10 – GAT seed-ensemble on k-NN graph
benchmark_fit_p1_causal()
Benchmark wrapper: Pilar 1 – DAG-adjusted OLS + parametric bootstrap
benchmark_fit_p6_quantum()
Benchmark wrapper: Pilar 6 – bootstrap-ensembled quantum KRR

LLM-KG production pipeline (v3.10.0)

Resumable 10k+ abstract orchestrator + Ollama pre-flight.

llm_kg_ollama_check()
Check whether a local Ollama server is reachable
llm_kg_pipeline_run()
Run the Pilar 1 LLM-KG pipeline on a (potentially large) corpus

Bundled datasets

br_cerrado
Synthetic Cerrado soil sample for edaphos vignettes
br_amazon
Synthetic Amazon-rainforest soil sample (NW Brazil)
br_pantanal
Synthetic Pantanal-wetland soil sample (MS, Brazil)

Package roadmap

edaphos-roadmap
Roadmap and status of the six pillars of edaphos