BookmarkSubscribeRSS Feed
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.


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.




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.


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!




Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 in conversation