-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about adding own objective function #11
Comments
Hello, You are probably indicating issue #7 as reference. You can follow this comment to further understand how to use your own dataset with the library. Regarding your query, I would need a few more details before I can help:
|
Symmetric uncertainty - Maximise relevance:: for selecting only relevant features into a sListand second objective function refers to removing redundant features. See the above flowchart. Dataset: Book1.zip |
So just to be clear my objective will take in subset generated based on chromsome and then evaluate them. But i am not sure how to let java code select subset based on chromosome genetic code index |
Hello @SS-LAN , Sorry for being a bit late to reply regarding your problem, was caught up with my own work. Anyway, From what I understand regarding your problem, you can map your dataset to the binary encoded chromosomes in the following way:
You can implement as many objective functions as you want to use your dataset.
Once you have access to your dataset in your objective functions, you can then use `Chromosome#getGeneticCode() to get your genetic code. Compare this to your 2D dataset array and select row / column indices where the genetic code is "true" or 1. I hope this helps. |
HI, @onclave. I previously read the query that you commented on for someone recently regarding generating population of n chromosome and using the genetic code for each i.e allele 1 or 0 to use as reference to dataset columns (attributes) to either select them or discrad them for feature selection.
My project is focusing on NSGA-2 to perform feature selection aswell and I am using symmetric uncertainty as objective function to calculate the fitness of each column from dataset based on the chromsome generated as solution. My objective function is a maximisation function that looks to maximise relevance and also another function to reduce redundancy. I have created a popluatiion out of my dataset that i am using. However, the issue i am facing currently is that i am not able to integrate my SU function with your NSGA-2 package objective provider in generating binary encoded chromosomes (Default binary encoder provided in ur library) and using the chromosome index to refer to my dataset in order to produce subset of the dataset based on chromosome solution and evalute using objective function. I am using 2d datase with n columns and m rows.
Objective function details (SU):
Symmetric uncertainty can be used to calculate the fitness of features for feature selection by calculating between feature and the target class. The feature which has high value of SU gets high importance. Symmetric uncertainty defined as
Formula = SU(X,Y)=(2*MI(X,Y))/(H(X)+H(Y))
So, basically i am trying to achieve a filter based solution-using multi-objective algorithm (NSGA-2) to my problem - where i will test the generated subset on a classifier.
I had a look at the comment you made on someones issue and guidance you provided in documentation section but i am not sure on how to go about doing that. So, can you provide a pseudocode kind off explaination or step i can follow to acheive this?
Thanks - A Dj
The text was updated successfully, but these errors were encountered: