FFS模板:日志异常或错误?

韦塞尔韦塞尔 成员职位:537大师
2019年6月编辑 帮助
你好,

我运行Feature Selection模板,查看日志结果,注意到许多“?”(NaN)符号在日志的开头。
所以我对模板做了一些修改,以了解这些'?符号的来源。
但是我无法解释为什么FFS多次运行相同的属性子集,并且每一代都得到不同的性能分数。

日志看起来是这样的:


# FS。性能FS。一代性能。kappa应用模型。applycount FS.feature_names
NaN 0.0 0.0 1.0 ?
NaN 0.0 0.39 2.0 ?
NaN 0.0 0.39 3.0 ?
NaN 0.0 0.0 4.0 ?
NaN 0.0 0.0 5.0 ?
NaN 0.0 0.0 6.0 ?
NaN 0.0 0.0 7.0 ?
NaN 0.0 0.199 8.0 ?
NaN 0.0 0.0 9.0 ?
NaN 0.0 0.0 10.0 ?
NaN 0.0 0.0 11.0 ?
NaN 0.0 0.0 12.0 ?
NaN 0.0 0.0 13.0 ?
NaN 0.0 0.0 14.0 ?
NaN 0.0 0.0 15.0 ?
NaN 0.0 0.0 16.0 ?
0.39 1.0 0.39 17.0工资-公司-1
0.39 1.0 0.39 18.0工资-公司-1
0.39 1.0 0.0 19.0 wage- inc1
0.39 1.0 0.39 20.0工资-1
0.39 1.0 0.196 21.0工资-1
0.39 1.0 0.0 22.0工资-1
0.39 1.0 0.39 23.0工资-1
0.39 1.0 0.39 24.0工资-1
0.39 1.0 0.39 25.0工资-公司-1
0.39 1.0 0.5 26.0工资-1
0.39 1.0 0.0 27.0工资-1
0.39 1.0 0.39 28.0工资指数-1
0.39 1.0 0.39 29.0工资-1
0.39 1.0 0.39 30.0工资-1
0.39 1.0 0.39 31.0工资-1
0.5 2.0 0.5 32.0工资-2,法定假日
0.5 2.0 0.39 33.0工资-2,法定假期
0.5 2.0 0.5 34.0工资-2,法定假日
0.5 2.0 0.5 35.0工资-2,法定假日
工资-2,法定假日
0.5 2.0 0.5 37.0工资-2,法定假日
0.5 2.0 0.5 38.0工资-2,法定假日
0.5 2.0 0.5 39.0工资-2,法定假日
0.5 2.0 0.5 40.0工资-2,法定假日
法定假日工资
0.5 2.0 0.5 42.0工资-2,法定假日
0.5 2.0 0.5 43.0工资-2,法定假日
0.5 2.0 0.5 44.0工资-2,法定假日
0.5 2.0 0.5 45.0工资-2,法定假日
0.5 3.0 0.5 46.0工资-第二,法定假日
0.5 3.0 0.39 47.0工资-第二,法定假期
0.5 3.0 0.5 48.0工资-第二,法定假日
0.5 3.0 0.5 49.0法定节假日工资
0.5 3.0 0.196 50.0工资-第二,法定假日
0.5 3.0 0.5 51.0法定节假日工资
0.5 3.0 0.5 52.0工资-第二,法定假日
0.5 3.0 0.5 53.0法定节假日工资
0.5 3.0 0.5 54.0工资-2,法定节假日
0.5 3.0 0.5 55.0工资-第二,法定假日
0.5 3.0 0.5 56.0工资-第二,法定节假日
0.5 3.0 0.5 57.0工资-第二,法定假日
0.5 3.0 0.5 58.0工资-第二,法定节假日
0.5 4.0 0.5 59.0工资-2,法定假日
工资-2,法定假日
0.5 4.0 0.5 61.0工资-第二,法定假日
0.5 4.0 0.5 62.0工资-2,法定假日
工资-2,法定假日
0.5 4.0 0.5 64.0工资-2,法定假日
0.5 4.0 0.5 65.0工资-第二,法定假日
0.5 4.0 0.5 66.0工资-2,法定假日
0.5 4.0 0.5 67.0工资-第二,法定假日
0.5 4.0 0.5 68.0工资-第二,法定假日
工资-2,法定假日
0.5 4.0 0.5 70.0工资-2,法定假日
法定节假日工资
法定假日工资
法定节假日工资
0.5 5.0 0.5 74.0工资-2,法定假日
法定假日工资
0.5 5.0 0.5 76.0法定节假日工资
法定假日工资
0.5 5.0 0.5 78.0法定节假日工资
法定假日工资
法定假日工资
法定节假日工资
0.5 6.0 0.5 82.0工资-2,法定假日
0.5 6.0 0.39 83.0工资-第二,法定假期
0.5 6.0 0.5 84.0工资-2,法定节假日
0.5 6.0 0.5 85.0工资-第二,法定节假日
0.5 6.0 0.196 86.0工资-2,法定假日
0.5 6.0 0.5 87.0工资-第二,法定假日
0.5 6.0 0.5 88.0工资-2,法定假日
0.5 6.0 0.5 89.0工资-2,法定假日
0.5 6.0 0.5 90.0工资-2,法定假日
0.5 6.0 0.5 91.0工资-第二,法定假日
法定假日工资
0.5 7.0 0.39 93.0工资-2,法定假日
0.5 7.0 0.5 94.0工资-2,法定假日
法定假日工资
0.5 7.0 0.196 96.0工资-2,法定假日
法定假日工资
法定假日工资
0.5 7.0 0.5 99.0法定假日工资
法定假日工资
0.5 8.0 0.5 101.0法定节假日工资
工资-2,法定假日
0.5 8.0 0.5 103.0工资-2,法定假日
0.5 8.0 0.5 104.0工资-2,法定假日
工资-2,法定假日
0.5 8.0 0.5 106.0工资-2,法定假日
工资-2,法定假日
工资-2,法定假日
工资-2,法定节假日
工资-2,法定假日
工资-2,法定节假日
工资-2,法定节假日
工资-2,法定节假日
工资-2,法定节假日
法定节假日工资
0.5 10.0 0.5 116.0工资-2,法定节假日
0.5 10.0 0.39 117.0工资-2,法定假日
0.5 10.0 0.5 118.0工资-第二,法定假日
0.5 10.0 0.5 119.0工资-2,法定假日
0.5 10.0 0.196 120.0工资-2,法定假日
0.5 10.0 0.5 121.0工资-第二,法定假日
0.5 11.0 0.5 122.0工资-2,法定假日
0.5 11.0 0.39 123.0工资-2,法定节假日
0.5 11.0 0.5 124.0工资-2,法定假日
0.5 11.0 0.5 125.0工资-2,法定节假日
0.5 11.0 0.196 126.0工资-2,法定节假日
0.5 12.0 0.5 127.0法定假日工资
0.5 12.0 0.39 128.0工资-2,法定节假日
0.5 12.0 0.5 129.0法定节假日工资
工资-2,法定假日
0.5 13.0 0.5 131.0工资-第二,法定假日
0.5 13.0 0.39 132.0工资-2,法定假日
0.5 13.0 0.196 133.0工资-第二,法定假日
0.5 14.0 0.39 134.0工资-2,法定假日
0.5 14.0 0.196 135.0工资-第二,法定假日
0.39 15.0 0.39 136.0工资-2,法定假日



