Giter Club home page Giter Club logo

Comments (4)

felixriese avatar felixriese commented on May 29, 2024

Hi @aspassiani, could you give me an example with small example data?

from susi.

aspassiani avatar aspassiani commented on May 29, 2024

Hi @felixriese, not quite sure the best example to give, but if I were to set weights_per_datapoint and X as random matrixes,

 weights_per_datapoint  =[[8,5,0,4,5,7,0,2,0,2]
                          [4,0,7,4,8,0,4,2,2,8]
                          [5,3,1,2,7,9,9,8,8,7]
                          [8,6,8,7,7,5,4,7,1,1]
                          [6,2,3,5,7,5,9,5,9,0]]

X = [[8,9,7,8,6,3,0,4,1,6]
    [3,2,1,2,5,7,0,0,3,3]
    [0,7,5,1,4,5,7,5,8,5]
    [9,1,1,7,5,9,8,9,3,3]
    [2,7,7,2,3,3,3,3,3,3]]

then,

quantization_errors = np.linalg.norm(np.subtract(weights_per_datapoint, X)) 

would give me a single value of 25.729360660537214 making return np.mean(quantization_errors) unnecessary, whereas,

quantization_errors = np.linalg.norm(np.subtract(weights_per_datapoint, X), axis = 1 ) 

would return a vector of values, [10.9087,12.2066,10,11.0905,13.0767] and a mean of 11.45650021348017.

from susi.

felixriese avatar felixriese commented on May 29, 2024

@aspassiani Thanks for the data! Makes sense. I added a fix in the PR #40. Please have a look

from susi.

aspassiani avatar aspassiani commented on May 29, 2024

The revised quantization error looks correct, thanks!

from susi.

Related Issues (11)

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.