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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mtmpltool-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 18.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9c8561fbf2693747f21517d2da52b33eec29ce9d91b60b699c7315ef7c632e0c
MD5 40bfe3f1f48f49ec48ee870ba239ea9f
BLAKE2b-256 a1ff1e2bdda0cd79b446c49644eb6331f97213ae9c5da0f5dbcae172f980ec31

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