探索Mamdani模糊推理算法的多维度进展

需积分: 20 28 下载量 55 浏览量 更新于2024-09-09 1 收藏 190KB PDF 举报
本文主要探讨了Fuzzy推理中的Mamdani算法,该算法由郑亚林、黄德隆和郭健三位作者在2001年的《宝鸡文理学院学报(自然科学版)》第21卷第3期发表。Mamdani算法是模糊逻辑系统中的一种关键推理技术,它在处理不确定性和模糊信息时具有重要作用。本文涵盖了以下几个方面的内容: 1. **简单Fuzzy推理的Mamdani算法**:首先,作者介绍了基础的Mamdani算法,这是在模糊逻辑系统中最基本的应用形式,通过将模糊输入转换成模糊集,并结合模糊规则库,得出模糊输出。 2. **多维Fuzzy推理的Mamdani算法**:随着系统的复杂性增加,文章讨论了如何扩展到多维情况,即多个输入变量和相应的模糊集合。这种扩展有助于处理更为复杂的决策问题,例如在多个因素影响下的决策分析。 3. **多重Fuzzy推理的Mamdani算法**:此部分涉及的是具有多个输出的Mamdani算法,每个输出对应一组模糊规则,可以用来做出关于不同输出变量的综合判断。 4. **多维多重Fuzzy推理的Mamdani算法**:最后,作者还探讨了多维度和多重输出的结合,即在一个系统中同时考虑多个输入维度并对多个输出变量进行推理。这种算法特别适合于需要综合多个维度信息并得出全面结论的场景。 关键词: - **Fuzzy推理**: 模糊逻辑的基础理论,用于处理不确定性,通过模糊集来表达不精确的数据。 - **Mamdani算法**: 一种流行的模糊推理方法,利用模糊集合和模糊规则进行推理。 - **Zadeh法**: Fuzzy逻辑的创建者Zadeh提出的基本模糊集合和模糊运算方法。 - **Tsukamoto法**: 另一种处理模糊逻辑的策略,与Mamdani算法并行存在。 - **Sugeno-Takagi**: 与Mamdani不同的模糊推理方法,基于模糊集的平均值或加权和。 - **FITA** 和 **FATI**: 这可能是Fuzzy Inference Technique Algorithm (FITA) 或 Fuzzy Analysis Technique Index (FATI) 的缩写,但没有明确提及,可能是模糊推理中其他具体技术和指标的简称。 文章通过深入研究这些不同的Mamdani算法形式,旨在为理解和应用模糊逻辑系统提供一个全面的框架,特别是在处理实际问题中对不确定性的处理和推理。

修改和补充下列代码得到十折交叉验证的平均每一折auc值和平均每一折aoc曲线,平均每一折分类报告以及平均每一折混淆矩阵 min_max_scaler = MinMaxScaler() X_train1, X_test1 = x[train_id], x[test_id] y_train1, y_test1 = y[train_id], y[test_id] # apply the same scaler to both sets of data X_train1 = min_max_scaler.fit_transform(X_train1) X_test1 = min_max_scaler.transform(X_test1) X_train1 = np.array(X_train1) X_test1 = np.array(X_test1) config = get_config() tree = gcForest(config) tree.fit(X_train1, y_train1) y_pred11 = tree.predict(X_test1) y_pred1.append(y_pred11 X_train.append(X_train1) X_test.append(X_test1) y_test.append(y_test1) y_train.append(y_train1) X_train_fuzzy1, X_test_fuzzy1 = X_fuzzy[train_id], X_fuzzy[test_id] y_train_fuzzy1, y_test_fuzzy1 = y_sampled[train_id], y_sampled[test_id] X_train_fuzzy1 = min_max_scaler.fit_transform(X_train_fuzzy1) X_test_fuzzy1 = min_max_scaler.transform(X_test_fuzzy1) X_train_fuzzy1 = np.array(X_train_fuzzy1) X_test_fuzzy1 = np.array(X_test_fuzzy1) config = get_config() tree = gcForest(config) tree.fit(X_train_fuzzy1, y_train_fuzzy1) y_predd = tree.predict(X_test_fuzzy1) y_pred.append(y_predd) X_test_fuzzy.append(X_test_fuzzy1) y_test_fuzzy.append(y_test_fuzzy1)y_pred = to_categorical(np.concatenate(y_pred), num_classes=3) y_pred1 = to_categorical(np.concatenate(y_pred1), num_classes=3) y_test = to_categorical(np.concatenate(y_test), num_classes=3) y_test_fuzzy = to_categorical(np.concatenate(y_test_fuzzy), num_classes=3) print(y_pred.shape) print(y_pred1.shape) print(y_test.shape) print(y_test_fuzzy.shape) # 深度森林 report1 = classification_report(y_test, y_prprint("DF",report1) report = classification_report(y_test_fuzzy, y_pred) print("DF-F",report) mse = mean_squared_error(y_test, y_pred1) rmse = math.sqrt(mse) print('深度森林RMSE:', rmse) print('深度森林Accuracy:', accuracy_score(y_test, y_pred1)) mse = mean_squared_error(y_test_fuzzy, y_pred) rmse = math.sqrt(mse) print('F深度森林RMSE:', rmse) print('F深度森林Accuracy:', accuracy_score(y_test_fuzzy, y_pred)) mse = mean_squared_error(y_test, y_pred) rmse = math.sqrt(mse)

2023-06-02 上传

修改和补充下列代码得到十折交叉验证的平均auc值和平均aoc曲线,平均分类报告以及平均混淆矩阵 min_max_scaler = MinMaxScaler() X_train1, X_test1 = x[train_id], x[test_id] y_train1, y_test1 = y[train_id], y[test_id] # apply the same scaler to both sets of data X_train1 = min_max_scaler.fit_transform(X_train1) X_test1 = min_max_scaler.transform(X_test1) X_train1 = np.array(X_train1) X_test1 = np.array(X_test1) config = get_config() tree = gcForest(config) tree.fit(X_train1, y_train1) y_pred11 = tree.predict(X_test1) y_pred1.append(y_pred11 X_train.append(X_train1) X_test.append(X_test1) y_test.append(y_test1) y_train.append(y_train1) X_train_fuzzy1, X_test_fuzzy1 = X_fuzzy[train_id], X_fuzzy[test_id] y_train_fuzzy1, y_test_fuzzy1 = y_sampled[train_id], y_sampled[test_id] X_train_fuzzy1 = min_max_scaler.fit_transform(X_train_fuzzy1) X_test_fuzzy1 = min_max_scaler.transform(X_test_fuzzy1) X_train_fuzzy1 = np.array(X_train_fuzzy1) X_test_fuzzy1 = np.array(X_test_fuzzy1) config = get_config() tree = gcForest(config) tree.fit(X_train_fuzzy1, y_train_fuzzy1) y_predd = tree.predict(X_test_fuzzy1) y_pred.append(y_predd) X_test_fuzzy.append(X_test_fuzzy1) y_test_fuzzy.append(y_test_fuzzy1)y_pred = to_categorical(np.concatenate(y_pred), num_classes=3) y_pred1 = to_categorical(np.concatenate(y_pred1), num_classes=3) y_test = to_categorical(np.concatenate(y_test), num_classes=3) y_test_fuzzy = to_categorical(np.concatenate(y_test_fuzzy), num_classes=3) print(y_pred.shape) print(y_pred1.shape) print(y_test.shape) print(y_test_fuzzy.shape) # 深度森林 report1 = classification_report(y_test, y_prprint("DF",report1) report = classification_report(y_test_fuzzy, y_pred) print("DF-F",report) mse = mean_squared_error(y_test, y_pred1) rmse = math.sqrt(mse) print('深度森林RMSE:', rmse) print('深度森林Accuracy:', accuracy_score(y_test, y_pred1)) mse = mean_squared_error(y_test_fuzzy, y_pred) rmse = math.sqrt(mse) print('F深度森林RMSE:', rmse) print('F深度森林Accuracy:', accuracy_score(y_test_fuzzy, y_pred)) mse = mean_squared_error(y_test, y_pred) rmse = math.sqrt(mse) print('F?深度森林RMSE:', rmse) print('F?深度森林Accuracy:', accuracy_score(y_test, y_pred))

2023-06-02 上传