如何使用MLSQL中的帮助指令学习模块的使用
2018-09-15 本文已影响292人
祝威廉
前言
MLSQL 已经实现了文章中描述的功能 如何实现语法的自解释(MLSQL易用性设计有感) 。
使用方式
在MLSQL中,你只要掌握了load 语法,以及关键词model
,就可以让你顺利的找到并且学习和使用一个算法或者数据处理模块。
假设你已经会load语法了,以及你知道了关键词model
,除此之外,你就不知道其信息了,你可能会写出如下的语句:
load model. `` as output;
恭喜,这个句子也是ok的,我们看看它的输出结果:

还不错,我们了解到,算法或者数据处理模块在MLSQL中是使用Train语法,并且里面有文档链接。 如果我想看到所有可用的算法或者数据处理模块,我可以使用
load model.`list` as outout;
看看:

列表非常长,我只想看RandomForest的,应该怎么办呢?我们使用标准的sql语句做个过滤就好。
load model.`list` as model_list;
select * from model_list where lower(name) like "%randomforest%" as output;

恩 终于看到RandomForest的详细信息了。 doc字段告诉我们,可以使用
load model.`params` where alg="RandomForest" as output;
看看可以使用的参数。恩 看着参数还挺多:

恩 现在参数看明白了,那我train语法还是不太熟,能不能给个例子呢?上面除了提到可以看参数,还可以看例子,只要用这个指令就行:
load model.`example` where alg="RandomForest" as output;

真的有实例,恩,复制黏贴改改。 终于搞定。