Giter Site home page Giter Site logo

Comments (7)

ClaytonTurnerOld avatar ClaytonTurnerOld commented on June 29, 2024

Try going through your main method and seeing where the prints are coming out (maybe add some extra print statements).

If there is a part where it's taking exceedingly long, then check out which function it is by looking at what has printed and what hasn't.

Then try to add some prints inside that function - you'll find a bottleneck and then you can try and tinker with it.

from assignments.

vmanikes avatar vmanikes commented on June 29, 2024

It might have gone into a infinite loop. Please check that

from assignments.

Swapnil2095 avatar Swapnil2095 commented on June 29, 2024

No, it is not going into infinite loop.
I wrote extra doc-tests. Those also giving the right results.

from assignments.

Swapnil2095 avatar Swapnil2095 commented on June 29, 2024

log_wo_set_max_score.txt

See this log file.

If my logic was not right , So how I can get correct partition .

See the result without following function calling --
print('norm_cut scores by max_depth:')
print(score_max_depths(subgraph, range(1,5)))

I think, problem id different here. I sent a mail containing my a1.py file.
So please check once and let me know.

from assignments.

gautammishra avatar gautammishra commented on June 29, 2024

Same here. My program does pass all the doctests but takes 53 minutes to do so.

from assignments.

ClaytonTurnerOld avatar ClaytonTurnerOld commented on June 29, 2024

Again, I'm going to re-suggest my print method from earlier in this thread in order to figure out where your program is taking up all this time.

Find whichever function(s) are doing this, then try to optimize it.

from assignments.

dandandanliu915 avatar dandandanliu915 commented on June 29, 2024

My codes was running very slowly too. But I figured out it is the problem that my bfs method is not the optimal realization of the algorithm. Suggest you can check your bfs first.

from assignments.

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.