Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get costs at any given iteration #59

Closed
daffidwilde opened this issue Dec 1, 2017 · 3 comments
Closed

Get costs at any given iteration #59

daffidwilde opened this issue Dec 1, 2017 · 3 comments

Comments

@daffidwilde
Copy link
Contributor

daffidwilde commented Dec 1, 2017

I want to visualise the convergence rate of k-modes (and k-prototypes, eventually) by plotting the cost function at each iteration. I've had a look through kmodes.py and I can't see a way of extracting that information directly. Could you suggest a way of going about this?

Thanks,

Henry

@nicodv
Copy link
Owner

nicodv commented Dec 8, 2017

This is not currently supported, but should be an easy fix.

See here: https://github.com/nicodv/kmodes/blob/master/kmodes/kmodes.py#L274

In stead of just storing all_costs[best], we could also store all_costs.

Feel free to make a PR.

@daffidwilde
Copy link
Contributor Author

What I actually mean is that I want to visualise the cost at each epoch within a single run of the algorithm, not just the final cost. Apologies if I am mistaken.

@daffidwilde
Copy link
Contributor Author

Fixed as of #79.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants