Code Monkey home page Code Monkey logo

Comments (6)

rasbt avatar rasbt commented on August 25, 2024

Hm, that's weird ... Do you have a example snippet to reproduce this issue?

from mlxtend.

spate141 avatar spate141 commented on August 25, 2024

cmt = confusion_matrix of 1000x1000 <type 'numpy.ndarray'>

and here the part where I am trying to save plot:

fig, ax = plot_confusion_matrix(conf_mat=cmt, figsize=(50,50))
fig.savefig('results.jpg')

from mlxtend.

rasbt avatar rasbt commented on August 25, 2024

50 x 50 is pretty large. Technically, it should work, but maybe that's why it's eating up your memory. For debugging purposes, could you try figsize=(10,10) or so?

from mlxtend.

spate141 avatar spate141 commented on August 25, 2024

Same thing.. segmentation fault with (10,10) and or with default values of (2.5, 2.5)!

from mlxtend.

rasbt avatar rasbt commented on August 25, 2024

Hm, I believe that's due to the many text labels in the plot (1000 * 1000 = 1,000,000); it's probably more than matplotlib can handle on a desktop computer. E.g., if I am just trying to execute the following, I get a similar memory prob:

import numpy as np
import matplotlib.pyplot as plt

ary = (np.random.sample((1000, 1000)) * 1000).astype(int)
plt.table(cellText=ary, loc='center')
plt.show()

I don't have a good solution for that in mind, unfortunately.

from mlxtend.

spate141 avatar spate141 commented on August 25, 2024

Aha.. I see. Anyway, thank you for the quick replies.

from mlxtend.

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.