.. sectionauthor:: Dan Blanchard Utility Scripts =============== In addition to the main script, :doc:`run_experiment `, SKLL comes with a number of helpful utility scripts that can be used to prepare feature files and perform other routine tasks. Each is described briefly below. .. _compute_eval_from_predictions: compute_eval_from_predictions ----------------------------- .. program:: compute_eval_from_predictions Compute evaluation metrics from prediction files after you have run an experiment. Positional Arguments ^^^^^^^^^^^^^^^^^^^^ .. option:: examples_file SKLL input file with labeled examples .. option:: predictions_file file with predictions from SKLL .. option:: metric_names metrics to compute Optional Arguments ^^^^^^^^^^^^^^^^^^ .. option:: --version Show program's version number and exit. ------------------------------------------------------------------------------- .. _filter_features: filter_features --------------- .. program:: filter_features Filter feature file to remove (or keep) any instances with the specified IDs or labels. Can also be used to remove/keep feature columns. .. warning:: Starting with v2.5 of SKLL, the arguments for ``filter_features`` have changed and are no longer backwards compatible with older versions of SKLL. Specifically: #. The input and output files must now be specified with ``-i`` and ``-o`` respectively. #. ``--inverse`` must now be used to invert the filtering command since ``-i`` is used to specify the input file. Required Arguments ^^^^^^^^^^^^^^^^^^ .. option:: -i, --input Input feature file (ends in ``.arff``, ``.csv``, ``.jsonlines``, ``.ndj``, or ``.tsv``) .. option:: -o, --output Output feature file (must have same extension as input file) Optional Arguments ^^^^^^^^^^^^^^^^^^ .. option:: -f >, --feature > A feature in the feature file you would like to keep. If unspecified, no features are removed. .. option:: -I >, --id > An instance ID in the feature file you would like to keep. If unspecified, no instances are removed based on their IDs. .. option:: --inverse Instead of keeping features and/or examples in lists, remove them. .. option:: --id_col Name of the column which contains the instance IDs in ARFF, CSV, or TSV files. (default: ``id``) .. option:: -L