本文へ移動
cccskills
無料GitHub で公開

svm-model-importance-analysis

Use when you need a standardized R CLI workflow to run two-class SVM-RFE feature ranking on an expression-like matrix, choose an informative feature count from cross-validated error, and generate reproducible ranking and error plots. NOT for regression, multi-class classification, missing-value imputation, or remote data fetching.

インストール方法を見る

含まれるファイル(22)

  • SKILL.md7.1 KB
  • eval_report_svm-model-importance-analysis_result.json15.3 KB
  • references/algorithm.md3.3 KB
  • references/cli-guide.md6.1 KB
  • references/troubleshooting.md2.8 KB
  • scripts/cli_options.R179 B
  • scripts/core_option_groups.R2.5 KB
  • scripts/functions.R3.2 KB
  • scripts/io.R4.4 KB
  • scripts/main.R1.9 KB
  • scripts/option_validation.R2.1 KB
  • scripts/path_utils.R2.4 KB
  • scripts/plot_option_groups.R2.6 KB
  • scripts/recording.R182 B
  • scripts/run_analysis.R3.6 KB
  • scripts/svm_helpers.R2.9 KB
  • scripts/utils.R1.0 KB
  • scripts/validation_utils.R658 B
  • scripts/visualization.R1.9 KB
  • tests/data/expression_matrix.csv9.1 KB
  • tests/data/group_info.csv648 B
  • tests/run_tests.R347 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

SVM Model Importance Analysis

When to Read External Files

SituationFile to ReadPurpose
Need algorithm detailsreferences/algorithm.mdExplain SVM-RFE ranking, cross-validation logic, assumptions, and interpretation
Need to execute the analysisscripts/main.RRun the CLI entry point with a complete Rscript command
Encounter an errorreferences/troubleshooting.mdMap standardized error codes to causes and fixes
Need CLI examplesreferences/cli-guide.mdReview installation steps and runnable CLI examples
Need a runnable smoke testtests/data/Use the bundled small dataset for verification

Usage

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/svm_result.rds and regenerate plots without rerunning SVM-RFE
-s--seedinteger42noRandom seed for reproducibility
-t--timeout_secondsinteger600noElapsed time limit for the run
--svm_kinteger10noNumber of stratified outer folds used for SVM-RFE and validation
--svm_halve_aboveinteger50noIf surviving features exceed this count, remove half per iteration
--svm_max_features_capinteger30noMaximum feature count evaluated on the error curve
--svm_select_rulecharacterminnoFeature-count rule: min or tolerance
--svm_tolnumeric0.01noTolerance used when --svm_select_rule tolerance is selected
--svm_error_heightnumeric5noSVM error plot height in inches
--svm_error_widthnumeric6noSVM error plot width in inches
--svm_error_xlabcharacterNumber of FeaturesnoX-axis label for the SVM error plot
--svm_error_ylabcharacterClassification Error RatenoY-axis label for the SVM error plot
--svm_error_main_line_colorcharacterblacknoMain line color for the SVM error plot
--svm_error_second_line_colorcharacter#2BA2DEnoBaseline line color for the SVM error plot
--svm_error_best_point_colorcharacterrednoHighlight color for the best feature-count point
--svm_error_noinfo_ltyinteger3noLine type for the no-information baseline
--svm_error_label_cexnumeric0.75noLabel size for the best-point annotation
--svm_error_label_posinteger4noLabel position for the best-point annotation
--svm_rank_top_ninteger20noMaximum number of ranked features shown in the ranking plot
--svm_rank_widthnumeric7noRanking plot width in inches
--svm_rank_heightnumeric6noRanking plot height in inches
--svm_rank_colorcharacter#2BA2DEnoBar color for the ranking plot
--svm_rank_titlecharacterSVM-RFE Feature RankingnoTitle for the ranking plot

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:

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:

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

Output Files

FileFormatDescription
data/svm_result.rdsRDSSerialized SVM-RFE bundle with ranking results and metadata
table/svm_rfe_features.csvCSVSelected ranked features using the chosen feature-count rule
table/svm_rfe_full_ranking.csvCSVFull ranking table across all input features
plot/svm_rfe_error_plot.pdfPDFCross-validated classification error across feature counts
plot/svm_rfe_ranking_plot.pdfPDFBar plot of the highest-ranked SVM-RFE features
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 ranking 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

Rscript scripts/main.R --help

Full Test Run

Rscript tests/run_tests.R

Direct Test Command

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 \
  --svm_k 4 \
  --svm_max_features_cap 6 \
  --svm_rank_top_n 6 \
  --timeout_seconds 300

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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

日本語の概要は準備中です。原文の説明を表示しています。

aipoch/medical-research-skills1,9482026年9月17日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

aipoch/medical-research-skills1,9482026年9月17日 更新

Refines long medical academic texts into SCI-style unstructured Chinese and English abstracts; use when you need to condense drafts/reports/summaries into bilingual abstracts and generate Summary_Report.md.

日本語の概要は準備中です。原文の説明を表示しています。

aipoch/medical-research-skills1,9482026年9月17日 更新

Generates submission-ready Elsevier/SCI Highlights from manuscript text or extracted PDF/DOCX/TXT content. Use when a user needs 3-5 concise, evidence-grounded highlight bullets for a research paper, review, meta-analysis, case report, or bioinformatics manuscript.

日本語の概要は準備中です。原文の説明を表示しています。

aipoch/medical-research-skills1,9482026年9月17日 更新

Generates complete FAERS pharmacovigilance study designs for multi-drug or class-level safety comparison inside one predefined SOC or AE family using active comparators, disproportionality analysis, subgroup characterization, and reviewer-facing evidence control.

日本語の概要は準備中です。原文の説明を表示しています。

aipoch/medical-research-skills1,9482026年9月17日 更新

Analyze data with `adme-property-predictor` using a reproducible workflow, explicit validation, and structured outputs for review-ready interpretation.

日本語の概要は準備中です。原文の説明を表示しています。

aipoch/medical-research-skills1,9482026年9月17日 更新

aipoch のスキルをすべて見る

このスキルの問題を報告する