GithubHelp home page GithubHelp logo

Comments (7)

astrofrog avatar astrofrog commented on September 4, 2024

Actually, this could be done e.g. by a custom function as suggested in #7

from astrodendro.

ChrisBeaumont avatar ChrisBeaumont commented on September 4, 2024

Reading #7 reminded me of this. Perhaps both can be addressed using callback functions

from astrodendro.

astrofrog avatar astrofrog commented on September 4, 2024

@ChrisBeaumont - yes, in fact what I was suggesting is that all one needs to do in the scenario of #7 and the implementation of #10 is pass a function that will only accept a leaf as independent if it contains one of a list of seed pixels. However, I do agree that it would be nice to make this a little easier to use that requiring the user to have to write a custom function. We could either:

  • add a hard-coded initialization option when creating the dendrograms for the list of seed pixels

  • add a method that will prune a tree after the fact based on 'seed' pixels

  • add a helper function that could be passed to #10 and which just takes the list of seed pixels, e.g.:

    from astrodendro.helpers import seed_leaves
    d = Dendrogram.compute(image, merge_test_function=seed_leaves(x, y, v))

from astrodendro.

ChrisBeaumont avatar ChrisBeaumont commented on September 4, 2024

I think #7 and #8 both have their uses, and they don't really interfere with each other. Your second suggestion seems like the best way to achieve what I was talking about, without complicating the __init__ or __compute__ signatures further.

from astrodendro.

astrofrog avatar astrofrog commented on September 4, 2024

Do we still want to go with the second option now we've said (in other issues) that re-computing is preferable for now to pruning?

from astrodendro.

ChrisBeaumont avatar ChrisBeaumont commented on September 4, 2024

Maybe not. Option 3 would be the simplest interface, since we want to use custom merger functions anyways. I think we should merge that code, and then make sure it's easy to use a custom merge test function to build a dendrogram with manually-specified seeds

from astrodendro.

ChrisBeaumont avatar ChrisBeaumont commented on September 4, 2024

Closed via #10

from astrodendro.

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.