当然虽然一次跑了三个分类器,但这只是单次,要做批处理这是远远不够的,接下来就要用到一个神器了:kfgroovy。 Knowledge Flow plugin that provides a Knowledge Flow step that wraps around a Groovy script. The plugin generates a fully compilable template Groovy script that implements various Knowledge Flow interfaces. The user can fill in the methods that are necessary to accomplish the desired logic. The script is compiled at runtime and the Groovy component passes incoming events to the script and collects and passes on generated events.
kfgroovy是weka KnowlegeFlow的一个第三方工具,可以写一个脚本来自定义完成KnowlegeFlow欠缺的功能,比如批量加载arff,这样的话不就可以批量跑上边的流程了吗,哈哈
That script is out of date I'm afraid. The Knowledge Flow (engine and GUI) was completely re-written in Weka 3.8.0/3.9.0 and is now more efficient and has a new API. Install the latest version (1.0.14, just released today) of the kfGroovy package via Weka's package manager. This includes two template flows: one for computing learning curves, and a second one that demonstrates loading the ARFF files from a directory. You can find template flows via the templates button (third from the right in the toolbar) in the Knowledge Flow GUI.
Cheers,
Mark.
On 22/06/17, 9:14 PM, "411945935@qq.com" <411945935@qq.com> wrote:
I am a new user of kfgroovy script, I am very excited to know this wonderful tool, I want to learn to use kfgroovy script in weka knowledgeflow, I saw DirectoryLoader.groovy in (http://wiki.pentaho.com/display/DATAMINING/DirectoryLoader.groovy), I put in groovystep dialog and compile it , error with:DirectoryLoader cannot be casted to weka.knowledgeflow.steps.Step, I want to build a IDE of kfgroovy with Eclipse with Maven kfGroovy dependency, but it cannot compile ,cause it just pop out a groovy console like weka groovy console.
could you help me with the eroor and tell me how to build a kfgroovy but not a groovy developing evironment.
其实我之前是想自动在kfgroovy脚本里自动实现两个arff的merge的,但是目前发现weka主界面的Simple CLI是直接可以一条命令实现的:
In the first case ("append"):
java weka.core.Instances append filename1 filename2 > output-file
and the latter case ("merge"):
java weka.core.Instances merge filename1 filename2 > output-file