BookmarkSubscribeRSS Feed
ty123
Calcite | Level 5

Hi community,

 

I am using SAS EM to build a GBM model, and trying to generate JAVA code directly from the "Score Code Export" Node. According to the documentation EM should be able to achieve such purpose.

Capture.PNG

However, it wasn't clearly stated on how to generate this JAVA scoring code. I have tried checking the "JAVA scoring" option in the "Score" Node, but the exported files from "Score code export" node is still in .sas (and others) format. No JAVA code was generated.

 

Thus, I would appreciate your help on how to generate JAVA scoring code directly from SAS EM, after the "Score" node.

 

Thanks in advance for your help.

 

Best,

Yin

2 REPLIES 2
ledfoot
SAS Employee

The Score Code Export node does not export java code. It only exports SAS code.

 

To get the Score node to generate java code for a supported model, select the score node and in the properties under Score Code Generation set Java Score to Yes and run the Score node.

From that point the step by step instructions are in the document you linked.

Look under Scoring with Java Code and Save and Organize Java Code Component Files.

 

ty123
Calcite | Level 5

Hi ledfoot, 

 

Thanks for the response! I followed your instruction and I was able to generate the JAVA code.

 

However, it seems that the JAVA scoring code of my GBM model cannot be compiled correctly - it seems that the DS.class file is too large and throws this error: 

Exception in thread "main" java.lang.ClassFormatError: Invalid method Code length 301529 in class file eminer/user/Score/DS

 

Does this mean that my GBM model is too large? Parameters for my GBM: iterations=20, max split=2, max depth=6, min category size=10, categorical bin=30, # of bin for interval=10.

 

Are there any ways to fix this problem? (e.g., reduce the size of JAVA code? reduce the depth of trees?)

 

Thank you in advance for your time and help!

 

Best,

Yin

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1488 views
  • 0 likes
  • 2 in conversation