Git Product home page Git Product logo

Comments (2)

annahedstroem avatar annahedstroem commented on June 15, 2024

Hi @sallana22

As can be found in the logic of the infidelity metric, it "patches the input" meaning that it expects input data. I think the line:

data_applicability = {DataType.IMAGE, DataType.TIMESERIES, DataType.TABULAR}

may have caused the issue, as our implementation of the infidelity metric does not support tabular data. This is removed in the following commit: 0ef57b6.

The second error appeared as we assumed that the input also had a channel, the docstring includes "Checks if value is smaller than input size, assumes batch and channel first dimension."

I have made changes (see PR #326) and will merge to main branch when the tests branch. Just pull from the main and then check that it is working for you.

from quantus.

sallana22 avatar sallana22 commented on June 15, 2024

Hi @annahedstroem,

Thanks for the quick resolution! I will exclude infidelity analysis on the tabular dataset.

For faithfulness correlation, your changes work but hit an error on asserts.py, line 295. Adding an elif on line 295 as below solves the problem:

if len(x.shape) == 2:
        if value >= np.prod(x.shape[1:]):
            raise ValueError(
                f"'{value_name}' must be smaller than input size."
                f" [{value} >= {np.prod(x.shape[1:])}]"
            )
elif value >= np.prod(x.shape[2:]):    
        raise ValueError(
            f"'{value_name}' must be smaller than input size."
            f" [{value} >= {np.prod(x.shape[2:])}]"
)

The metric evaluation, however, is computationally slow on the complete test set. Evaluating on 10% of records (approx. 500) takes about 30 mins on a 2GHz quad-core cpu.

from quantus.

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.