.. Silas documentation master file, created by sphinx-quickstart on Mon Nov 19 12:49:44 2018. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. .. _sec-grid-search: 网格搜索 =========== .. toctree:: :maxdepth: 2 :caption: Contents: 内置的网格搜索功能可以使用各种设置在多个数据集上自动运行训练和测试/验证。 .. _sec-gridsearch-settings: 网格搜索设置 ^^^^^^^^^^^^^^^^^^^^ 网格搜索设置指定在网格中搜索的设置和值。这些设置是主设置文件中学习器设置的一个子集。下面是一个关于分类的网格搜索设置的例子:: "mode": "classification", "reduction-strategy": [ "none", "one-vs-rest", "one-vs-one" ], "forest-type": [ "SimpleForest", "ClassicForest", "PrototypeSampleForest" ], "tree-type": [ "RdGreedy1D", "GreedyNarrow1D", "SimpleTreeGrower" ], "number-of-trees": [ 100, 500 ], "sampling-proportion": [ 0.8, 1.0 ], "oob-proportion": [ 0.05, 0.1 ], "max-depth": [ 5, 64 ], "desired-leaf-size": [ 1, 64 ], "feature-proportion": [ "sqrt", "golden", "all", "1/3" ] .. _sec-gen-gridsearch-settings: 自动生成网格搜索设置 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 使用以下命令,自动生成网格搜索设置:: silas gen-gridsearch-settings [OPTIONS] OPTIONS包括: * -h: 打印帮助信息并退出。 * -m mode: 指定一个任务模式。该模式可以是分类的c模式,也可以是回归的r模式。 * -o file_path: 在给定文件中的输出设置。如果没有提供这个选项,网格搜索设置将被存储在grid-search/gridsearch-settings.json。 .. _sec-perform-grid-search: 执行网格搜索 ^^^^^^^^^^^^^^^^^^^ 使用以下命令在多个数据集上运行网格搜索:: silas gridsearch [OPTIONS] [gridsearch-settings-file] [dataset-settings-files...] 其中gridsearch-settings-file是 :ref:`sec-gridsearch-settings` 的文件路径,dataset-settings-files是 :ref:`sec-ml-settings` 数据集的文件路径的列表。网格搜索将在gridsearch-settings-file所在的同一目录中输出(部分)结果。OPTIONS包括: * -h: 打印帮助信息并退出。 * -\\-na/-\\-noauc: 指定不计算ROC-AUC。只适用于分类任务。当数据集有太多的类,并且多类AUC不被用作性能测量时,使用这个标志。 * -c: 从之前未完成的网格搜索继续。假设当前的网格搜索设置与之前的相同,之前的部分搜索结果存储在gridsearch-settings-file所在的目录中。 * -o output_dir: 在output_dir目录中输出网格搜索结果。如果不提供这个选项,网格搜索结果将被存储在gridsearch-settings-file所在的目录中。 .. Indices and tables .. ================== .. * :ref:`genindex` .. * :ref:`modindex` .. * :ref:`search`