Machine Learning-Based Magnetocardiography Model Aids in Diagnosing Non-ST-Segment Elevation Acute Coronary Syndrome in Acute Chest Pain.
2 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 3 matches
- [1] § RESULTS › SVM model explanation ↔ 123.py, lines 150 to 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 · block
oscr:b:Y6K7CKN5C5JB3-N· Report a mismatch - [2] § RESULTS › SVM model explanation ↔ 123.py, lines 150 to 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 · block
oscr:b:Y6K7CKN5C5JB3-N· Report a mismatch - [3] § MATERIALS AND METHODS › MCG parameters extraction ↔ 123.py, lines 75 to 81 · score 0.53 · T_negi_circ, T_posi_circ, T_min_mag, amp, score · block
oscr:b:XEYTA3GHBJFDV-0· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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.3390/bios15100680 [code]
- Automatic Removal of Physiological Artifacts in OPM-MEG: A Framework of Channel Attention Mechanism Based on Magnetic Reference Signal.Journal: BiosensorsIn common: scikit-learn, NumPy, author Xiaolin Ning
- [2] doi:10.3390/bioengineering12020095
- TSF-MDD: A Deep Learning Approach for Electroencephalography-B
ased Diagnosis of Major Depressive Disorder with Temporal-Spatial-Frequen cy Feature Fusion. Journal: Bioengineering (Basel, Switzerland)In common: clinical / translational, author Xiaolin Ning - [3] doi:10.3390/bioengineering11121258
- Cost-Reference Particle Filter-Based Method for Constructing Effective Brain Networks: Application in Optically Pumped Magnetometer Magnetoencephalography.Journal: Bioengineering (Basel, Switzerland)In common: author Min Xiang
- [4] doi:10.1016/j.isci.2022.103752
- Imaging somatosensory cortex responses measured by OPM-MEG: Variational free energy-based spatial smoothing estimation approach.Journal: iScienceIn common: author Min Xiang
- [5] 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
- [6] 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
- [7] doi:10.7717/peerj-cs.1090 [code]
- Towards survival prediction of cancer patients using medical images.Journal: PeerJ. Computer scienceIn common: scikit-learn, pandas, NumPy, clinical / translational, 1 reference
- [8] doi:10.1186/s10194-025-02143-8
- Artificial intelligence in headache medicine: between automation and the doctor-patient relationship. A systematic review.Journal: The journal of headache and painIn common: pain, clinical / translational, 1 reference
- [9] doi:10.3390/bioengineering13050523
- Artificial Intelligence Algorithm Based on Genetics to Predict Responses to Interferon-Beta Treatment in Multiple Sclerosis Patients.Journal: Bioengineering (Basel, Switzerland)In common: clinical / translational, 1 reference
- [10] doi:10.1371/journal.pone.0319519
- Machine learning approach for the prediction of 30-day mortality in patients with sepsis-associated delirium.Journal: PloS oneIn common: clinical / translational, 1 reference
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:fdf76644941bf654…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.4274/balkanmedj.galenos.2026.2026-1-319)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.4274/balkanmedj.galenos.2026.2026-1-319.svg
:target: https://openscicode.org/badge/doi/10.4274/balkanmedj.galenos.2026.2026-1-319
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.4274/balkanmedj.galenos.2026.2026-1-319"><img src="https://openscicode.org/badge/doi/10.4274/balkanmedj.galenos.2026.2026-1-319.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
