Logo von Rf Model Importance Analysis

Rf Model Importance Analysis

OrganisationBeliebt
aipoch
rf-model-importance-analysis

Use when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate reproducible error and importance plots. NOT for regression tasks, multi-class classification, missing-value imputation, preprocessing, or remote data fetching.

Übersicht

Herausgeberaipoch
Repositorymedical-research-skills
Skill-Namerf-model-importance-analysis
Sterne
1.9K
Forks
175
Mitgelieferte Dateien
20
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 20 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von aipoch auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Rf Model Importance Analysis in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/rf-model-importance-analysis
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.

In TypingMind verwenden

Aktivieren Sie Rf Model Importance Analysis in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Rf Model Importance Analysis automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Rf Model Importance Analysis nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Source: https://github.com/aipoch/medical-research-skills

RF Model Importance Analysis

Quick Start

Use one of these three commands first, then consult the full argument table only if you need extra tuning.

1. Standard Run

bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --case_group AR \
  --control_group Control \
  --output_dir tests/output/manual-test \
  --seed 42 \
  --timeout_seconds 300

2. Tuned Importance Run

bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --case_group AR \
  --control_group Control \
  --output_dir tests/output/custom-importance \
  --seed 42 \
  --rf_ntree 800 \
  --rf_mtry 4 \
  --rf_imp_type 2 \
  --rf_imp_threshold 1 \
  --rf_top_n 8 \
  --rf_importance_top_n 8 \
  --timeout_seconds 300

3. Plot-Only Rerender

Run this only after a full analysis has already created output_dir/data/rf_result.rds.

bash
Rscript scripts/main.R \
  --plot_only TRUE \
  --output_dir tests/output/manual-test \
  --seed 42 \
  --timeout_seconds 300

When to Read External Files

SituationFile to ReadPurpose
Need algorithm detailsreferences/algorithm.mdExplain random forest modeling, importance metrics, assumptions, and result interpretation
Need to execute the analysisscripts/main.RRun the CLI entry point with a complete Rscript command
Encounter an errorreferences/troubleshooting.mdMap error codes to causes and fixes
Need CLI examplesreferences/cli-guide.mdSee installation steps and runnable command examples
Need a runnable smoke testtests/data/Use the bundled small dataset for verification

Stop Conditions

Do not use this skill when any of the following is true:

  • The task is regression, multiclass classification, time-series modeling, or remote data fetching.
  • The input still requires imputation, normalization, batch correction, or other preprocessing.
  • The feature matrix contains missing values, non-numeric feature columns, or mismatched sample IDs.

If one of those conditions applies, stop and hand off to a preprocessing or alternative modeling workflow before running this skill.

Usage

Before running the CLI, ensure the data is already cleaned for binary classification: samples in rows, numeric feature columns only, and no missing values. Imputation, normalization, and batch correction are outside this skill's scope.

bash
Rscript scripts/main.R \
  --input_file ./input/expression_matrix.csv \
  --group_file ./input/group_info.csv \
  --case_group Case \
  --control_group Control \
  --output_dir output/basic-run \
  --seed 42 \
  --timeout_seconds 600

Arguments

ShortLongTypeDefaultRequiredDescription
-i--input_filecharacternoneyes, unless --plot_only TRUEExpression matrix file with samples in rows and features in columns
-g--group_filecharacternoneyes, unless --plot_only TRUEGroup file with sample IDs in the first column
-c--case_groupcharacternoneyes, unless --plot_only TRUECase group label
-r--control_groupcharacternoneyes, unless --plot_only TRUEControl group label
-o--output_dircharacteroutputyesOutput directory inside the skill root
-p--plot_onlylogicalFALSEnoReuse output_dir/data/rf_result.rds and regenerate plots without retraining
-s--seedinteger42noRandom seed for reproducibility
-t--timeout_secondsinteger600noElapsed time limit for the run
--rf_ntreeinteger500noNumber of trees in the random forest
--rf_mtryintegerNAnoVariables sampled at each split; NA uses the package default
--rf_nodesizeintegerNAnoMinimum terminal node size; NA uses the package default
--rf_imp_typeinteger1noImportance metric type passed to randomForest::importance; allowed values are 1 or 2
--rf_imp_thresholdnumeric0noMinimum importance score retained in rf_top_features.csv
--rf_top_ninteger30noMaximum number of rows written to rf_top_features.csv
--rf_error_xlabcharacterNumber of TreesnoX-axis label for the RF error plot
--rf_error_ylabcharacterErrornoY-axis label for the RF error plot
--rf_error_line_sizenumeric0.6noLine width for the RF error plot
--rf_error_line_alphanumeric1noLine alpha for the RF error plot
--rf_error_line_colorcharacter#6C85F9,#D9503D,#939DE4,#DEA441,#A2C6D6,#E9B9E1,#BDD69F,#EBC98AnoComma-separated line colors for non-OOB curves
--rf_error_line_typecharacterdashednoLine type for class-specific error curves
--rf_error_line_oob_typecharactersolidnoLine type for the OOB curve
--rf_error_legend_positioncharacternonenoLegend position for the RF error plot
--rf_error_border_colorcharacterblacknoPanel border color for the RF error plot
--rf_error_border_fillcharacterNAnoPanel fill for the RF error plot; use NA or NULL as text
--rf_error_border_sizenumeric0.8noPanel border width for the RF error plot
--rf_error_base_sizenumeric14noBase font size for the RF error plot
--rf_error_widthnumeric6noRF error plot width in inches
--rf_error_heightnumeric5noRF error plot height in inches
--rf_importance_sortlogicalTRUEnoSort variables in the importance plot
--rf_importance_top_ninteger10noMaximum number of variables shown in the importance plot
--rf_importance_label_x_annlogicalTRUEnoShow x-axis tick labels in the importance plot
--rf_importance_label_colorcharacterblacknoText and point outline color in the importance plot
--rf_importance_label_cexnumeric0.9noLabel size in the importance plot
--rf_importance_point_cexnumeric0.9noPoint size in the importance plot
--rf_importance_point_shapeinteger23noPoint shape in the importance plot
--rf_importance_point_fillcharacterrednoPoint fill color in the importance plot
--rf_importance_line_colorcharactergraynoSegment color in the importance plot
--rf_importance_theme_borderlogicalTRUEnoDraw panel borders in the importance plot
--rf_importance_theme_offsetnumeric0.2noAxis expansion factor in the importance plot
--rf_importance_titlecharacterVariable ImportancenoMain title for the importance plot
--rf_importance_title_x_annlogicalTRUEnoShow title and axis annotations in the importance plot
--rf_importance_widthnumeric6noRF importance plot width in inches
--rf_importance_heightnumeric5noRF importance plot height in inches

