Skip to main content

Description

Project description

MTMPLTool

一个基于 PyTorch Lightning 的机器学习模型训练和评估工具包。

简介

MTMPLTool 提供了一系列用于 PyTorch Lightning 机器学习项目的实用工具,包括:

  • 自定义模型评估指标
  • 基于 R2C(回归到分类)转换的专用损失函数
  • 数据转换工具
  • 学习率调度器

功能特性

评估指标

  • ExpectedLevelofError:使用绝对误差和相对误差阈值评估预测结果
  • 与 PyTorch Lightning 兼容的自定义指标

损失函数

  • BaseR2CLoss:R2C 转换损失函数的基类
  • RegressionR2CLoss:带 R2C 转换的回归损失函数
  • ClassificationR2CLoss:支持可选类别权重的交叉熵损失函数
  • AttentionPoolingR2CLoss:带温度缩放的注意力池化损失函数

数据转换

  • ScalarToOnehot:将连续标量值转换为独热编码
  • Random_0_or_1:用于随机值替换的数据增强工具

学习率调度器

  • LinearLRWarmupAndCosineAnnealingWarmRestarts:结合线性预热和余弦退火重启的学习率调度器

安装

pip install mtmpltool

环境要求

  • Python >= 3.8
  • PyTorch
  • PyTorch Lightning
  • pytorch-forecasting

开源协议

MIT 协议 - 详见 LICENSE 文件

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mtmpltool-0.0.3-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file mtmpltool-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mtmpltool-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mtmpltool-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c4314a96bced7feb7d3f6a9fa08c036696f760974c79c225d5b15bb9f416efc
MD5 704e5cf374374673a9f79aed58670f6f
BLAKE2b-256 e5599d193774de4fe8fbd96d2cc7ef92d0d28d15ff2879f7ad572e541adf0c8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page