diff options
author | Johannes Schauer <josch@debian.org> | 2015-07-07 11:12:00 +0200 |
---|---|---|
committer | Johannes Schauer <josch@debian.org> | 2015-07-07 11:12:00 +0200 |
commit | d210b3addc8ffed7214afd8c7882e700fbcc38c5 (patch) | |
tree | ded15607f7f24f83d2d0d7c542265c0a97af577a /examples/takagi-sugeno/octave/heart_disease_risk.fcl |
fuzzylite (5.1+dfsg-1) unstable; urgency=medium
* new upstream version (Closes: #777858)
* removed debian/patches/20140705-minor-improvements-on-building-script as
upstream integrated it. Adjust build options in d/rules accordingly.
* delete debian/patches/20140714-building-from-objects-just-once and
debian/patches/20141027-fix-some-spelling as they have been applied
upstream
* install usr/lib/*/pkgconfig/fuzzylite.pc in fuzzylite-dev
* SONAME bump from 5.0 to 5.1, so renaming libfuzzylite5.0 to
libfuzzylite5.1
* add debian/patches/pkgconfig_installdir to install pkgconfig file in
correct location
# imported from the archive
Diffstat (limited to 'examples/takagi-sugeno/octave/heart_disease_risk.fcl')
-rw-r--r-- | examples/takagi-sugeno/octave/heart_disease_risk.fcl | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/examples/takagi-sugeno/octave/heart_disease_risk.fcl b/examples/takagi-sugeno/octave/heart_disease_risk.fcl new file mode 100644 index 0000000..9629a47 --- /dev/null +++ b/examples/takagi-sugeno/octave/heart_disease_risk.fcl @@ -0,0 +1,58 @@ +FUNCTION_BLOCK Heart-Disease-Risk + +VAR_INPUT + LDLLevel: REAL; + HDLLevel: REAL; +END_VAR + +VAR_OUTPUT + HeartDiseaseRisk: REAL; +END_VAR + +FUZZIFY LDLLevel + RANGE := (0.000 .. 300.000); + TERM Low := Trapezoid -1.000 0.000 90.000 110.000; + TERM LowBorderline := Trapezoid 90.000 110.000 120.000 140.000; + TERM Borderline := Trapezoid 120.000 140.000 150.000 170.000; + TERM HighBorderline := Trapezoid 150.000 170.000 180.000 200.000; + TERM High := Trapezoid 180.000 200.000 300.000 301.000; +END_FUZZIFY + +FUZZIFY HDLLevel + RANGE := (0.000 .. 100.000); + TERM LowHDL := Trapezoid -1.000 0.000 35.000 45.000; + TERM ModerateHDL := Trapezoid 35.000 45.000 55.000 65.000; + TERM HighHDL := Trapezoid 55.000 65.000 100.000 101.000; +END_FUZZIFY + +DEFUZZIFY HeartDiseaseRisk + RANGE := (0.000 .. 10.000); + TERM NoRisk := 0.000; + TERM LowRisk := 2.500; + TERM MediumRisk := 5.000; + TERM HighRisk := 7.500; + TERM ExtremeRisk := 10.000; + METHOD : COGS; + DEFAULT := nan; +END_DEFUZZIFY + +RULEBLOCK + AND : MIN; + RULE 1 : if LDLLevel is Low and HDLLevel is LowHDL then HeartDiseaseRisk is MediumRisk + RULE 2 : if LDLLevel is Low and HDLLevel is ModerateHDL then HeartDiseaseRisk is LowRisk + RULE 3 : if LDLLevel is Low and HDLLevel is HighHDL then HeartDiseaseRisk is NoRisk + RULE 4 : if LDLLevel is LowBorderline and HDLLevel is LowHDL then HeartDiseaseRisk is MediumRisk + RULE 5 : if LDLLevel is LowBorderline and HDLLevel is ModerateHDL then HeartDiseaseRisk is LowRisk + RULE 6 : if LDLLevel is LowBorderline and HDLLevel is HighHDL then HeartDiseaseRisk is LowRisk + RULE 7 : if LDLLevel is Borderline and HDLLevel is LowHDL then HeartDiseaseRisk is HighRisk + RULE 8 : if LDLLevel is Borderline and HDLLevel is ModerateHDL then HeartDiseaseRisk is MediumRisk + RULE 9 : if LDLLevel is Borderline and HDLLevel is HighHDL then HeartDiseaseRisk is LowRisk + RULE 10 : if LDLLevel is HighBorderline and HDLLevel is LowHDL then HeartDiseaseRisk is HighRisk + RULE 11 : if LDLLevel is HighBorderline and HDLLevel is ModerateHDL then HeartDiseaseRisk is HighRisk + RULE 12 : if LDLLevel is HighBorderline and HDLLevel is HighHDL then HeartDiseaseRisk is MediumRisk + RULE 13 : if LDLLevel is High and HDLLevel is LowHDL then HeartDiseaseRisk is ExtremeRisk + RULE 14 : if LDLLevel is High and HDLLevel is ModerateHDL then HeartDiseaseRisk is HighRisk + RULE 15 : if LDLLevel is High and HDLLevel is HighHDL then HeartDiseaseRisk is MediumRisk +END_RULEBLOCK + +END_FUNCTION_BLOCK |