Sam B.

# How do i go about seperating my numerical data into fuzzy sections and putting it into code in Python ?

My inputs X1 and X2 are the values from -12 and 12 including 0 (i.e:(-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12) for both X1 and X2 and my output y is the function y=(2*(X1^2))+(X2^2),. In my code I got the values for y as [432 363 300 243 192 147 108 75 48 27 12 3 0 3 12 27 48 75 108 147 192 243 300 363 432]

By:

Tutor
5 (9)

Timothy S.

That said, I'm not really sure what you mean by fuzzy sections. This will store all the values for that function in a precomputed dictionary y (however, precomputing all the values is highly inefficient if you are just looking to train your artificial intelligence systems on a parameter.

If you are looking to partition the space for that utility function, you really need to think about the metric by which you are doing that. Arbitrarily setting the limits is not very effective. What you really want is to be able to train on the the signal and response of your data and the decision your algorithm makes.

For example. You may start out with two even partitions for your data. When your algorithm makes a choice for an action based on that partition and fails to accomplish its task, the input parameters should be noted and the partition shifted. Once the partition finds its way to convergence on some value, the system is considered trained. If you find that moving the partition does not improve or diminish overall performance but performance only for each category, another partition should be added, and some variant of the behavior should be attempted for parameters falling within the new partition.

Without more information about the actual assignment I am not sure that I can assist you. What is it that you are trying to accomplish?
Report

11/07/13

Sam B.

Hi I'm trying to implement the learning from examples algorithm in fuzzy logic using the function and limits i gave in Python
Report

11/11/13

## Still looking for help? Get the right answer, fast.

Get a free answer to a quick problem.
Most questions answered within 4 hours.

#### OR

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.