測的革命性模型)
Time-Anchor ModernBERT 32M重新定義時間序列預(yù)測的革命性模型【免費下載鏈接】time-anchor-modernbert-32m項目地址: https://ai.gitcode.com/hf_mirrors/K-Iwa/time-anchor-modernbert-32mTime-Anchor ModernBERT 32M是一款基于32M參數(shù)ModernBERT骨干構(gòu)建的緊湊型時間序列模型加上時間序列輸入/輸出頭總共33.4M參數(shù)。一次調(diào)用即可返回三項核心功能分位數(shù)預(yù)測、變量/時間影響分析和錨定預(yù)測為時間序列預(yù)測領(lǐng)域帶來了革命性的突破。 核心功能亮點 精準(zhǔn)的分位數(shù)預(yù)測提供任意請求分位數(shù)水平的概率預(yù)測讓你對未來數(shù)據(jù)的分布有清晰的認(rèn)識。在東京每小時溫度Open-Meteo檔案64小時的預(yù)測中中位數(shù)MAE為0.57°C且每個實際值都在q10–q90范圍內(nèi)。 深入的變量/時間影響分析展示每個輸入變量在每個時間步的標(biāo)準(zhǔn)化貢獻(xiàn)幫助你理解各因素對預(yù)測結(jié)果的影響程度。通過對東京一周天氣數(shù)據(jù)的分析可以清晰看到每個氣象變量每小時的貢獻(xiàn)情況且對于每個時間索引所有變量的影響總和為1。 靈活的錨定預(yù)測允許你根據(jù)指定的已知未來點進(jìn)行條件預(yù)測。在月度航空乘客Box Jenkins24個月的預(yù)測中固定6個已知月份可將中位數(shù)預(yù)測MAE從46千乘客降至10千乘客極大提高了預(yù)測的準(zhǔn)確性。 簡單快速的安裝步驟只需一行命令即可完成安裝pip install time-anchorpredict_time_anchor接受Hugging Face Hub模型ID或本地 checkpoint 目錄。 輕松上手的使用示例分位數(shù)預(yù)測示例import pandas as pd from time_anchor import predict_time_anchor url ( https://archive-api.open-meteo.com/v1/archive ?latitude35.69longitude139.69start_date2024-10-01end_date2024-12-31 hourlytemperature_2m,relative_humidity_2m,surface_pressure,wind_speed_10mformatcsv ) weather pd.read_csv(url, skiprows3) temperature weather.iloc[:, 1].astype(float32) result predict_time_anchor( K-Iwa/time-anchor-modernbert-32m, target_contexttemperature[:1440], prediction_length64, quantile_levels(0.1, 0.5, 0.9), ) print(pd.DataFrame(result.forecast_rows))變量/時間步影響示例result predict_time_anchor( K-Iwa/time-anchor-modernbert-32m, target_contexttemperature[:168], explanatory_contexts[weather.iloc[:168, i].astype(float32) for i in (2, 3, 4)], gaf{enabled: True, topk_time_steps: 0}, ) print(pd.DataFrame(result.variable_impact_rows))錨定預(yù)測示例url https://raw.githubusercontent.com/jbrownlee/Datasets/master/airline-passengers.csv passengers pd.read_csv(url)[Passengers].astype(float32) result predict_time_anchor( K-Iwa/time-anchor-modernbert-32m, target_contextpassengers[:-24], prediction_length24, anchor{ mode: observed, positions: [4, 8, 12, 16, 20, 24], values: [396, 559, 405, 461, 606, 432], }, ) print(pd.DataFrame(result.forecast_rows))? 強(qiáng)大的命令行工具除了Python API還提供了便捷的命令行工具time-anchor-infer --checkpoint K-Iwa/time-anchor-modernbert-32m \ --input data.csv --target-column Target \ --exogenous-columns Feature1,Feature2,Feature3該命令會生成output/forecast.csv、output/variable_impact.csv和output/result.json文件。添加--no-impact可僅進(jìn)行預(yù)測或使用--anchor-mode observed --anchor-positions 12,24 --anchor-values 0.2,0.4進(jìn)行錨定預(yù)測。 模型詳細(xì)信息項目詳情骨干網(wǎng)絡(luò)ModernBERT編碼器10層隱藏層3846個頭部參數(shù)數(shù)量總計33.4M 31.9M ModernBERT骨干名稱中的32M 1.5M時間序列頭float32safetensors最大上下文長度3,463步預(yù)測 horizon64步訓(xùn)練分位數(shù)0.1 – 0.9九個級別歸因方法Generalized Attention Flow (GAF) 通過障礙法最大流錨定模式observed,auto,forward,inverted,sparse,hierarchical,hybrid 相關(guān)參考Ansari et al. Chronos: Learning the Language of Time Series. TMLR 2024 (OpenReview) — 為預(yù)測/ tokenization 設(shè)計提供參考。Azarkhalili and Libbrecht. Generalized Attention Flow: Feature Attribution for Transformer Models via Maximum Flow. 2025 — 變量/時間影響方法GAF。 許可證本項目采用 Apache-2.0 許可證。圖表使用來自 Open-MeteoCC BY 4.0的歷史天氣數(shù)據(jù)和經(jīng)典的航空乘客數(shù)據(jù)集Box Jenkins, 1976。要開始使用這個強(qiáng)大的時間序列預(yù)測模型請克隆倉庫git clone https://gitcode.com/hf_mirrors/K-Iwa/time-anchor-modernbert-32m【免費下載鏈接】time-anchor-modernbert-32m項目地址: https://ai.gitcode.com/hf_mirrors/K-Iwa/time-anchor-modernbert-32m創(chuàng)作聲明:本文部分內(nèi)容由AI輔助生成(AIGC),僅供參考