66

如何使用MLSQL中的帮助指令学习模块的使用

 5 years ago
source link: http://www.jianshu.com/p/e5ab719c3bc8?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

前言

MLSQL 已经实现了文章中描述的功能 如何实现语法的自解释(MLSQL易用性设计有感)

使用方式

在MLSQL中,你只要掌握了load 语法,以及关键词 model ,就可以让你顺利的找到并且学习和使用一个算法或者数据处理模块。

假设你已经会load语法了,以及你知道了关键词 model ,除此之外,你就不知道其信息了,你可能会写出如下的语句:

load  model. `` as output;

恭喜,这个句子也是ok的,我们看看它的输出结果:

ErqMnye.png!web

image.png

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

load model.`list` as outout;

看看:

YrmERja.png!web

image.png

列表非常长,我只想看RandomForest的,应该怎么办呢?我们使用标准的sql语句做个过滤就好。

load model.`list` as model_list;
select * from model_list where lower(name) like "%randomforest%" as output;
JZ3I3mF.png!web

image.png

恩 终于看到RandomForest的详细信息了。 doc字段告诉我们,可以使用

load model.`params` where alg="RandomForest" as output;

看看可以使用的参数。恩 看着参数还挺多:

3AB3eav.png!web

image.png

恩 现在参数看明白了,那我train语法还是不太熟,能不能给个例子呢?上面除了提到可以看参数,还可以看例子,只要用这个指令就行:

load model.`example` where alg="RandomForest" as output;
2qM3Qfr.png!web

image.png

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


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK