Coder Social home page Coder Social logo

Comments (9)

veroandreo avatar veroandreo commented on July 18, 2024

Name of the addon
r.learn.m

Describe the bug
In the new scikit-learn 0.22 the OneHotEncode() function parameters are changed and category maps can not be used in r.learn.m current version.

To Reproduce
Test with category maps.

Please provide a set of commands to reproduce (you can use the example in the manual as a basis)

Expected behavior

Error message here
clf = Pipeline([('onehot', OneHotEncoder(
categorical_features=categorymaps

Additional context
There is a new version of r.learn.ml (separate train and predict modules) in github where the problem is solved. In this version (training and predicting in one module) the message could be modified to indicate the last version of python3-scikit-learn that is compatible with the script:
gs.fatal("Package python3-scikit-learn 0.18 or newer is not installed") .

Would you please provide the link where this new version of r.learn.ml exists?

from grass-addons.

maitlang1 avatar maitlang1 commented on July 18, 2024

Sorry, forgot the link to Steven's repo:
https://github.com/stevenpawley/r.learn.ml .

from grass-addons.

neteler avatar neteler commented on July 18, 2024

Let's keep it open since the problem isn't solved yet

from grass-addons.

neteler avatar neteler commented on July 18, 2024

note: @stevenpawley told me off-list that he prepares an update of r.learn.ml

from grass-addons.

neteler avatar neteler commented on July 18, 2024

@maitlang1 could you give #126 a try (New version of r.learn.ml)?

from grass-addons.

maitlang1 avatar maitlang1 commented on July 18, 2024

GRASS 7.9.dev (25m_raster):~ > g.extension -s r.learn.ml url=github.com/stevenpawley/r.learn.ml
WARNING: Extension <r.learn.ml> already installed. Re-installing...
Fetching <r.learn.ml> from
https://github.com/stevenpawley/r.learn.ml/archive/master.zip (be
patient)...
Compiling...
Installing...
Updating private addons metadata file...
WARNING: No addons metadata available. Addons metadata file not updated.
Installation of <r.learn.ml> successfully finished

The test

Extracting training data
Traceback (most recent call last):
File "/usr/local/grass79/scripts/r.learn.train", line 876,
in
main()
File "/usr/local/grass79/scripts/r.learn.train", line 588,
in main
X, y, cat = stack.extract_points(training_points, field)
File "/usr/local/grass79/etc/r.learn.ml/raster.py", line
886, in extract_points
self._grass_sql_dtype_to_numpy(df_cols[field])
File "/usr/local/grass79/etc/r.learn.ml/raster.py", line
815, in _grass_sql_dtype_to_numpy
return grass_vector_dtypes[dtype]
KeyError: 'int'

The response column description:
column:PE
description:
type:INTEGER
len:20
scale:0
precision:0
default:
nullok:yes
select:?
update:?

from grass-addons.

stevenpawley avatar stevenpawley commented on July 18, 2024

Thanks for this, it should be fixed now in 0aa72e9

from grass-addons.

maitlang1 avatar maitlang1 commented on July 18, 2024

I compiled a grass database for testing r.learn.ml addon: https://drive.google.com/file/d/1wQEwJNKtFheD5cBoXQwdiuBaqk1bI-25/view?usp=sharing . The database structure description is included.

from grass-addons.

stevenpawley avatar stevenpawley commented on July 18, 2024

I'm going to close this because I've switched all further work to r.learn.ml2

from grass-addons.

Related Issues (20)

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.