spacecutter:PyTorch中的序数回归模型

时间:2021-05-05 10:38:41
【文件属性】:
文件名称:spacecutter:PyTorch中的序数回归模型
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-05 10:38:41
deep-learning pytorch ordinal-regression Python 太空切割机 spacecutter是一个用于在PyTorch中实现序数回归模型的库。 该库由模型和损失函数组成。 建议使用打包模型以使其与scikit-learn兼容。 安装 pip install spacecutter 用法 楷模 定义要生成单个标量预测值的任何PyTorch模型。 这将是我们的predictor模型。 然后,可以使用spacecutter.models.OrdinalLogisticModel封装该模型,该模型会将predictor的输出从单个数字转换为序数类概率的数组。 以下示例显示了针对具有三个序数类的问题的两层神经网络predictor如何执行此操作。 import numpy as np import torch from torch import nn from spacecutter . models import OrdinalLogisticMode
【文件预览】:
spacecutter-master
----MANIFEST.in(6B)
----test-requirements.txt(32B)
----.github()
--------workflows()
----requirements.txt(18B)
----LICENSE(1KB)
----setup.py(1KB)
----README.md(2KB)
----spacecutter()
--------callbacks.py(1KB)
--------__init__.py(22B)
--------models.py(3KB)
--------losses.py(3KB)
----tests()
--------__init__.py(0B)
--------test_models.py(1KB)
--------test_callbacks.py(1KB)
--------test_losses.py(2KB)
----.gitignore(67B)

网友评论