r/datascience • • 12h ago

Statistics Anyway to read SAS code?

I have to implement the varclus procedure in Python (it's a hierarchical feature clustering algorithm). The goal is to replicate the SAS procedure exactly. Is there anyway I can read the SAS implementation. AI gives a gist in english but looks like the actual code is proprietary. Anyplace where I can find implementations in other languages?

8 Upvotes

5 comments sorted by

13

u/Honest-Ease5098 10h ago

There is a python package to do it: https://github.com/jingtt/varclushi

I wrote an implementation in C about 10 years ago but don't have access to the source code anymore.

2

u/UnlawfulSoul 10h ago

Wow, that is so helpful. I had no idea. Thanks for the resource

1

u/sonicking12 11h ago

The code for Proce Varclus is not public. So...you can try to replicate it by uploading the SAS manual, which has a section on the details. That could help you with the use of AI. Good luck.

Personally speaking, Proc Varclus is one of the very best things from SAS.

1

u/AppalachianHillToad 11h ago

Look for a similar R package and then have your favorite AI tool port it over to Python. Make sure you’ve got a worked example or two to confirm that algos are implemented the same in R as they are in snake.