Patient Similarity Network Construction
Run the Patient Similarity Network Construction MicroSim Fullscreen
Edit in the p5.js Editor
About This MicroSim
This MicroSim demonstrates patient similarity network (PSN) construction in three stages: (1) a patient-feature data matrix, (2) a pairwise similarity heatmap, and (3) a force-directed network where similar patients cluster together.
Three Stages
- Data Matrix — Rows are patients, columns are clinical features (lab values, diagnoses, gene expression). This is the raw input data.
- Similarity Heatmap — A symmetric matrix showing pairwise similarity scores between all patients. Computed using cosine similarity, correlation, or other distance metrics.
- Patient Network — Patients become nodes, and edges connect patients above a similarity threshold. The force-directed layout clusters similar patients together, revealing natural subgroups.
Why This Matters
Patient similarity networks are used in precision medicine to: - Identify disease subtypes based on multi-dimensional clinical data - Predict treatment response for a new patient based on similar patients' outcomes - Discover patient subgroups that may benefit from targeted therapies
How to Use
- Step button — Advance through the three stages: data matrix → similarity heatmap → network
- Observe the transformation — Watch how tabular data becomes a network through pairwise similarity computation
- Identify clusters — In the network view, look for groups of tightly connected patients
Iframe Embed Code
1 2 3 4 | |
Lesson Plan
Grade Level
College introductory bioinformatics
Duration
15-20 minutes
Prerequisites
- Understanding of clinical data and patient records
- Concept of similarity/distance metrics
- Basic network visualization concepts
Activities
- Exploration (5 min): Step through all three stages. At each, describe what the data looks like and how it changed from the previous stage.
- Threshold Effects (5 min): How would changing the similarity threshold affect the network? A high threshold creates fewer, stronger edges; a low threshold creates a dense network. Discuss the trade-off.
- Clinical Application (5 min): A new patient arrives. How would you use this network to predict their likely diagnosis or treatment response?
- Assessment (3 min): Answer the reflection questions below.
Assessment
- What are the three stages of patient similarity network construction?
- Why is the similarity heatmap symmetric?
- How could a patient similarity network help identify disease subtypes?
- What clinical features might be included in the data matrix, and how does feature selection affect the resulting network?