Skip to content
Back to skills

Evaluation And Search

ASecurity

"Evaluate Surprise predictions, cross-validate algorithms, split

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
datapythonrustgoshellexpressdebuggingapiperformancedocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill evaluation-and-search --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Evaluation And Search?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Evaluation And Search
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-evaluation-and-search/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-evaluation-and-search)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: evaluation-and-search
description: "Evaluate Surprise predictions, cross-validate algorithms, split
  data, tune hyperparameters, inspect cv_results, and run the Surprise CLI."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Evaluation and search

Use this sub-skill when a future agent must score Surprise predictions, build train/test or cross-validation splits, run `cross_validate`, tune algorithms with `GridSearchCV` or `RandomizedSearchCV`, inspect `cv_results`, or evaluate a dataset from the `surprise` command line.

## Boundaries

In scope:
- `surprise.accuracy.rmse`, `mse`, `mae`, and `fcp` on `Prediction` lists.
- `train_test_split`, `KFold`, `ShuffleSplit`, `RepeatedKFold`, `LeaveOneOut`, and `PredefinedKFold`.
- `cross_validate` and the minimal `fit_and_score` semantics needed to reason about returned measures and timings.
- `GridSearchCV`, `RandomizedSearchCV`, `best_score`, `best_params`, `best_estimator`, `best_index`, and `cv_results`.
- A safe unbiased tuning/evaluation split workflow.
- The `surprise` CLI for evaluation on built-in, custom-file, or predefined-fold datasets.

Out of scope:
- Algorithm internals, baseline formulas, and similarity formulas. For algorithm choice or options, use the sibling [prediction-algorithms](../prediction-algorithms/) sub-skill.
- Dataset parsing depth, raw/inner id conversion, and built-in dataset cache management. For those, use the sibling [data-loading](../data-loading/) sub-skill.
- Top-N recommendation, precision/recall@k, dump/load, and exported prediction analysis. Use the sibling [recommendation-and-analysis](../recommendation-and-analysis/) sub-skill.
- Benchmark table generation, documentation table generation, notebooks, and maintainer “run all examples” harnesses; they are not runtime evaluation paths.

## Read path

1. Start with [references/evaluation.md](references/evaluation.md) for API workflows and code templates.
2. Read [references/cli-reference.md](references/cli-reference.md) for `surprise` command-line evaluation and safe quoting.
3. Read [references/troubleshooting.md](references/troubleshooting.md) when a split, metric, search, or CLI call fails.
4. Use the bundled scripts as tiny, deterministic smoke checks when validating an environment or demonstrating a workflow:
   - `python scripts/cross_validate_smoke.py`
   - `python scripts/cv_iterators_smoke.py`
   - `python scripts/grid_search_smoke.py`
   - `python scripts/unbiased_split_smoke.py`
   - `python scripts/cli_eval_smoke.py`

The scripts create temporary local rating files and do not download built-in datasets.

## Task routing quick map

| User task | Use | Key reference |
| --- | --- | --- |
| “Compute RMSE/MAE/MSE/FCP for predictions” | `accuracy.<metric>(predictions, verbose=False)` | [Metrics](references/evaluation.md#metrics) |
| “Split once into train/test” | `train_test_split(data, test_size=..., random_state=...)` | [One train/test split](references/evaluation.md#one-train-test-split) |
| “Run k-fold CV” | `cross_validate(algo, data, cv=KFold(...), measures=[...])` | [Cross-validation](references/evaluation.md#cross-validation) |
| “Manually control folds” | Iterate `for trainset, testset in cv.split(data)` | [CV iterators](references/evaluation.md#cv-iterators) |
| “Tune hyperparameters” | `GridSearchCV` or `RandomizedSearchCV` | [Search](references/evaluation.md#hyperparameter-search) |
| “Inspect all grid-search results” | `gs.cv_results`, optionally `pandas.DataFrame.from_dict` | [cv_results](references/evaluation.md#cv_results-guide) |
| “Tune, then report unbiased performance” | Hold out raw ratings before search; fit on tuning set; test on untouched holdout | [Unbiased split](references/evaluation.md#unbiased-tuning-and-evaluation-split) |
| “Evaluate from shell” | `surprise -algo ... -load-custom ... -reader ... -n-folds ...` | [CLI reference](references/cli-reference.md) |

## Safety notes

- Prefer local files, dataframes, or predefined folds for examples and tests. `Dataset.load_builtin()` may prompt for or download data if the cache is missing.
- Keep `n_jobs=1` while debugging custom algorithms, tiny examples, or failures; increase parallelism only after a serial run is correct.
- Use explicit `random_state` or CLI `-seed` for reproducible folds and algorithm initialization.
- The CLI evaluates Python expressions supplied to `-params` and `-reader`. Only pass trusted strings.
- Search objects expose `test()` and `predict()` only when `refit` is enabled; without `refit`, manually fit `best_estimator[measure]` before using it.

Files in this skill

  • SKILL.md4.5 KB
  • references/cli-reference.md4.7 KB
  • references/evaluation.md13.3 KB
  • references/troubleshooting.md6.6 KB
  • scripts/cli_eval_smoke.py2.5 KB
  • scripts/cross_validate_smoke.py2.1 KB
  • scripts/cv_iterators_smoke.py3.4 KB
  • scripts/grid_search_smoke.py2.8 KB
  • scripts/unbiased_split_smoke.py2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.