In our case would be somethin like this: import numpy as np This is the example from pymoo docs class SphereWithConstraint(Problem): We have tried to follow some of the examples, but we don't see very clear how to define the objective function according to our case. We don't fully understand how to define our problem class properly.The whole first part of the code is: =size(X) The aim is to get a binary vector (0 and 1) indicating the best features (for the optimized classifier) options = is the Objective function which receives the normalized feature matrix Xn and Y (indices is related to the Kfold-cross validation) this way we can get this ouput of the optimization including:īestSol is a vector with the Best solution found.įval is a 2 column vector matching the best solution according to the number of features used to classify. Y is a multiclass vector(classes: 1,2,3,4) =size(X) įirst, we defined the option parameters for the problem which are: multiobjective approach, population size of 50 and 5 generations. X is a mxn feature matrix(m=samples, n=features) We already implemented the optimization in matlab, but we are whiling to replicate it on Python. Our aim is to minimize the number of proteins and maximize the accuracy of the classifier(objective function). This problem consist on an optimization of a protein based classifier. The main challenge is to define and implement our problem. We have searched in the documentation but we are still strugling to solve some issues. I'm currently working with two student colleagues with the optimization package pymoo.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |