Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Enterprise Miner Question - Scoring Node

Reply
New Contributor
Posts: 4

Enterprise Miner Question - Scoring Node

Hi all, I have an issue that may be born of simple ignorance. I am trying to get the Java Scoring Code from a Score Node. The C is there, Java Score is set to Y, but there is simply no option for the actual Java code. So at the moment under Java I am only getting "User-defined Formats" and "File Metadata." Does anyone know where this might be hiding? This is version 6.2 FYI.

 

SAS Employee
Posts: 6

Re: Enterprise Miner Question - Scoring Node

The EM Java scoring code is only available as a .class file. There is no .java file. The "Score Code" in the Results viewer is only a wrapper that calls the  "Java Class" file (DS.class) that does the actual scoring. Note, since the DS.class file is not created using a java compiler it cannot be reliably decompiled.

New Contributor
Posts: 4

Re: Enterprise Miner Question - Scoring Node

Ok, but then I am confused.  If you look at page 20 of https://support.sas.com/documentation/onlinedoc/miner/em121/emcjscore.pdf it specifies:  

 

5.In the Java Score Code window, return to the list box at the bottom and change the setting from Scoring Function Metadata to Score Code.

6. From the Results window main menu, select File Save As and save the file as Score.java in the c:\temp\scorecode\jscore directory that you created at the beginning of this example.

 

So is that right or not?

SAS Employee
Posts: 6

Re: Enterprise Miner Question - Scoring Node

It’s close but it looks like you might have skipped a step in the instructions.

In the Java Score Code window there should be 5 choices in the drop down box.

Scoring Function Metadata

User-defined Formats

Score Code

File Metadata

Java Class

The "Scoring Function Metadata" is an XML description of the models Input variables and Output variables. It is very handy for automating things like choosing what data to feed the model when you run it. 

The "User-defined Formats" is Java code that is often just a stub unless your training data contains user defined formats.

The "Score Code" is Java code that invokes the model that is in the "Java Class".

The "File Metadata" is another XML file that describes the mime types of the other files.

The "Java Class" file is a binary java class file in which the actual model resides.  One way to think of it is as "pre-compiled" java code.

 

The instruction are trying to say ...

Save the "Scoring Function Metadata" as JScore.xml.

Save the "User-defined Formats" as JscoreUserFormats.java.

Save the "Score Code" as Score.java.

Save the "Java Class" as DS.class.

New Contributor
Posts: 4

Re: Enterprise Miner Question - Scoring Node

[ Edited ]

Right, so that is what I am trying to do, but I only get two options in the drop down (please see attachments).  I do not want to use C, but sure, why not?  Except when I go to http://support.sas.com/kb/35/872.html to download cscore.h, the link fails.  FWIW, I strongly prefer Java.  The score node is input from a decision tree, so I am not sure what I am doing wrong to get my only 2 drop downs.


c.PNGjava.PNG
SAS Employee
Posts: 6

Re: Enterprise Miner Question - Scoring Node

Something is definately wrong. You should probably contact SAS Tech Support.

In the mean time can you share a pic of your EM flow and the log from the score node?

SAS Employee
Posts: 6

Re: Enterprise Miner Question - Scoring Node

What operating system is the EM server on?
New Contributor
Posts: 4

Re: Enterprise Miner Question - Scoring Node

The OS is Linux x64.  I think this is the important part of the log:

 

TScore NOTE: Start Java code generation ........
PATHJSCORECODE.sas 1: Could not load class java/lang/Object.
PATHJSCORECODE.sas 1: Could not load class com/sas/ds/DSInterface.
PATHJSCORECODE.sas 1: Could not load class com/sas/ds/DSInterface.
ERROR:  TScore Java code generation failed, attempting error termination.


*------------------------------------------------------------*
* Warning: A problem was encountered while generating the Java score code.
*------------------------------------------------------------*

 

Does this just mean we are missing some kind of config file?

SAS Employee
Posts: 6

Re: Enterprise Miner Question - Scoring Node

I looks like you are going to need Tech Support to figure out how to configure your system correctly. The errors indicate that the DTJ_CLASSPATH was not setup correctly when the system was installed.


Ask a Question
Discussion stats
  • 8 replies
  • 284 views
  • 0 likes
  • 2 in conversation