Giter Club home page Giter Club logo

Comments (8)

mhesselbarth avatar mhesselbarth commented on May 30, 2024 1

Perfect! I still have some unmerged changes on a local branch fixing a few of the notes. Will look into this next week how to merge.

from ibis.isdm.

Martin-Jung avatar Martin-Jung commented on May 30, 2024

To do at a later point. Apparently R7 is the newest hot stuff but has not yet matured to a post-beta version.
Transition as soon as R7 is on CRAN and remove the proto dependency.

from ibis.isdm.

Martin-Jung avatar Martin-Jung commented on May 30, 2024

Closed and implemented now in dev
FYI @mhesselbarth changed all class structure to R6 from proto. Still some notes to resolve (missing self object) but otherwise this will hopefully be cleaner.
We also have now basic definitions for class-functions, e.g. see https://iiasa.github.io/ibis.iSDM/reference/DistributionModel-class.html

from ibis.isdm.

mhesselbarth avatar mhesselbarth commented on May 30, 2024

So R6 objects get changed outside the scope of a function? So for example

ibis.iSDM::add_biodiversity_poipa(x = base_model, poipa = ebird_pa, weight = 1,
           field_occurrence = "individualCount")

would change the object base_model even without assigning it?

This seems to be an issue for some functions (e.g., write_model).

Also, the behavior is not consistent across functions I think. For example train does acutally not change it original object

from ibis.isdm.

mhesselbarth avatar mhesselbarth commented on May 30, 2024

Also, it seems that the class information about the trained engine is missing now for DistributionModel. Needs to be added again

from ibis.isdm.

Martin-Jung avatar Martin-Jung commented on May 30, 2024

So R6 objects get changed outside the scope of a function? So for example

ibis.iSDM::add_biodiversity_poipa(x = base_model, poipa = ebird_pa, weight = 1,
           field_occurrence = "individualCount")

would change the object base_model even without assigning it?

This seems to be an issue for some functions (e.g., write_model).

Also, the behavior is not consistent across functions I think. For example train does acutally not change it original object

I found a similar behaviour for rm_predictors. This is related to object inheritance and unfortunately R6 is a bit more itchy with this, essentially requiering a deep clone of each object when modifying the contents.

from ibis.isdm.

Martin-Jung avatar Martin-Jung commented on May 30, 2024

Also, it seems that the class information about the trained engine is missing now for DistributionModel. Needs to be added again

Yes, but I think I changes this throughout so that the class information is saved as public (or private) attribute instead. If there are still come functions in the package that do a class check, this needs to be changed.

from ibis.isdm.

Martin-Jung avatar Martin-Jung commented on May 30, 2024

Ok, fixed both issues including the class import check in load_model and added unit tests in 9eff17b
"Class" (or rather algorithm) names can be queried via mod$get_name().
train() or project() should not change the original object I think.

Reopen the issue if you think there is something else that did not work following the R6 transition.

from ibis.isdm.

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.