Tooluck logoTooluck
SKILL.md

decision-tree-analysis

Agent skill fromaipoch/medical-research-skills

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 to install decision-tree-analysis

install decision-tree-analysis
# install the medical-research-skills pack with the skills CLI
npx skills add aipoch/medical-research-skills

# or add only this skill to Claude Code: copy the folder

awesome-med-research-skills/Data Analysis/decision-tree-analysis/

# into

~/.claude/skills/decision-tree-analysis/ (all projects)

.claude/skills/decision-tree-analysis/ (one project)

awesome-med-research-skills/Data Analysis/decision-tree-analysis/SKILL.md

MITFull file
1> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
2
3# Decision Tree Analysis
4
5Use this skill to train a decision tree model from a tabular file and export feature importance ranking results.
6
7## Use This Skill When
8
9- You need a decision tree workflow in R for either classification or regression.
10- You need feature importance ranking as a table and a figure.
11- You need a command-line workflow with parameter validation and standardized output folders.
12
13## Primary Command
14
15```bash
16Rscript scripts/main.R \
17 --data_file <input_file> \
18 --target_var <target_column> \
19 --task_type <auto|classification|regression> \
20 --output_dir <output_dir>
21```
22
23## Prerequisites
24
25- `Rscript` is available in the shell.
26- Required R packages: `optparse`, `data.table`, `rpart`.
27- Install missing packages with `Rscript -e 'install.packages(c("optparse", "data.table", "rpart"), repos="https://cloud.r-project.org")'`.
28
29## Core Arguments
30
31| Argument | Required | Description |
32|----------|----------|-------------|
33| `--data_file` | Yes | Input data file in CSV, TXT, or TSV format |
34| `--target_var` | Yes | Target column to predict |
35| `--task_type` | No | `auto`, `classification`, or `regression`. Default `auto` |
36| `--output_dir` | No | Output directory, default `./Decision_Tree_Results` |
37| `--train_ratio` | No | Train set ratio between 0 and 1, default `0.7` |
38| `--max_depth` | No | Maximum tree depth, default `5` |
39…

Excerpt shown under the repository's MIT license.

More skills in medical-research-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates