stat-learn-bayesian-network
Skill4 starsChanged 12 days agoMITView on GitHub
Learn the structure and conditional probabilities of a Bayesian network from observational data for causal discovery or dependency modeling.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- download-sraSkill
- source-summarizerSkill
- genome-alignment-qcSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-quality-controlSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-cluster-samplesSkill
- stat-compare-multiple-groupsSkill
- stat-compare-two-groupsSkill
- stat-fit-glmSkill
- stat-fit-linear-modelSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Read data; detect or apply variable types.
- Distinctive: line 36
Write the DAG adjacency matrix (TSV), CPD parameters (TSV), network plot (PDF), and Markov blanket summary (TSV) to output directory.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Bayesian Network Learning
Use When
- User wants to discover conditional dependencies and potential causal relationships among variables
- User wants to build a probabilistic graphical model for gene regulatory networks or clinical variable relationships
- User wants to perform probabilistic inference (e.g., what is the probability of disease given observed biomarkers)
Inputs
- Required:
- Data table (CSV or TSV): rows = observations, columns = variables (numeric or discrete)
- Optional:
- Variable types per column:
continuousordiscrete(default: auto-detected) - Structure learning algorithm:
hc(Hill-Climbing, default),tabu(Tabu search), orpc(PC algorithm, for large graphs) - Scoring function:
bic(default),aic, orbdeu(for discrete data) - Whitelist of edges to force (CSV: from, to)
- Blacklist of edges to forbid (CSV: from, to)
- Number of bootstrap replicates for edge confidence (default:
100) - Output directory (default:
./bn_output)
- Variable types per column:
Workflow
- Read data; detect or apply variable types; discretize continuous variables if needed for discrete BN learning (using quantile bins).
- Learn network structure using the specified algorithm and scoring function.
- Fit conditional probability distributions (CPDs) for each node given its parents.
- Compute bootstrap confidence for each edge (fraction of bootstrap replicates containing that edge).
- Report high-confidence edges (bootstrap support ≥ 0.8) vs. uncertain edges.
- Visualize the learned DAG: nodes = variables, directed edges = learned dependencies, edge width proportional to bootstrap support.
- Perform a Markov blanket analysis for each variable (its direct causes, effects, and spouses).
- Write the DAG adjacency matrix (TSV), CPD parameters (TSV), network plot (PDF), and Markov blanket summary (TSV) to output directory.
- Save the executable analysis script (
analysis_code.pyoranalysis_code.R) and software version manifest (session_info.txt) used to produce results.
Output Contract
- DAG adjacency matrix (TSV): row = parent, column = child, value = bootstrap support (0–1)
- CPD table (TSV): node, parents, CPD parameters
- Network visualization (PDF): DAG with node labels and edge confidence
- Markov blanket summary (TSV): variable, parents, children, spouses
- High-confidence edge list (TSV): from, to, bootstrap_support
- Reproducibility artifacts:
analysis_code.pyoranalysis_code.R, plussession_info.txt
Limits
- Structure learning is NP-hard; runtime grows exponentially with number of variables. Use PC algorithm for > 50 variables.
- Observational data cannot establish causality — learned edges represent statistical dependence, not necessarily causal direction.
- Requires sufficient sample size relative to number of variables (recommended: n > 5 × number of variables).
- Continuous variable discretization introduces information loss; consider Gaussian BN for purely continuous data.
- Common failure: cyclic structure detected during learning — enforce acyclicity via blacklisting or algorithm constraints.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

