Code Monkey home page Code Monkey logo

evopreprocess's People

Contributors

firefly-cpp avatar karakatic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

evopreprocess's Issues

Error importing Individual from NiaPy

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'
>>> 

Please clarify GPL version

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?

Upgrade to the latest niapy release

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).

Python 3.12 and scikit-learn

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'?

Tests are failing

@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.

TypeError: run() missing 1 required positional argument: 'task'

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'



Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.