Input Format

Expression Matrix

  • CSV or TSV.
  • First column: sample IDs.
  • Remaining columns: numeric features.
  • Samples must be rows.
  • Missing or non-numeric feature values are not allowed.

Example:

csv
sample,HIF1A,NR4A1,SOCS1
S1,6.21,-1.34,2.01
S2,6.57,0.37,3.62
S3,7.05,2.12,5.01

Group File

  • CSV or TSV.
  • First column: sample IDs.
  • One additional column must contain both the case and control labels.
  • Exactly two groups are supported.

Example:

csv
sample,group
S1,Case
S2,Case
S3,Control

Output Files

FileFormatDescription
data/rf_result.rdsRDSSerialized model bundle with the trained random forest and metadata
table/rf_feature_importance.csvCSVFull ranked feature-importance table using the selected importance metric
table/rf_top_features.csvCSVFiltered top feature table after applying --rf_imp_threshold and --rf_top_n
plot/rf_error_plot.pdfPDFError curves across trees for OOB and class-specific classification error
plot/rf_importance_plot.pdfPDFVariable-importance plot generated by randomForest::varImpPlot()
session_info.txtTXTR version, platform, and package version information

Error Handling

  • Successful runs exit with status code 0.
  • Failed runs exit with status code 1.
  • Error messages use standardized names such as SKILL_FILE_NOT_FOUND and SKILL_INVALID_PARAMETER.
  • Output paths are validated so that --output_dir cannot write outside the skill root.
  • The analysis never performs network requests and never executes user input through eval(), exec(), or system().

Common codes:

Error CodeMeaning
SKILL_FILE_NOT_FOUNDAn input file or required plot-only artifact does not exist
SKILL_MISSING_COLUMNSThe input file does not contain the required columns
SKILL_EMPTY_DATAAn input file is empty or a required model table is unavailable
SKILL_INVALID_PARAMETERA CLI argument, group setting, numeric constraint, or path is invalid
SKILL_SAMPLE_MISMATCHSample IDs do not match between the expression matrix and group file
SKILL_PACKAGE_NOT_FOUNDOne or more required CRAN packages are missing

For detailed fixes, READ: references/troubleshooting.md

Testing

Help Check

bash
Rscript scripts/main.R --help

Full Test Run

bash
Rscript tests/run_tests.R

Direct Test Command

bash
Rscript scripts/main.R \
  --input_file tests/data/expression_matrix.csv \
  --group_file tests/data/group_info.csv \
  --case_group AR \
  --control_group Control \
  --output_dir tests/output/manual-test \
  --seed 42 \
  --rf_ntree 200 \
  --rf_top_n 5 \
  --rf_importance_top_n 5 \
  --timeout_seconds 300

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Rf Model Importance Analysis?

Use when you need a standardized R CLI workflow to train a two-class random forest model from an expression-like feature matrix, rank variable importance, and generate reproducible error and importance plots. NOT for regression tasks, multi-class classification, missing-value imputation, preprocessing, or remote data fetching.

Warum Rf Model Importance Analysis in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Rf Model Importance Analysis besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Rf Model Importance Analysis in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/aipoch/medical-research-skills/tree/main/awesome-med-research-skills/Data%20Analysis/rf-model-importance-analysis ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Rf Model Importance Analysis nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Rf Model Importance Analysis verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Rf Model Importance Analysis damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Rf Model Importance Analysis kostenlos?

Ja. Der Skill wird von aipoch auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