NiaOrg / NiaPy

Python microframework for building nature-inspired algorithms. Official docs: https://niapy.org
https://niapy.org
MIT License
259 stars 79 forks source link

Add an example/guide showing how to solve a real-world problem #215

Closed crtomirmajer closed 3 years ago

crtomirmajer commented 5 years ago

This is a feature request. Include an example or a guide of how to do ie. feature selection using NiaPy. Not all of the potential users are familiar with the underlying algorithms and implementation details, but would still want to use this library to solve a problem (such as feature selection), using a more high-level API. Here's a guide for feature selection from PySwarms

An example/guide could target something else also - I would just like to get an idea on how to solve a real-world problem using NiaPy, without going into details.

sisco0 commented 4 years ago

Link is broken, it could be replaced by https://pyswarms.readthedocs.io/en/development/examples/feature_subset_selection.html

firefly-cpp commented 3 years ago

Dear @crtomirmajer,

thank you very much for your interest in NiaPy. Please refer to the some interesting packages that are based on NiaPy:

https://github.com/karakatic/EvoPreprocess

https://github.com/lukapecnik/NiaAML

https://github.com/lukapecnik/NiaClass

https://github.com/timzatko/Sklearn-Nature-Inspired-Algorithms

zStupan commented 3 years ago

Hello everyone, I've created a gist, where I implemented SVM Hyper parameter optimization and feature selection using Particle Swarm optimization, based on this paper.

I think it's correct, although it sometimes returns a worse model than the default. It says in the paper, they used 10 fold stratified cross validation. So I assumed they split the dataset into a training and test set and then did cross validation on the training set and returned the mean accuracy as the fitness function. That's how GridSearchCV works in scikit-learn. The article is not very clear about this. If anyone spots any mistakes in my code or something I missed from the article, please tell me.

I thought we could use this as the real world use case example for the docs, but I thing the best and easiest thing would be to take this article by @GregaVrbancic , throw it in an rst file and update the code to use the current API.