ex_fuzzy.eval_tools.eval_fuzzy_model#

ex_fuzzy.eval_tools.eval_fuzzy_model(fl_classifier, X_train, y_train, X_test, y_test, plot_rules=False, print_rules=True, plot_partitions=False, return_rules=True, bootstrap_results_print=True)[source]#

Comprehensive evaluation of a fitted fuzzy rule-based classifier.

This function provides a complete evaluation workflow for fuzzy classifiers including performance metrics, rule analysis, visualization options, and statistical testing. It serves as a convenient wrapper around the FuzzyEvaluator class.

Parameters:
  • fl_classifier (evf.BaseFuzzyRulesClassifier) – Fitted fuzzy rule-based classifier

  • X_train (np.array) – Training feature data used for model fitting

  • y_train (np.array) – Training target labels used for model fitting

  • X_test (np.array) – Test feature data for evaluation

  • y_test (np.array) – Test target labels for evaluation

  • plot_rules (bool, optional) – Whether to generate rule visualization plots. Defaults to False.

  • print_rules (bool, optional) – Whether to print rule text representations. Defaults to True.

  • plot_partitions (bool, optional) – Whether to plot fuzzy variable partitions. Defaults to False.

  • return_rules (bool, optional) – Whether to include rule text in return string. Defaults to True.

  • bootstrap_results_print (bool, optional) – Whether to perform bootstrap statistical analysis. Defaults to True.

Returns:

Comprehensive evaluation report containing performance metrics, rule analysis,

and statistical results formatted as a readable text report.

Return type:

str

Example

>>> classifier = BaseFuzzyRulesClassifier()
>>> classifier.fit(X_train, y_train)
>>> report = eval_fuzzy_model(classifier, X_train, y_train, X_test, y_test)
>>> print(report)

Note

This function creates a FuzzyEvaluator instance internally and calls its eval_fuzzy_model method. For more control over the evaluation process, consider using FuzzyEvaluator directly.