跳到正文
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.

中文简介正在准备中。当前显示原文说明。

集成工具AWS

实测评分 未实测

查看安装方法

包含的文件(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(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19772026年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-skills19772026年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-skills19772026年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-skills19772026年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-skills19772026年9月17日 更新

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

中文简介正在准备中。当前显示原文说明。

aipoch/medical-research-skills19772026年9月17日 更新

查看 aipoch 的全部技能

报告此技能的问题