Skip to content
Back to skills

Prediction Algorithms

ASecurity

"Choose, configure, fit, and extend Surprise prediction algorithms,

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

Security analysis

A100/100

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

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill prediction-algorithms --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Prediction Algorithms?

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

Security grade badge for Prediction Algorithms
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-prediction-algorithms/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-prediction-algorithms)

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: prediction-algorithms
description: "Choose, configure, fit, and extend Surprise prediction algorithms,
  including baselines, similarities, prediction details, neighbor retrieval, and
  custom AlgoBase subclasses."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Prediction Algorithms

Use this sub-skill when you need to choose a Surprise predictor, tune baseline or similarity options, inspect `Prediction` details, retrieve neighbors, or implement a custom `AlgoBase` subclass.

## Route here

- Pick a built-in algorithm: `NormalPredictor`, `BaselineOnly`, `KNNBasic`, `KNNWithMeans`, `KNNWithZScore`, `KNNBaseline`, `SVD`, `SVDpp`, `NMF`, `SlopeOne`, or `CoClustering`.
- Configure `bsl_options` and `sim_options` for baseline-centric or neighborhood methods.
- Work with `predict()`, `test()`, `Prediction`, and `PredictionImpossible`.
- Call `get_neighbors()` on similarity-based algorithms and convert inner ids back to raw ids when you need to display them.
- Extend `AlgoBase` when the built-ins do not match the target behavior.

## Stay out

- Dataset loading, reader formats, `Trainset` construction, and raw/inner id basics belong in the data-loading sub-skill.
- `cross_validate`, `GridSearchCV`, iterator strategy, and metric orchestration belong in evaluation-and-search.
- Top-N recommendation, precision/recall@k, and dump/load workflows belong in recommendation-and-analysis.

## Start fast

1. Choose the family:
   - `BaselineOnly` if biases are the target.
   - `KNN*` if you want neighborhood aggregation and `actual_k`.
   - `SVD`, `SVDpp`, or `NMF` if you want latent factors.
   - `SlopeOne` or `CoClustering` if you want their specialized rules.
2. Decide whether the algorithm uses `bsl_options`, `sim_options`, both, or neither.
3. Fit on a `Trainset`, then inspect `Prediction.details` from `predict()` or `test()`.
4. Pass inner ids to `get_neighbors()` and expect inner ids back.
5. For custom algorithms, subclass `AlgoBase`, call the base `__init__` and `fit`, then implement `estimate()`.

## Smoke checks

- `python scripts/predict_single_rating_smoke.py`
- `python scripts/baseline_similarity_smoke.py`
- `python scripts/get_neighbors_smoke.py`
- `python scripts/custom_algorithm_smoke.py`

## References

- `references/algorithms.md` covers algorithm families, constructor knobs, fit/predict/test semantics, `Prediction` details, and custom subclass patterns.
- `references/troubleshooting.md` maps common option, neighbor, randomness, and fallback failures to fixes.

Files in this skill

  • SKILL.md2.5 KB
  • references/algorithms.md7 KB
  • references/troubleshooting.md3.6 KB
  • scripts/baseline_similarity_smoke.py2.3 KB
  • scripts/custom_algorithm_smoke.py2.5 KB
  • scripts/get_neighbors_smoke.py2 KB
  • scripts/predict_single_rating_smoke.py1.7 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…