Decision Tree Analysis

Use when building a decision tree model in R and generating feature importance ranking outputs. Supports classification and regression, automatic task detection, parameter validation, model evaluation summaries, and exports of feature-importance tables and figures.

2,068 stars 206 forksData & Analytics

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add aipoch/medical-research-skills --skill decision-tree-analysis
Manual install
git clone --depth 1 https://github.com/aipoch/medical-research-skills.git /tmp/medical-research-skills
mkdir -p ~/.claude/skills
cp -r /tmp/medical-research-skills/awesome-med-research-skills/Data Analysis/decision-tree-analysis ~/.claude/skills/decision-tree-analysis

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)

# Decision Tree Analysis

Use this skill to train a decision tree model from a tabular file and export feature importance ranking results.

## Use This Skill When

- You need a decision tree workflow in R for either classification or regression.
- You need feature importance ranking as a table and a figure.
- You need a command-line workflow with parameter validation and standardized output folders.

## Primary Command

```bash
Rscript scripts/main.R \
  --data_file <input_file> \
  --target_var <target_column> \
  --task_type <auto|classification|regression> \
  --output_dir <output_dir>
```

## Prerequisites

- `Rscript` is available in the shell.
- Required R packages: `optparse`, `data.table`, `rpart`.
- Install missing packages with `Rscript -e 'install.packages(c("optparse", "data.table", "rpart"), repos="https://cloud.r-project.org")'`.

## Core Arguments

| Argument | Required | Description |
|----------|----------|-------------|
| `--data_file` | Yes | Input data file in CSV, TXT, or TSV format |
| `--target_var` | Yes | Target column to predict |
| `--task_type` | No | `auto`, `classification`, or `regression`. Default `auto` |
| `--output_dir` | No | Output directory, default `./Decision_Tree_Results` |
| `--train_ratio` | No | Train set ratio between 0 and 1, default `0.7` |
| `--max_depth` | No | Maximum tree depth, default `5` |
Read the full skill on GitHub

Details

Skill name
decision-tree-analysis
Path
awesome-med-research-skills/Data Analysis/decision-tree-analysis/SKILL.md
License
MIT
Repo updated
17 September 2026

FAQ

What does the Decision Tree Analysis skill do?

Use when building a decision tree model in R and generating feature importance ranking outputs. Supports classification and regression, automatic task detection, parameter validation, model evaluation summaries, and exports of feature-importance tables and figures.

How do I install the Decision Tree Analysis skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add aipoch/medical-research-skills --skill decision-tree-analysis. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Decision Tree Analysis popular?

It lives in aipoch/medical-research-skills, which has 2,068 GitHub stars and 206 forks.

Related skills

Clinicaltrials Database

2.1k

aipoch/medical-research-skills

Query ClinicalTrials.gov via API v2. Search trials by condition, drug, location, status, or phase. Retrieve trial details by NCT ID, export data, for clinical research and patient matching.

Research & Science206

Abstract Summarizer

2.1k

aipoch/medical-research-skills

Transform lengthy academic papers into concise, structured 250-word abstracts.

Research & Science206

Abstract Trimmer

2.1k

aipoch/medical-research-skills

Precision editing tool that reduces abstract word count through intelligent compression techniques, maintaining scientific rigor while meeting strict journal and conference requirements.

Research & Science206

Deeptools

2.1k

aipoch/medical-research-skills

NGS analysis toolkit. Used for BAM to bigWig conversion, quality control (correlation, PCA, fingerprint plots), heatmaps/feature plots (TSS, peaks), suitable for ChIP-seq, RNA-seq, ATAC-seq visualization.

Data & Analytics206

Decision Curve Analysis

2.1k

aipoch/medical-research-skills

Use when evaluating the clinical utility of a binary prediction model from a single clinical CSV file by fitting a logistic decision-curve model, plotting decision and clinical-impact curves, and exporting summary outputs. NOT for: survival calibration, ROC-only discrimination analysis, nomogram construction, or time-to-event outcomes.

Data & Analytics206

Deg Screening Analysis

2.1k

aipoch/medical-research-skills

Use when screening differentially expressed genes from a bulk expression matrix between two user-specified groups, producing DEG tables, a volcano plot, and a clustered heatmap. Triggers include DEG analysis, volcano plot, clustered heatmap, limma-based two-group comparison, and case-vs-control screening. NOT for single-cell RNA-seq, multi-group contrasts, count-model workflows such as DESeq2/edgeR, or non-expression omics data.

Data & Analytics206

Browse the most popular Claude skills, all data & analytics skills, or write your own with the skills generator.