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

DANCo Fast #8

Closed
njcprice opened this issue Jun 7, 2021 · 2 comments
Closed

DANCo Fast #8

njcprice opened this issue Jun 7, 2021 · 2 comments

Comments

@njcprice
Copy link

njcprice commented Jun 7, 2021

Hi,

I noticed in the DANCo.py file that some functions have been commented out which seem to implement a version of FastDANCo. I was wondering if it's safe to uncomment and use these in my code or whether there was a reason as to why they're commented out?

Thanks.

P.S. Great package.

@j-bac
Copy link
Collaborator

j-bac commented Jun 8, 2021

Hi, thanks for using the package !

That is correct, this is a draft for FastDANCo/DANCoFit, which should work but is pending some validation tests, so I kept it commented out.

It is probably best if you generate your own precomputed interpolation files, this way you can pre-train FastDANCo according to your preferred range and coarse-graining of cardinalities and maximum intrinsic dimension.

I reuploaded for you the file skdim.id.DANCoUtils which contains the code to precompute splines. E.g., to train splines for cardinalities between [100, 500] and intrinsic dimension up to 100:

dHat,mu,tau,DANCo_splines = skdim.id.DANCoUtils.DANCoTrain(k=10, D=100, cardinalities=[100,200,500]), iterations=100, save_output_path='')
dHat,mu,tau,DANCo_splines = skdim.id.DANCoUtils.load_DANCoTrain_results(path='')
skdim.id.DANCoUtils.plot_DANCoTrain([100,200,500],dHat,mu,tau,DANCo_splines)

DANCoTrain is the essential line, it will generate 3 .pkl files which you can put in the skdim.id.DANCoFit/ folder

Then you can uncomment lines 205 - 312 and 361 - 367 in skdim.id.DANCo and you should be able to use FastDANCo with

skdim.id.DANCo(ver='DANCoFit')

@njcprice
Copy link
Author

njcprice commented Jun 8, 2021

Thanks so much, man. That's really appreciated.

@j-bac j-bac closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants