I am using Skfuzzy to interpret two arrays: 1. distances to a stream [dist]; 2. Strahler order[order]. I then want to calculate the consequent (a vulnerability value) for each stream distance and Strahler order pairs using a set of custom membership values I have created for the antecedents and consequent. I have the program working for a single input of values, but I don't understand how to get skfuzzy to loop through an array of input values and output the consequent for each value pair.
The control system:
# Creation of control system using the defined rules
vulnerability_ctrl = ctrl.ControlSystem([rule1, rule2, rule3])
vulnerability = ctrl.ControlSystemSimulation(vulnerability_ctrl)
The inputs and computation:
# input of distance and Strahler order arrays
vulnerability.input[dist]
vulnerability.input[order]
vulnerability.compute()
I get this error because I don't know how skfuzzy deals with an array of inputs:
TypeError: '_InputAcceptor' object is not subscriptable