0

我想用 java 解析一个 pmml 文档,但问题是 pmml 文件需要变量,我找不到任何解决方案如何处理它,我可以用 jframe 创建一个桌面应用程序,它使用文件选择器选择 pmml 文档并使用这个 ppml 文档和解析它?这是一个类似于我的文档的示例:

    <?xml version="1.0" encoding="UTF-8"?><PMML xmlns="http://www.dmg.org/PMML-3_1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.1">
  <Header copyright="Copyright (c) Integral Solutions Ltd., 1994 - 2007. All rights reserved.">
    <Application name="Clementine" version="12.0"/>
    <Annotation>
      <Extension extender="spss" name="Annotation" value="Exported with PMML extensions for use with SPSS SmartScore"/>
</Annotation>
</Header>
  <DataDictionary numberOfFields="4">
    <DataField dataType="integer" name="AGE" optype="continuous">
      <Extension extender="spss" name="storageType" value="numeric"/>
</DataField>
    <DataField dataType="integer" name="ASG" optype="continuous">
      <Extension extender="spss" name="storageType" value="numeric"/>
</DataField>
    <DataField dataType="integer" name="LOS" optype="continuous">
      <Extension extender="spss" name="storageType" value="numeric"/>
</DataField>
    <DataField dataType="double" name="CLAIM" optype="continuous">
      <Extension extender="spss" name="storageType" value="numeric"/>
</DataField>
</DataDictionary>
  <GeneralRegressionModel functionName="regression" modelName="CLAIM" modelType="regression" targetVariableName="CLAIM">
    <MiningSchema>
      <MiningField importance="3.141905e-002" name="AGE" usageType="active"/>
      <MiningField importance="1.106089e-001" name="ASG" usageType="active"/>
      <MiningField importance="8.579721e-001" name="LOS" usageType="active"/>
      <MiningField name="CLAIM" usageType="predicted"/>
</MiningSchema>
    <ParameterList>
      <Parameter label="(Constant)" name="(Constant)"/>
      <Parameter label="AGE" name="AGE"/>
      <Parameter label="ASG" name="ASG"/>
      <Parameter label="LOS" name="LOS"/>
</ParameterList>
    <FactorList/>
    <CovariateList>
      <Predictor name="AGE"/>
      <Predictor name="ASG"/>
      <Predictor name="LOS"/>
</CovariateList>
    <PPMatrix>
      <PPCell parameterName="AGE" predictorName="AGE" value="1"/>
      <PPCell parameterName="ASG" predictorName="ASG" value="1"/>
      <PPCell parameterName="LOS" predictorName="LOS" value="1"/>
</PPMatrix>
    <ParamMatrix>
      <PCell beta="3026.75352256067" df="1" parameterName="(Constant)" targetCategory=""/>
      <PCell beta="-33.4055068465629" parameterName="AGE" targetCategory=""/>
      <PCell beta="417.193612740793" parameterName="ASG" targetCategory=""/>
      <PCell beta="1105.64587462782" parameterName="LOS" targetCategory=""/>
</ParamMatrix>
</GeneralRegressionModel>
</PMML>
4

0 回答 0