Machine Learning-Based Magnetocardiography Model Aids in Diagnosing Non-ST-Segment Elevation Acute Coronary Syndrome in Acute Chest Pain.
The 3 matches
- [1] § RESULTS › SVM model explanation ↔ 123.py, lines 150–256 · score 0.86 · cha_31_ST_score, cha_12_T_amp, cha_14_T_amp, cha_25_T_amp, cha_31_T_amp, cha_6_T_amp
- [2] § RESULTS › SVM model explanation ↔ 123.py, lines 150–256 · score 0.84 · cha_12_T_amp, cha_14_T_amp, cha_25_T_amp, cha_31_T_amp, cha_6_T_amp, T_negi_circ
- [3] § MATERIALS AND METHODS › MCG parameters extraction ↔ 123.py, lines 75–81 · score 0.53 · T_negi_circ, T_posi_circ, T_min_mag, amp, score
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 261 lines · 8.9 KB · no license · 3 matches
- import streamlit as st
- import numpy as np
- import pandas as pd
- import joblib
- from sklearn.preprocessing import StandardScaler
- import warnings
- warnings.filterwarnings('ignore')
- # ==================== 页面基础配置(匹配示例界面) ====================
- st.set_page_config(
- page_title="SVM Clinical Predictive Calculator for NSTE-ACS",
- page_icon="🧮",
- layout="centered", # 紧凑布局,与示例一致
- initial_sidebar_state="collapsed" # 隐藏侧边栏
- )
- # ==================== 样式配置(完全匹配示例界面风格) ====================
- st.markdown("""
- <style>
- /* 全局样式 */
- body {
- font-family: 'Arial', sans-serif;
- color: #333333;
- background-color: #f8f9fa;
- }
- /* 主标题 */
- .main-title {
- font-size: 28px;
- font-weight: bold;
- color: #333333;
- margin-bottom: 15px;
- text-align: left;
- }
- /* 子标题 */
- .sub-title {
- font-size: 18px;
- font-weight: 600;
- color: #333333;
- margin-top: 25px;
- margin-bottom: 20px;
- }
- /* 输入框标签 */
- div[data-testid="stNumberInput"] label {
- font-size: 13px;
- color: #555555;
- font-weight: 500;
- }
- /* 按钮样式(匹配示例的蓝色按钮) */
- .stButton>button {
- background-color: #0066cc;
- color: white;
- border-radius: 4px;
- padding: 8px 24px;
- font-size: 14px;
- border: none;
- margin-top: 10px;
- }
- .stButton>button:hover {
- background-color: #0052a3;
- }
- /* 结果指标样式 */
- div[data-testid="stMetricValue"] {
- font-size: 24px;
- font-weight: bold;
- color: #0066cc;
- }
- div[data-testid="stMetricLabel"] {
- font-size: 14px;
- color: #666666;
- }
- </style>
- """, unsafe_allow_html=True)
- # ==================== 核心参数定义(你的9个特征) ====================
- # 特征列表(固定9个)
- FEATURES = [
- "T_min_mag", "cha_31_T_amp", "cha_12_T_amp",
- "cha_25_T_amp", "cha_6_T_amp", "cha_14_T_amp",
- "cha_31_ST_score", "T_posi_circ", "T_negi_circ"
- ]
- # 特征显示名称(与你的变量名一致)
- FEATURE_DISPLAY = {
- "T_min_mag": "T_min_mag",
- "cha_31_T_amp": "cha_31_T_amp",
- "cha_12_T_amp": "cha_12_T_amp",
- "cha_25_T_amp": "cha_25_T_amp",
- "cha_6_T_amp": "cha_6_T_amp",
- "cha_14_T_amp": "cha_14_T_amp",
- "cha_31_ST_score": "cha_31_ST_score",
- "T_posi_circ": "T_posi_circ",
- "T_negi_circ": "T_negi_circ"
- }
- # 特征参考范围(可根据你的论文数据调整)
- FEATURE_RANGES = {
- "T_min_mag": (-5.0, 5.0),
- "cha_31_T_amp": (0.0, 10.0),
- "cha_12_T_amp": (0.0, 10.0),
- "cha_25_T_amp": (0.0, 10.0),
- "cha_6_T_amp": (0.0, 10.0),
- "cha_14_T_amp": (0.0, 10.0),
- "cha_31_ST_score": (0.0, 5.0),
- "T_posi_circ": (0.0, 20.0),
- "T_negi_circ": (-20.0, 0.0)
- }
- # ==================== 加载模型和标准化器 ====================
- @st.cache_resource
- def load_model_and_scaler():
- """加载预训练SVM模型和标准化器"""
- try:
- # 加载你的SVM模型
- model = joblib.load("./final_SVM_model.pkl")
- # 加载训练时保存的标准化器(必须替换为你自己的scaler.pkl)
- # 如果还没保存scaler,先运行训练代码保存,再取消下面注释
- scaler = joblib.load("./final_scaler.pkl")
- # 临时方案:若未保存scaler,用示例值(需替换为训练集真实均值/标准差)
- scaler = StandardScaler()
- # 请替换为你训练集的真实均值(示例值,仅临时用)
- scaler.mean_ = np.array([0.1, 2.3, 1.8, 2.1, 1.5, 1.7, 0.9, 8.5, -7.2])
- # 请替换为你训练集的真实标准差(示例值,仅临时用)
- scaler.scale_ = np.array([0.7, 1.1, 1.0, 1.2, 0.8, 0.9, 0.4, 3.2, 2.8])
- return model, scaler
- except FileNotFoundError:
- st.error("❌ 模型文件未找到,请检查路径:D:\\AApython\\final_SVM_model.pkl")
- st.stop()
- except Exception as e:
- st.error(f"❌ 模型加载失败:{str(e)}")
- st.stop()
- # ==================== 预测函数 ====================
- def predict_probability(model, scaler, feature_values):
- """基于9个特征预测概率(适配SVM模型)"""
- # 标准化输入特征
- features_array = np.array(feature_values).reshape(1, -1)
- features_scaled = scaler.transform(features_array)
- # SVM预测概率(确保训练时设置了probability=True)
- prob = model.predict_proba(features_scaled)[0, 1]
- return prob
- # ==================== 主页面构建(完全匹配附图界面) ====================
- def main():
- # 加载模型和标准化器
- model, scaler = load_model_and_scaler()
- # 页面标题(与示例一致的风格)
- st.markdown('<div class="main-title">SVM Clinical Predictive Calculator for NSTE-ACS</div>', unsafe_allow_html=True)
- st.divider()
- # 输入变量标题
- st.markdown('<div class="sub-title">Input Variables</div>', unsafe_allow_html=True)
- # 3列布局(9个特征均分,与附图一致)
- col1, col2, col3 = st.columns(3, gap="medium")
- feature_values = []
- # 第一列:3个特征
- with col1:
- for feat in FEATURES[0:3]: # T_min_mag, cha_31_T_amp, cha_12_T_amp
- min_val, max_val = FEATURE_RANGES[feat]
- val = st.number_input(
- label=FEATURE_DISPLAY[feat],
- min_value=float(min_val),
- max_value=float(max_val),
- value=float((min_val + max_val) / 2), # 默认值为范围中间值
- step=0.1,
- key=f"feat_{feat}",
- help=f"Reference range: {min_val} to {max_val}" # 帮助提示(❓图标)
- )
- feature_values.append(val)
- # 第二列:3个特征
- with col2:
- for feat in FEATURES[3:6]: # cha_25_T_amp, cha_6_T_amp, cha_14_T_amp
- min_val, max_val = FEATURE_RANGES[feat]
- val = st.number_input(
- label=FEATURE_DISPLAY[feat],
- min_value=float(min_val),
- max_value=float(max_val),
- value=float((min_val + max_val) / 2),
- step=0.1,
- key=f"feat_{feat}",
- help=f"Reference range: {min_val} to {max_val}"
- )
- feature_values.append(val)
- # 第三列:3个特征
- with col3:
- for feat in FEATURES[6:9]: # cha_31_ST_score, T_posi_circ, T_negi_circ
- min_val, max_val = FEATURE_RANGES[feat]
- val = st.number_input(
- label=FEATURE_DISPLAY[feat],
- min_value=float(min_val),
- max_value=float(max_val),
- value=float((min_val + max_val) / 2),
- step=0.1,
- key=f"feat_{feat}",
- help=f"Reference range: {min_val} to {max_val}"
- )
- feature_values.append(val)
- # 预测按钮(与示例一致的位置和样式)
- predict_btn = st.button("Calculate Prediction", type="primary")
- # 预测结果展示(匹配示例的结果样式)
- if predict_btn:
- st.markdown("<br>", unsafe_allow_html=True)
- st.divider()
- st.markdown('<div class="sub-title">Prediction Result</div>', unsafe_allow_html=True)
- # 计算预测概率
- prob = predict_probability(model, scaler, feature_values)
- # 显示核心概率结果
- st.metric(
- label="Predicted Probability",
- value=f"{prob:.3f} ({prob * 100:.1f}%)"
- )
- # 风险等级提示
- if prob >= 0.5:
- st.warning(f"⚠️ High Risk - Probability: {prob * 100:.1f}%")
- else:
- st.success(f"✅ Low Risk - Probability: {prob * 100:.1f}%")
- # 下载功能(与示例一致)
- st.markdown("<br>", unsafe_allow_html=True)
- if st.button("Download Input & Result (CSV)"):
- # 生成包含输入和结果的CSV
- input_df = pd.DataFrame({
- "Feature": FEATURES,
- "Input_Value": feature_values
- })
- # 如果已预测,添加结果列
- if predict_btn:
- input_df.loc[len(input_df)] = ["Predicted_Probability", f"{prob:.3f}"]
- input_df.loc[len(input_df)] = ["Risk_Level", "High" if prob >= 0.5 else "Low"]
- # 生成CSV文件
- csv_data = input_df.to_csv(index=False, encoding="utf-8")
- st.download_button(
- label="Confirm Download",
- data=csv_data,
- file_name="svm_calculator_result.csv",
- mime="text/csv",
- key="download_btn"
- )
- # ==================== 执行主函数 ====================
- if __name__ == "__main__":
- main()
123.py at commit 0cb6906, no license · at the source
Overview
- Beihang University School of Instrumentation and Optoelectronic Engineering, Beijing, China
- Key Laboratory of Ultra-Weak Magnetic Field Measurement Technology, Ministry of Education, Beihang University School of Instrumentation and Optoelectronic Engineering, Beijing, China
- National Innovation Platform for Industry-Education Integration in Medicine-Engineering Interdisciplinary, Shandong Key Laboratory for Magnetic Field-free Medicine and Functional Imaging, Research Institute of Shandong University, Jinan, China
- Department of Emergency Medicine, Shandong Provincial Clinical Research Center for Emergency and Critical Care Medicine, Qilu Hospital of Shandong University, Jinan, China
- State Key Laboratory of Traditional Chinese Medicine Syndrome, National Institute of Extremely-weak Magnetic Field Infrastructure, Hangzhou, China
- Zhejiang Provincial Key Laboratory of Ultra-Weak Magnetic-Field Space and Applied Technology, Hangzhou, China
- Zhejiang Key Laboratory of Zero Magnetic Medicine, Hangzhou, China
- Hefei National Laboratory, Hefei, China
- Hangzhou Lingci Medical Equipment Co. Ltd, Hangzhou, China
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.
svm-clinical-calculator-p97ioydfedimtbpfsjdqfp.streamlit.app
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
ljting658/svm-clinical-calculator
0cb69069696932048f1f39a7148f87d1d7be500d, 17 February 2026Availability: 1 check, the latest on 30 September 2026: the link answers
- 30 September 2026: the link answers
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 12 MeSH terms, 3 funders, 27 references.
Cite
This paper
Li, J., Zhou, Y., Wang, R., Pang, J., Xiang, M., & Ning, X. (2026). Machine Learning-Based Magnetocardiography Model Aids in Diagnosing Non-ST-Segment Elevation Acute Coronary Syndrome in Acute Chest Pain. Balkan medical journal, 43(8), 460-470. https://
BibTeX
@article{li2026machine,
author = {Li, Junting and Zhou, Yuheng and Wang, Ruizhe and Pang, Jiaojiao and Xiang, Min and Ning, Xiaolin},
title = {{Machine Learning-Based Magnetocardiography Model Aids in Diagnosing Non-ST-Segment Elevation Acute Coronary Syndrome in Acute Chest Pain}},
journal = {Balkan medical journal},
year = {2026},
month = apr,
volume = {43},
number = {8},
pages = {460--470},
publisher = {Trakya University Faculty of Medicine},
issn = {2146-3123},
doi = {10.4274/
url = {https://
pmid = {42026911},
pmcid = {PMC13425047}
}
RIS
TY - JOUR
AU - Li, Junting
AU - Zhou, Yuheng
AU - Wang, Ruizhe
AU - Pang, Jiaojiao
AU - Xiang, Min
AU - Ning, Xiaolin
TI - Machine Learning-Based Magnetocardiography Model Aids in Diagnosing Non-ST-Segment Elevation Acute Coronary Syndrome in Acute Chest Pain
T2 - Balkan medical journal
J2 - Balkan Med J
PY - 2026
DA - 2026/
VL - 43
IS - 8
SP - 460
EP - 470
SN - 2146-3123
PB - Trakya University Faculty of Medicine
DO - 10.4274/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.4274/
"type": "article-journal",
"title": "Machine Learning-Based Magnetocardiography Model Aids in Diagnosing Non-ST-Segment Elevation Acute Coronary Syndrome in Acute Chest Pain",
"container-title": "Balkan medical journal",
"author": [
{
"family": "Li",
"given": "Junting"
},
{
"family": "Zhou",
"given": "Yuheng"
},
{
"family": "Wang",
"given": "Ruizhe"
},
{
"family": "Pang",
"given": "Jiaojiao"
},
{
"family": "Xiang",
"given": "Min"
},
{
"family": "Ning",
"given": "Xiaolin"
}
],
"container-title-short":
"volume": "43",
"issue": "8",
"page": "460-470",
"DOI": "10.4274/
"PMID": "42026911",
"PMCID": "PMC13425047",
"ISSN": "2146-3123",
"publisher": "Trakya University Faculty of Medicine",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
24
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.isci.2026.115330
- Passive OPM-MEG paradigm reveals altered brain network organization in children with DLD.Journal: iScienceIn common: author Xiaolin Ning
- [2] doi:10.3390/biology15131028
- Temporal Response Function-Driven Representational Similarity Analysis for Speech Perception Decoding with MEG and EEG.Journal: BiologyIn common: author Xiaolin Ning
- [3] doi:10.1038/s41746-026-02778-0 [code]
- Trust-gated synthetic EEG augmentation reduces performance drops when generalizing to new patients.Journal: NPJ digital medicineIn common: scikit-learn, pandas, NumPy, pain, clinical / translational
- [4] doi:10.1371/journal.pone.0354510 [code]
- Personalized adaptive virtual reality experience driven by electroencephalography-b
ased pain recognition. Journal: PloS oneIn common: scikit-learn, pandas, NumPy, pain - [5] doi:10.3390/bioengineering13080924 [code]
- Deep Learning-Based Temporal Gait Analysis Using a Smartphone IMU in Older Adults with and Without Non-Specific Low Back Pain.Journal: Bioengineering (Basel, Switzerland)In common: scikit-learn, pandas, NumPy, pain
- [6] doi:10.1038/s41467-026-75723-0 [code]
- Spatial transcriptomics reveals distinct cell type dynamics following opioid dependence in female mice with the common human μ-opioid receptor variant Oprm1 A118G.Journal: Nature communicationsIn common: scikit-learn, pandas, NumPy, pain
- [7] doi:10.1038/s41467-026-74743-0 [code]
- Meta-analytic evidence for distinct neural correlates of conditioned versus verbally induced placebo analgesia.Journal: Nature communicationsIn common: scikit-learn, pandas, NumPy, pain
- [8] doi:10.1016/j.xcrm.2026.102793 [code]
- A predictive corticospinal model for pain perception.Journal: Cell reports. MedicineIn common: scikit-learn, pandas, NumPy, pain
- [9] doi:10.1038/s41467-026-73153-6 [code]
- Latent neural architecture organising shared aesthetic evaluations of visual artworks.Journal: Nature communicationsIn common: scikit-learn, pandas, NumPy, pain
- [10] doi:10.1016/j.xcrm.2026.102800 [code]
- Recombinant dimeric PICK1 peptide inhibitors for long-term relief of chronic pain by AAV therapeutics.Journal: Cell reports. MedicineIn common: scikit-learn, pandas, NumPy, pain
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 1 script, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:38355058cb47f4fd…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