这是xml文件:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<过程version = " 5.0 " >
> <上下文
<输入>
<位置/ >
输入> < /
< >输出
<位置/ >
<位置/ >
<位置/ >
< / >输出
<宏/ >
> < /上下文

<描述> & lt; p>属性空间的变换可以在某种程度上简化学习,简单的学习方案可以学习复杂的函数。这就是核技巧的基本思想。但是,即使没有基于核的学习方案,也可能需要对特征空间进行变换才能达到良好的学习效果。& lt; / p>& lt; p>RapidMiner提供了几种不同的特征选择、构建和提取方法。这个选择过程(众所周知的前向选择)使用内部交叉验证来进行性能估计。此构建块用于所有候选特征集的适应度评估。由于考虑到某种学习方案的性能,我们将这种类型的过程称为“包装器方法”。 <p>Additionally the process log operator plots intermediate results. You can inspect them online in the Results tab. Please refer to the visualization sample processes or the RapidMiner tutorial for further details.</p> <p> Try the following: <ul> <li>Start the process and change to &quot;Result&quot; view. There can be a plot selected. Plot the &quot;performance&quot; against the &quot;generation&quot; of the feature selection operator.</li> <li>Select the feature selection operator in the tree view. Change the search directory from forward (forward selection) to backward (backward elimination). Restart the process. All features will be selected.</li> <li>Select the feature selection operator. Right click to open the context menu and repace the operator by another feature selection scheme (for example a genetic algorithm).</li> <li>Have a look at the list of the process log operator. Every time it is applied it collects the specified data. Please refer to the RapidMiner Tutorial for further explanations. After changing the feature selection operator to the genetic algorithm approach, you have to specify the correct values. <table><tr><td><icon>groups/24/visualization</icon></td><td><i>Use the process log operator to log values online.</i></td></tr></table> </li> </ul> </p>



