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.5-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mtmpltool-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 21.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 28aeca32f6c496ca709f0531e5d35dd7648168c36b6cb163b8e4177b1a88cb76
MD5 4c3bef6d88751e6bb371cf43d3658caa
BLAKE2b-256 18bf7658702bf8a9b1b628c8a4898f2a081506ba6e48a2a5914a919e69c5615d

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