技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
evaluation-and-search【数据与研究】Evaluate Surprise predictions, cross-validate algorithms, split data, tune hyperparameters, inspect cv_results, and run the Surprise CLI.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
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.surprise CLI for evaluation on built-in, custom-file, or predefined-fold datasets.Out of scope:
surprise command-line evaluation and safe quoting.python scripts/cross_validate_smoke.pypython scripts/cv_iterators_smoke.pypython scripts/grid_search_smoke.pypython scripts/unbiased_split_smoke.pypython scripts/cli_eval_smoke.pyThe scripts create temporary local rating files and do not download built-in datasets.
| User task | Use | Key reference |
|---|---|---|
| “Compute RMSE/MAE/MSE/FCP for predictions” | accuracy.<metric>(predictions, verbose=False) | Metrics |
| “Split once into train/test” | train_test_split(data, test_size=..., random_state=...) | One train/test split |
| “Run k-fold CV” | cross_validate(algo, data, cv=KFold(...), measures=[...]) | Cross-validation |
| “Manually control folds” | Iterate for trainset, testset in cv.split(data) | CV iterators |
| “Tune hyperparameters” | GridSearchCV or RandomizedSearchCV | Search |
| “Inspect all grid-search results” | gs.cv_results, optionally pandas.DataFrame.from_dict | cv_results |
| “Tune, then report unbiased performance” | Hold out raw ratings before search; fit on tuning set; test on untouched holdout | Unbiased split |
| “Evaluate from shell” | surprise -algo ... -load-custom ... -reader ... -n-folds ... | CLI reference |
Dataset.load_builtin() may prompt for or download data if the cache is missing.n_jobs=1 while debugging custom algorithms, tiny examples, or failures; increase parallelism only after a serial run is correct.random_state or CLI -seed for reproducible folds and algorithm initialization.-params and -reader. Only pass trusted strings.test() and predict() only when refit is enabled; without refit, manually fit best_estimator[measure] before using it.