< /操作符>

<枚举关键= "分区" >


< /枚举>
< /操作符>







<列出关键= " application_parameters " / >
< /操作符>






< /操作符>


<列出关键= "日志" >
<参数键= " FS。表现“价值= " operator.FS.value.performance " / >
<参数键= " FS。一代”value = " operator.FS.value.generation " / >

<参数键= "性能。AUC " value = " operator.Performance.value.AUC " / >
<参数键= "性能。sens " value = " operator.Performance.value.sensitivity " / >
<参数键= "性能。speci " value = " operator.Performance.value.specificity " / >

<参数键= " J48。looptime " value = " operator.W-J48.value.looptime " / >
<参数键= " FS。feature_names " value = " operator.FS.value.feature_names " / >
< / >列表
< /操作符>










> < /过程
< /操作符>









> < /过程
< /操作符>
> < /过程

答案

  • 土地土地 RapidMiner认证分析师,RapidMiner认证专家,成员职位:2531年独角兽
    你好,
    我猜性能值甚至在设置之前就被记录了。所以NaN标记了一个未知值。我认为这既不是bug也不是日志异常,但如果在其值被记录的操作符内部执行日志记录,则无法避免。因为性能可以在子进程完成时首先知道。因此,超级操作符的日志值必须失败,如果取决于子进程的结果…

    问候,
    塞巴斯蒂安。
  • 韦塞尔韦塞尔 成员职位:537大师
    嗯,

    那么如何解决这个问题呢?

    日志位于流中的最后一个元素。

    也许我需要添加一个宏,找出使用了什么功能名称?
    有这样一个宏观吗?

    属性名,属性数
    ?1
    显然这是错误的,这里有2个属性,但属性名称是1
  • 土地土地 RapidMiner认证分析师,RapidMiner认证专家,成员职位:2531年独角兽
    你好,
    首先,我建议使用前向属性选择(Forward Attribute Selection),因为它比旧的Feature Selection操作符更快、更可靠,可以处理更多的数据。事实上,这只是出于兼容性的原因而保留的……
    在下一次更新中,该操作符将能够提供当前属性作为日志记录的值。但据我所知,在那之前没有解决办法。

    问候,
    塞巴斯蒂安。
  • 韦塞尔韦塞尔 成员职位:537大师
    没有办法记录所使用的当前属性?

    有可能使用groovy脚本来输出这个吗?

    比如写入日志文件:
    属性子集,性能

    我尝试了以下脚本:

    无效日志(def text){
    ouFile = new File("C:/Users/wluijben/Desktop/scriptoutput.txt");
    ouFile << text << '\n';
    }
    日志(“hello world”);

    exampleeset = operator.getInput(exampleeset .class);
    for(属性属性:exampleSet.getAttributes()) {
    String attributeName = attribute.getName();
    日志(attributeName);
    }

    它输出属性名称,但我还不确定如何输出性能。
  • 韦塞尔韦塞尔 成员职位:537大师
    我觉得你应该这么做。

    对于虹膜数据集,它输出:
    1 0.0 0.6 a1
    2 . 0.0 . 0.52
    3 0.0 0.89 a3
    4 0.0 0.93 a4
    5 1.0 0.93 a1 a4
    6 1.0 0.93 a2 a4
    7 1.0 0.93 a3 a4

    有人可以检查如果我做不好的事情,使脚本不必要的缓慢?
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <过程version = " 5.0 " >
    > <上下文
    <输入>
    <位置/ >
    输入> < /
    < >输出
    <位置/ >
    <位置/ >
    <位置/ >
    < / >输出
    <宏/ >
    > < /上下文




    < /操作符>



    < /操作符>

    <枚举关键= "分区" >


    < /枚举>
    < /操作符>







    < /操作符>


    < /操作符>


    <列出关键= " application_parameters " / >
    < /操作符>



    < /操作符>

    <列出关键= "日志" >



    < / >列表
    < /操作符>














    > < /过程
    < /操作符>


    < /操作符>











    > < /过程
    < /操作符>
    > < /过程
  • 土地土地 RapidMiner认证分析师,RapidMiner认证专家,成员职位:2531年独角兽
    你好,
    我不认为这是你的脚本,但脚本一般不是那么快…在我看来没什么问题。

    问候,
    塞巴斯蒂安。
登录注册置评。