Reputation: 1329
I have been given a new task in my new job, basically, I have to create a "model" to predict future data. I have been told Fuzzy Logic is the best way to do this, and I use Java almost every day, so I would prefer to use it here too.
I have searched for information about Fuzzy Logic and I roughly understand what it is and how it works (Here and Here).
I also have searched for APIs that can help me with this (For example, JFuzzyLogic and JFuzzyLite), but none of this seem to be able to do what I want (Or maybe it is me that I have no idea what I am searching for).
My idea is to dinamically generate "rules" (which together would make a model) based on the data I have. (I have data with different outcomes, this model would tell me if new data belongs to one outcome or another, basic prediction).
Am I approaching the problem in the correct way? Does any Java API have this functionalities?
Please, tell me if I am wrong, I want to learn as much as possible.
Thank you all for reading this (You might need to correct my english mistakes, sorry for that).
EDIT (More information): My data is stored in excels, each has about 5000 rows and 75 columns (column number always the same):
Upvotes: 0
Views: 2003
Reputation: 1
You have 74 inputs and 1 output. But my concern is that what type of fuzzy logic you want to use here? like Type-1 fuzzy, type-2 or Intuitionistic fuzzy, or Neutrosophic fuzzy? For the basic fuzzy by Zadeh 1975 which is type-1 fuzzy , you will have only one function for each input parameter and that is membership function. By using Intuitionistic fuzzy, you will have two functions and that are membership and non-membership functions and for Neutrosophic fuzzy, you will have three functions, such as membership, non-membership and indeterminate functions associated with all your input parameters. After this, you will define if-then rules. If-then rules usually are the multiplication of the variable values of the membership function of the input parameters like, if you have three parameters and in type-1 fuzzy then and all the membership functions of the three parameters contains low, medium, and high areas then the maximum number of your rules would be 27 but not all the rules are to be defined. Some rules are of not much use. So in your case you have a lot of rules. Then you will need a defuzzifier to get crisp output. Due to the large number of input parameters, I suggest that you as this is an old question and you had done your work so anyone in the same situation must use Type-1 fuzzy logic.
Upvotes: 0
Reputation: 587
There is a Java fuzzy matching algorithm, that I found very useful for a similar problem. Where we have a rows of records where each column is a different type of element.
https://github.com/intuit/fuzzy-matcher
For example a list of Users, and having attributes like (name, address, phone) and want to predict which users are similar looking at different formats in which each data is entered.
This library groups similar rows together and gives a probability score of rows being similar (by bubbling up the score of each element being similar)
This library is suited well for String similarity, but could be used to find similarity between numeric data too. I was able to pass in a list of phone number and was able to identify similar phone numbers.
hope this helps
Upvotes: 0
Reputation: 2116
It looks like a standard regression problem. You want to predict a number from the values of other numbers.
Let's call your last column is Y, and all the others X_i. You want to find a function (your model) that gives you Y based on X. So Y = f(X). Your model can take many form. You should probably start with the simplest one, which is a linear model.
Linear regression will try to find the best W_i such that :
Y = W_0 * X_0 + W_1 * X_1 + ... + W_n * X_n
So what you need is a regression library in Java. A popular one is WEKA, which has a good linear regression class.
Concerning fuzzy logic, I'm not an expert but it doesn't seem very well suited to your problem.
Upvotes: 1