跳转到主要内容

模糊粗糙机器学习算法和数据描述符库。

项目描述

Travis AppVeyor Codecov CircleCI ReadTheDocs

fuzzy-rough-learn

fuzzy-rough-learn是一个包含模糊粗糙集机器学习算法以及可用于单类分类/新颖性检测的数据描述符的库。它基于scikit-learn,但使用略有不同的api,以下是一个具体的例子来展示

from sklearn import datasets
from sklearn.metrics import accuracy_score, roc_auc_score
from sklearn.model_selection import train_test_split

from frlearn.base import probabilities_from_scores, select_class
from frlearn.classifiers import FRNN
from frlearn.feature_preprocessors import RangeNormaliser

# Import example data.
iris = datasets.load_iris()
X = iris.data
y = iris.target

# Split into train and test sets.
X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=0)

# Create an instance of the FRNN classifier, construct the model, and query on the test set.
clf = FRNN(preprocessors=(RangeNormaliser(), ))
model = clf(X_train, y_train)
scores = model(X_test)

# Convert scores to probabilities and calculate the AUROC.
probabilities = probabilities_from_scores(scores)
auroc = roc_auc_score(y_test, probabilities, multi_class='ovo')
print('AUROC:', auroc)

# Select classes with the highest scores and calculate the accuracy.
classes = select_class(scores)
accuracy = accuracy_score(y_test, classes)
print('accuracy:', accuracy)

分类器和特征预处理程序都是接受训练数据并输出模型的函数。模型是接受数据并输出其他内容的函数。分类器模型输出类分数,预处理程序模型输出数据的转换。可以在初始化分类器时添加预处理程序作为关键字参数,这将自动根据训练数据创建预处理程序模型并将其应用于训练数据和测试数据。

内容

目前,fuzzy-rough-learn包含以下算法

多类分类器

  • 模糊粗糙最近邻(FRNN;多类)

  • 模糊粗糙OVO组合(FROVOCO;多类,适用于不平衡数据)

  • 模糊粗糙邻域共识(FRONEC;多标签)

数据描述符

  • 平均局部邻近度(ALP)

  • 中心距离(CD)

  • 扩展隔离森林(EIF)

  • 隔离森林(IF)

  • 局部异常因子(LOF)

  • 局部最近邻距离(LNND)

  • 马氏距离(MD)

  • 最近邻距离(NND)

  • 支持向量机(SVM)

回归器

  • 模糊粗糙最近邻(FRNN)

特征预处理程序

  • 模糊粗糙特征选择(FRFS)

  • 线性规范化器;特别是

    • 四分位数范围(IQR)规范化器

    • 最大绝对值(MaxAbs)归一化器

    • 范围归一化器

    • 标准化器

  • 收缩自动编码器(SAE;无监督学习)

  • 向量大小归一化器

实例预处理器

  • 模糊粗糙原型选择(FRPS)

其他

  • 数组函数

  • 散度度量

  • 位置度量

  • 最近邻搜索方法

  • 参数化

  • t_norms

  • 变换

  • 向量大小度量

  • 权重

文档

文档位于此处:链接

依赖关系

fuzzy-rough-learn需要Python 3.7+和以下包

  • scipy >= 1.1.0

  • numpy >=1.17.0

  • scikit-learn >=0.24.0

此外,一些算法需要可选依赖项

  • eif >= 2.0.0(EIF)

  • tensorflow >= 2.2.0(SAE)

引用fuzzy-rough-learn

如果您在科学出版物中使用或引用fuzzy-rough-learn,请引用此论文

Lenz OU, Peralta D, Cornelis C (2020).
fuzzy-rough-learn 0.1: a Python library for machine learning with fuzzy rough sets.
IJCRS 2020: Proceedings of the International Joint Conference on Rough Sets, pp 491–499.
Lecture Notes in Artificial Intelligence, vol 12179, Springer.
doi: 10.1007/978-3-030-52705-1_36

Bibtex条目

@inproceedings{lenz20fuzzyroughlearn,
  title={{f}uzzy-rough-learn 0.1: a {P}ython library for machine learning with fuzzy rough sets},
  author={Lenz, Oliver Urs and Peralta, Daniel and Cornelis, Chris},
  booktitle={{IJCRS} 2020: Proceedings of the International Joint Conference on Rough Sets},
  pages={491--499},
  year={2020},
  series={Lecture Notes in Artificial Intelligence},
  volume={12179},
  publisher={Springer}
}

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分发

fuzzy-rough-learn-0.2.2.tar.gz (12.0 MB 查看哈希值

上传时间:

构建分发

fuzzy_rough_learn-0.2.2-py3-none-any.whl (58.2 kB 查看哈希值

上传时间: Python 3

支持