Accessing YModel

Read(45) Label: ymodelcli,

1. Download YModel from the following website: http://download.raqsoft.com.cn/ymodel/YModel-install.zip.

 

2. Copy the following jars from YModel’s installation directory into YModel external library folder. The directory containing files of this external library is: installation directory\esProc\extlib\YModelCli. The Raqsoft core jar for this external library is YModelCli.jar.

mining.jar

jackson-dataformat-msgpack-0.8.14.jar

msgpack-0.6.12.jar

msgpack-core-0.8.16.jar

fastjson-1.2.58.jar

jackson-annotations-2.9.6.jar

jackson-core-2.9.6.jar

jackson-databind-2.9.6.jar

jackson-databind-2.9.6-sources.jar

json-lib-1.1-JDK13.jar

gson-2.8.0.jar

commons-math3-3.6.1.jar

commons-io-2.4.jar

commons-logging-1.1.jar

jsoup-1.10.3.jar

lz4-1.3.0.jar

You can download the following jars on the web:

ant-1.8.2.jar

commons-beanutils.jar

commons-lang-2.6.jar

ezmorph-1.0.2.jar

json.jar

Note: The third-party jars are provided within the package and users can choose appropriate ones for specific scenarios.

 

3. Configure necessary parameters in userconfig.xml file under YModel external library folder:

<?xml version="1.0" encoding="UTF-8"?>

<Config Version="1">

<Options>

<!-- YModel directory -->

<Option Name="sAppHome" Value=""/>

<!-- YModel license file -->

<Option Name="sLicenseFile" Value=""/>

<!-- Python path under YModel installation directory --> 

<Option Name="sPythonHome" Value=""/>

<!-- Python service port-->

<Option Name="iPythonServerPort" Value="8510"/>

<!-- Number of Python processes-->

<Option Name="iPythonProcessNumber" Value="2"/>

<!- -Auto-assign value or not --> 

<Option Name="bAutoDecideImpute" Value="true"/>

<!-- Resample multiplier --> 

<Option Name="iResampleMultiple" Value="150"/>

</Options>

</Config>

There’s a bit difference for configuring parameter sPythonHome under Windows and Linux. The configuration path for Windows is [sAppHome]/Python37/python.exe and that for Linux is [sAppHome]/Python37/bin/python3.7.

 

4. A JRE version 1.7 or above is required. The embedded JRE version in esProc is JRE1.6. Users need to install a higher version and configure java_home in the config.txt under installation directory\esProc\bin. If a JDK version 1.7 or above has been chosen when installing esProc, just ignore this step.

 

5. esProc provides a number of library functions - ym_env(), ym_model(), ym_target(), ym_build_model(), ym_result(), and ym_close(),etc. - to access the YModel service. Look up them inHelp-Function referenceto find the uses.