Learn R Programming

Rfuzzycoco

Rfuzzycoco provides the FuzzyCoCo algorithm by wrapping the fuzzycoco C++ library, and extending its possibilities.

Fuzzy Coco

The Fuzzy CoCo (Fuzzy Cooperative Coevolution) algorithm — by Carlos A. Peña-Reyes (2000) — is an evolutionary fuzzy modeling method designed to automatically generate interpretable fuzzy rule-based systems from data.

Unlike traditional evolutionary approaches that evolve full rule bases as single entities, Fuzzy CoCo uses a cooperative coevolutionary strategy:

  • Each fuzzy rule (or rule component) is evolved in a separate subpopulation.
  • The membership functions parameters are evolved in a second subpopulation.

Both rule structures and membership functions are optimized jointly to balance accuracy and interpretability.

This decomposition enables Fuzzy CoCo to efficiently handle complex systems and produce transparent, linguistically meaningful models.

Reference

Peña-Reyes, C. A., & Sipper, M. (2001).
Fuzzy CoCo: A cooperative-coevolutionary approach to fuzzy modeling.
IEEE Transactions on Fuzzy Systems, 9(5), 727–737.
DOI: 10.1109/91.963759
[

Copy Link

Version

Install

install.packages('Rfuzzycoco')

Monthly Downloads

136

Version

0.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Karl Forner

Last Published

October 21st, 2025

Functions in Rfuzzycoco (0.1.0)

stop_engine_if_stalling

an utility function to easily generate a stop function that stops when the convergence is stalling
stop_engine_on_first_of

an utility function to easily generate the commonly used until parameter, as used by fuzzycoco_fit_df_hybrid()
fuzzy_coco_systematic_fit

systematic search
fuzzycoco

creates a model for the Fuzzy Coco algorithm
fuzzy_coco_parsnip

parsnip model function
fuzzy_coco_parsnip_wrapper

this is an utility function used to implement the parsnip interface
shared_params

shared params
reexports

Objects exported from other packages
example_mtcars

model parameters and data for the mtcars regression example
compute_optimal_quantile_fuzzy_set_positions

computes the optimal fuzzy set positions based on the distribution of the data
fit_to_df

a one-row overview of a fuzzy system with the usage of variables, the fitness, number of generations and optionally a metric
fit.fuzzycoco_model

fit the FuzzyCoco model using the formula interface
Rfuzzycoco-package

Rfuzzycoco: Provides an R Interface to the 'FuzzyCoCo' C++ Library and Extends It
evaluate_fuzzy_system

evaluate the fuzzy system from a fit on some given data
fit_xy.fuzzycoco_model

fit the FuzzyCoco model using the dataframe interface
example_iris36

model parameters and data for the IRIS36 classification example
example_iris_binary_categorical

model parameters and data for the IRIS36 classification example
evaluate.fuzzycoco_fit

evaluate the fuzzy system from a fit on some given data
params

utility to build the Fuzzy Coco parameters data structure
fuzzycoco_fit_df_hybrid

lowest-level implementation of the fitting of a fuzzy coco model using the hybrid engine
fs_rules_to_df

format the fuzzy rules as a data frame
fs_used_vars_to_df

extract the usage of the variables by a fuzzy system
predict_fuzzy_system

predict the outcome of a fuzzy system on some input data
predict.fuzzycoco_fit

predict the outcome on some input data using a fitted model