Coder Social home page Coder Social logo

Show a nice report about big_o HOT 7 CLOSED

pberkes avatar pberkes commented on August 16, 2024
Show a nice report

from big_o.

Comments (7)

harisaisundhar avatar harisaisundhar commented on August 16, 2024

Can I be assigned to this ?

from big_o.

pberkes avatar pberkes commented on August 16, 2024

Sure! Would you mind suggesting what the report could look like before implementing? I think it would save some time rather than discuss after the fact

from big_o.

harisaisundhar avatar harisaisundhar commented on August 16, 2024

Sure! The best algo could just be printed as it is. As of the others, we could print a table which has columns [Ranking, Complexities, Time, Residuals] where the rows are sorted on ascending based on their time.

from big_o.

harisaisundhar avatar harisaisundhar commented on August 16, 2024

Also since this print_report function can only be called for the results of big_o function, it would be better to create this function within the big_o() function only, With an introduction of a new default parameter print_report.

By default we could initialise it to False, thus it will not break any current code. Users who needs to get the report can send a parameter with print_report = True to get the reports printed.

Just an idea, does that sound good to you. Or do you have any other ways to achieve this in mind ?

from big_o.

pberkes avatar pberkes commented on August 16, 2024

I'm not fond of that idea, because it leads to an explosion of keyword arguments in the long run. The general principle is to separate calculations and reporting/plotting.

I think the idea would be to write something like

best, others = big_o.big_o(heapify, data_generator_heapify, max_n=10**7)
print(big_o_report(best, others))

and big_o_report returns a nicely formatted string.

big_o_report could live in a new module reports

from big_o.

pberkes avatar pberkes commented on August 16, 2024

Part of this task would also be to add the usage as an example in the documentaion

from big_o.

harisaisundhar avatar harisaisundhar commented on August 16, 2024

Got it! That can be done. Will start working on it. Can I go ahead with the proposed table design for report ?

from big_o.

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.