karakatic / evopreprocess Goto Github PK
View Code? Open in Web Editor NEWA Python Toolkit for Data Preprocessing with Evolutionary and Nature-Inspired Algorithms.
License: GNU General Public License v3.0
A Python Toolkit for Data Preprocessing with Evolutionary and Nature-Inspired Algorithms.
License: GNU General Public License v3.0
Please update your package to use the latest upstream release...
Dear @karakatic,
niapy interface has recently been changed a bit. Thus, please upgrade your package to be consistent with recent
interface: https://github.com/NiaOrg/NiaPy/releases/tag/2.0.0rc15
Python 3.6.10 |Anaconda, Inc.| (default, May 7 2020, 23:06:31)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import NiaPy
>>> NiaPy.__version__
'1.0.2'
>>> from EvoPreprocess.data_sampling import EvoSampling
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/miniconda3/envs/nia/lib/python3.6/site-packages/EvoPreprocess/__init__.py", line 15, in <module>
from . import data_sampling
File "/opt/miniconda3/envs/nia/lib/python3.6/site-packages/EvoPreprocess/data_sampling/__init__.py", line 6, in <module>
from .EvoSampling import EvoSampling
File "/opt/miniconda3/envs/nia/lib/python3.6/site-packages/EvoPreprocess/data_sampling/EvoSampling.py", line 15, in
<module>
from NiaPy.algorithms import Individual
ImportError: cannot import name 'Individual'
>>>
Hi @karakatic,
niapy version 2.0.0rc18 has recently been released. Please upgrade your package.
The conventional and GNU-recommended way to apply GPL-family licenses is via a copyright and license notice in the source files (GNU’s preference, in case individual files are copied out of the software), or at least in a README or COPYING file somewhere. Here are the GNU project’s recommendations on the subject.
The license and copyright statement conventionally specifies which GPL license versions may be applied, and many but not all projects use the “either version 3 of the License, or (at your option) any later version” language to allow subsequent GPL versions. When the project only says “GPLv3,” as in this case, the conservative assumption is that no later versions are permitted. However, experience shows that this doesn’t always match upstream authors’ intent.
Since there is no GPL version later than 3.0 now or in the immediate future, the distinction between GPLv2 and GPLv2+ is currently much more important than the distinction between GPLv3 and GPLv3+ when it comes to license compatibility. However, as a Linux distribution packager (my case), or as a library user working in an environment with strict requirements on documenting dependencies (which seems increasingly common), it’s important to be able to precisely document license terms—thus the request for clarification, or for the addition of a standard GNU-style copyright and license notice somewhere in the project.
Could you please clarify whether the license of this project is intended to be (in SPDX terms) GPL-3.0-only
or GPL-3.0-or-later
?
niapy interface for the representation of problems has recently undergone to major revision. This is probably the final change
of niapy interface. Please make your package consistent with the latest niapy release (2.0.0rc17).
Tested on Fedora rawhide with Python 3.12
sklearn api has slightly been changed in the past releases, and thus it is not working as expected. Please check it out.
File "/builddir/build/BUILDROOT/python-EvoPreprocess-0.5.0-3.fc39.noarch/usr/lib/python3.12/site-packages/evopreprocess/init.py", line 15, in
from . import data_sampling
File "/builddir/build/BUILDROOT/python-EvoPreprocess-0.5.0-3.fc39.noarch/usr/lib/python3.12/site-packages/evopreprocess/data_sampling/init.py", line 6, in
from .EvoSampling import EvoSampling
File "/builddir/build/BUILDROOT/python-EvoPreprocess-0.5.0-3.fc39.noarch/usr/lib/python3.12/site-packages/evopreprocess/data_sampling/EvoSampling.py", line 15, in
from imblearn.base import BaseSampler
File "/usr/lib/python3.12/site-packages/imblearn/init.py", line 52, in
from . import (
File "/usr/lib/python3.12/site-packages/imblearn/combine/init.py", line 5, in
from ._smote_enn import SMOTEENN
File "/usr/lib/python3.12/site-packages/imblearn/combine/_smote_enn.py", line 12, in
from ..base import BaseSampler
File "/usr/lib/python3.12/site-packages/imblearn/base.py", line 21, in
from .utils._param_validation import validate_parameter_constraints
File "/usr/lib/python3.12/site-packages/imblearn/utils/_param_validation.py", line 908, in
from sklearn.utils._param_validation import (
ImportError: cannot import name '_MissingValues' from 'sklearn.utils._param_validation' (/usr/lib64/python3.12/site-packages/sklearn/utils/_param_validation.py). Did you mean: 'MissingValues'?
@karakatic, please review a little bit these tests. Three tests are failing now. Since the last major update of this package, several dependencies have been updated.
When performing feature selection by following approach, I am getting following error. Is it an issues with library version?
X_new = EvoFeatureSelection( evaluator=DecisionTreeRegressor(max_depth=2), optimizer=nia.DifferentialEvolution, random_seed=1, n_runs=5, n_folds=5, ).fit_transform( X, Y)
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/usr/local/lib/python3.6/dist-packages/EvoPreprocess/feature_selection/EvoFeatureSelection.py", line 126, in _run
return evo.run()
TypeError: run() missing 1 required positional argument: 'task'
"""
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
in ()
----> 1 X_new.fit_transform(X,Y)
4 frames
/usr/local/lib/python3.6/dist-packages/sklearn/base.py in fit_transform(self, X, y, **fit_params)
554 else:
555 # fit method of arity 2 (supervised transformation)
--> 556 return self.fit(X, y, **fit_params).transform(X)
557
558
/usr/local/lib/python3.6/dist-packages/sklearn/feature_selection/univariate_selection.py in fit(self, X, y)
347
348 self.check_params(X, y)
--> 349 score_func_ret = self.score_func(X, y)
350 if isinstance(score_func_ret, (list, tuple)):
351 self.scores, self.pvalues_ = score_func_ret
/usr/local/lib/python3.6/dist-packages/EvoPreprocess/feature_selection/EvoFeatureSelection.py in select(self, X, y)
114
115 with Pool(processes=self.n_jobs) as pool:
--> 116 results = pool.starmap(EvoFeatureSelection._run, evos)
117
118 return EvoFeatureSelection._reduce(results, self.n_runs, self.n_folds, self.benchmark, X.shape[1])
/usr/lib/python3.6/multiprocessing/pool.py in starmap(self, func, iterable, chunksize)
272 func
and (a, b) becomes func(a, b).
273 '''
--> 274 return self._map_async(func, iterable, starmapstar, chunksize).get()
275
276 def starmap_async(self, func, iterable, chunksize=None, callback=None,
/usr/lib/python3.6/multiprocessing/pool.py in get(self, timeout)
642 return self._value
643 else:
--> 644 raise self._value
645
646 def _set(self, i, obj):
TypeError: run() missing 1 required positional argument: 'task'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.