FuzzyLogic.jl

Julia package for fuzzy inference
Author lucaferranti
Popularity
8 Stars
Updated Last
1 Year Ago
Started In
December 2022

FuzzyLogic.jl

Info Build status Documentation Contributing
version CI Status Stable docs contributing guidelines
Licese: MIT Coverage Dev docs SciML Code Style
downloads pkgeval-img gitter-chat

A Julia library for fuzzy logic and applications.

Installation

To install the package, open a Julia session and run

using Pkg; Pkg.add("FuzzyLogic")

the package can then be loaded with

using FuzzyLogic

Features

Quickstart example

fis = @mamfis function tipper(service, food)::tip
    service := begin
      domain = 0:10
      poor = GaussianMF(0.0, 1.5)
      good = GaussianMF(5.0, 1.5)
      excellent = GaussianMF(10.0, 1.5)
    end

    food := begin
      domain = 0:10
      rancid = TrapezoidalMF(-2, 0, 1, 3)
      delicious = TrapezoidalMF(7, 9, 10, 12)
    end

    tip := begin
      domain = 0:30
      cheap = TriangularMF(0, 5, 10)
      average = TriangularMF(10, 15, 20)
      generous = TriangularMF(20, 25, 30)
    end

    service == poor || food == rancid --> tip == cheap
    service == good --> tip == average
    service == excellent || food == delicious --> tip == generous
end

fis(service=1, food=2)

Documentation

  • STABLE: Documentation of the latest release
  • DEV: Documentation of the version on main

Contributing

Contributions are welcome! If you find a bug or want to request a feature, open an issue. You are also encouraged to send pull requests (PRs). For small changes, it is ok to open a PR directly. For bigger changes, it is advisable to discuss it in an issue first. Before opening a PR, make sure to check the contributing guidelines.

Copyright

Used By Packages

No packages found.