import{_ as s,c as i,o as l,ag as t}from"./chunks/framework.B90TcSfW.js";const c=JSON.parse('{"title":"Spectral-Hub","description":"","frontmatter":{},"headers":[],"relativePath":"zh/index.md","filePath":"zh/index.md","lastUpdated":1751289591000}'),e={name:"zh/index.md"};function n(h,a,p,r,d,k){return l(),i("div",null,a[0]||(a[0]=[t(`<h1 id="spectral-hub" tabindex="-1">Spectral-Hub <a class="header-anchor" href="#spectral-hub" aria-label="Permalink to &quot;Spectral-Hub&quot;">​</a></h1><p>化学谱学大模型基准测试工具</p><h2 id="什么是-spectral-hub" tabindex="-1">什么是 Spectral-Hub？ <a class="header-anchor" href="#什么是-spectral-hub" aria-label="Permalink to &quot;什么是 Spectral-Hub？&quot;">​</a></h2><p>Spectral-Hub 是一个专为化学光谱学基准测试和模型评估而设计的综合工具包。</p><h2 id="主要特性" tabindex="-1">主要特性 <a class="header-anchor" href="#主要特性" aria-label="Permalink to &quot;主要特性&quot;">​</a></h2><ul><li>🔬 <strong>多种光谱类型</strong>: 支持红外、拉曼、核磁共振光谱</li><li>🤖 <strong>预训练模型</strong>: 针对各种光谱分析任务的即用型模型</li><li>📊 <strong>基准测试套件</strong>: 标准化的评估指标和数据集</li><li>🚀 <strong>易于使用</strong>: 简单的 API，便于快速集成</li></ul><h2 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to &quot;快速开始&quot;">​</a></h2><div class="language-python vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">python</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> spectral_hub </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">as</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sh</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 加载数据集</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">data </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sh.load_dataset(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;ir_spectra&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 创建并训练模型</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">model </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> sh.SpectralModel()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">model.train(data)</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 评估性能</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">results </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> model.evaluate()</span></span></code></pre></div><h2 id="开始使用" tabindex="-1">开始使用 <a class="header-anchor" href="#开始使用" aria-label="Permalink to &quot;开始使用&quot;">​</a></h2><ul><li><a href="/spectral-hub/zh/tutorial">教程</a> - 学习如何使用 Spectral-Hub</li><li><a href="/spectral-hub/zh/api">API 参考</a> - 详细的 API 文档</li><li><a href="/spectral-hub/zh/benchmark">基准测试</a> - 查看基准结果和指标</li></ul>`,10)]))}const E=s(e,[["render",n]]);export{c as __pageData,E as default};
