Giter VIP home page Giter VIP logo

Comments (5)

oleksandr-pavlyk avatar oleksandr-pavlyk commented on May 17, 2024

It's a matter of implementing __str__ method for the result.

The result may contain the following fields: minimum, maximum, mean, standardDeviation, variance, variation, sum, sumSquared, sumSquaresCentered, secondOrderRawMoment.

I suppose the default 'smart' printing would display min, max, mean and std if available, kind of like summary function does in R.

It makes sense to arrange the data into a table. Perhaps reuse pandas for printing?

How about a code that maps low_order_result to a pandas's dataframe?

from scikit-learn-intelex.

fschlimb avatar fschlimb commented on May 17, 2024

I would like to think about the broader picture. The same 'issue' exists for all results/models.

I suggest adding a __str__ method to all results and models

  • printing attribute names and value for standard/trivial types (integer, str, float etc)
  • printing attribute name and a summary for non-trivial, non-daal types
    • 'array' (or similar), dtype and shape for numpy arrays
    • 'dict' (or alike) and size
    • as far as I can tell there are no other non-trivial, non-daal types used
  • printing attribute name and daal type for daal types (like models)

Attributes which are not expanded (complex and daal types) can be expanded by explicitly printing them.

A conversion to a pandas data-frame seems applicable only in very special cases, like low order moments. A conversion to a dict looks more generic. pandas allows creating DFs from dicts.

@Alexander-Makaryev

from scikit-learn-intelex.

fschlimb avatar fschlimb commented on May 17, 2024

For algorithms we could print the parameters. This is more involved and probably less important.

from scikit-learn-intelex.

triskadecaepyon avatar triskadecaepyon commented on May 17, 2024

Yes, I'll second @fschlimb 's findings. It is mostly about having str methods when looking at a summary, and accessors to the values in the right type when needing a specific one (mean, variance as examples).

from scikit-learn-intelex.

fschlimb avatar fschlimb commented on May 17, 2024

done: generic print capability added for results and model through #48

from scikit-learn-intelex.

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.