Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging two Nblast results tables #466

Open
dosumis opened this issue Dec 11, 2019 · 7 comments
Open

Merging two Nblast results tables #466

dosumis opened this issue Dec 11, 2019 · 7 comments
Assignees

Comments

@dosumis
Copy link
Member

dosumis commented Dec 11, 2019

Merging two NBLAST results doesn't fit the current paradigm of results table merging.

  • Merge on ID won't work - score columns will differ.
  • To make results interpretable to users, we'd need a column for query image (result X has a similarity score n when compared to (segmented) image Y) .

MVP: Block combination of any two results where both have a score column => user message about this not being supported.

Sketch of spec for supporting in future:

  • Extend NBLAST results to include query image column (the comparator against which the score makes sense)
  • Combine based on compound key of ID + comparator ID
@ddelpiano
Copy link
Contributor

@Robbie1977 do we want to tackle this from the xmi or from the datasource bundle?

@Robbie1977
Copy link
Contributor

@dosumis @ddelpiano I think to take the last query results values as the overriding values will give us a workable solution for the moment!?

@dosumis
Copy link
Member Author

dosumis commented Dec 11, 2019

to take the last query results values as the overriding values will give us a workable solution for the moment!?

Disagree - really confusing. Doing this in a non-confusing way is challenging.

As stated in #464 (comment), I think we just block for now: Any two results tables where both have a score column => user message about this combination not being supported. One of those two results table could already be compound.

@Robbie1977
Copy link
Contributor

Robbie1977 commented Dec 12, 2019

@dosumis @ddelpiano As a workable solution I think the first query determines the results content and additional queries only remove non-matches but don't change the data displayed (in remaining rows)?

@ddelpiano
Copy link
Contributor

@dosumis @ddelpiano As a workable solution I think the first query determines the results content and additional queries only remove non-matches but don't change the data displayed (in remaining rows)?

@Robbie1977 that is pretty much what @jrmartin implemented with the last PR he opened today (first query drives the results, if the same column is found in the second query results that have to be merged we skip the columns already present and add to the record with the same id only the columns that it is missing), if that suitable we are good with that (sounds good to me), differently if @dosumis considers this still not enough to preserve the validity of the data we need to think about this a bit and allocate some development.

@dosumis
Copy link
Member Author

dosumis commented Dec 12, 2019

@jrmartin PR is fine for everything except the 2 NBLAST case - which I think is just hard. It will not be clear to users which NBLAST the score refers to. Merged results could have a low similarity score in second NBLAST query. Is it really hard to just block compound queries when both results tables to combine have a score column?

@ddelpiano
Copy link
Contributor

@jrmartin PR is fine for everything except the 2 NBLAST case - which I think is just hard. It will not be clear to users which NBLAST the score refers to. Merged results could have a low similarity score in second NBLAST query. Is it really hard to just block compound queries when both results tables to combine have a score column?

@dosumis it will require some development for sure, we cannot hardcode the header field in the datasource bundle since if this bundle is used in other applications and it's not feasible.
A possible approach could be to define in the datasource bundle in app-config.xml a bean for the class in charge of merging the results, in this bean we provide a list of strings that if matching the headers fields we don't want to merge we jump to the error message you suggested.
I spent literally 10 minutes on this and might be refined after further discussion on the implementation but that is just an approximate explanation of how we can implement this.

Pseudo code below, not real code and not real geppetto classes, just an example:

<bean id="datasourceMergeListWhatever" class="org.geppetto.datasources.mergeResultsClass">
    <property name="myListOfHeadersStopper">
        <list value-type="com.somePackage.TypeForList">
            <ref bean="score"/>
            <ref bean="blabla"/>
            <ref bean="etcetc"/>
        </list>
    </property>
</bean>
class org.geppetto.datasources.mergeResultsClass {
    private List<TypeForList> myListOfHeadersStoppers;
    @Required
    public void setMyList(List<TypeForList> myList) {
        this.myListOfHeadersStoppers = myListOfHeadersStoppers;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants