model-evaluation
Skill135 starsChanged 6 months agoApache-2.0View on GitHub
This skill establishes a standardized framework for evaluating and visualizing machine learning models. It covers simple metrics (like accuracy) for balanced datasets, and advanced metrics (like AUC-PR and Confusion Matrices) for complex or imbalanced datasets (e.g., fraud detection, rare event prediction). - Libraries: matplotlib, seaborn, pandas, numpy, scikit-learn (for local visualization). - Engines: PySpark MLlib or BigQuery ML. When writing evaluation code: 1. Match Complexity: - For simple, balanced classification: Use Accuracy (standard). - For imbalanced classification (e.g., predicting a…
6 other projects use a version of this.
Adopted by
Most recently taken up by
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- scoobydont-666/shared-claude-skillstheir own version, first seen Jul 7, 2026
- mbburabak/mlforgetheir own version, first seen Jun 11, 2026
- param087/agent-ml-skillstheir own version, first seen Jun 6, 2026
- kienbui1995/magic-powerstheir own version, first seen Apr 10, 2026
- awslabs/agent-pluginstheir own version, first seen Feb 25, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- awslabs/agent-plugins★ 910same name
- param087/agent-ml-skills★ 11same name
- cellrishi-code/claude-skills-atlas★ 4same name
- scoobydont-666/shared-claude-skills★ 1same name
- kienbui1995/magic-powers★ 0same name
- mbburabak/mlforge★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- spanner-provisioningSkill
- ad-copywritingSkill
- brand-strategySkill
- platform-specsSkill
- trend-analysisSkill
- video-storytellingSkill
- visual-directionSkill
- ad-copywritingSkill
- brand-strategySkill
- platform-specsSkill
- trend-analysisSkill
- video-storytellingSkill
- visual-directionSkill
- legacy-app-generatorSkill
- ingress2gatewaySkill
- bigframes-bqmlSkill
- pipeline-generatorSkill
- spark-lightning-optimizationSkill
- unified-model-registrySkill
- zero-copy-ingestionSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
When writing evaluation code:
- Very specific: line 31
Local Visualization: If plotting is required, copy a small sample of predictions to local memory using .toPandas() (Spark) or .to_pandas() …
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Model Evaluation, Visualisation & Interpretation
<!--
Disabling markdownlint MD029 to provide explicit ordering to avoid
confusing the LLM.
--><!-- markdownlint-disable MD029 -->1. Description & Rationale
This skill establishes a standardized framework for evaluating and visualizing machine learning models. It covers simple metrics (like accuracy) for balanced datasets, and advanced metrics (like AUC-PR and Confusion Matrices) for complex or imbalanced datasets (e.g., fraud detection, rare event prediction).
2. Environment Prerequisites
- Libraries:
matplotlib,seaborn,pandas,numpy,scikit-learn(for local visualization). - Engines: PySpark MLlib or BigQuery ML.
3. Agent Execution Guidelines (System Prompts)
When writing evaluation code:
- Match Complexity:
- For simple, balanced classification: Use Accuracy (standard).
- For imbalanced classification (e.g., predicting a rare action): Enforce Area Under the Precision-Recall Curve (AUC-PR) and Confusion Matrix.
- Local Visualization: If plotting is required, copy a small sample of
predictions to local memory using
.toPandas()(Spark) or.to_pandas()(BigFrames) only for the visualization step.
4. Opinionated Code Patterns
A. Simple Evaluation (Accuracy)
Spark MLlib
from pyspark.ml.evaluation import MulticlassClassificationEvaluator
# Evaluate accuracy
predictions = pipeline_model.transform(test)
evaluator = MulticlassClassificationEvaluator(metricName="accuracy")
accuracy = evaluator.evaluate(predictions)
print(f"Model Accuracy: {accuracy:.2%}")BigFrames ML
# Score the model (returns a DataFrame with metrics, including accuracy)
metrics = model.score(X_test, y_test)
print("Evaluation Metrics:")
print(metrics)B. Advanced Evaluation (AUC-PR & Confusion Matrix for Imbalanced Data)
Spark MLlib AUC-PR
from pyspark.ml.evaluation import BinaryClassificationEvaluator
# Initialize evaluator for AUC-PR
evaluator = BinaryClassificationEvaluator(
labelCol="label",
rawPredictionCol="probability",
metricName="areaUnderPR"
)
auc_pr = evaluator.evaluate(predictions)
print(f"AUC-PR: {auc_pr:.4f}")Local Confusion Matrix Visualization (Spark or BigFrames)
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.metrics import confusion_matrix
import pandas as pd
# Convert a small sample of predictions to Pandas for plotting
# (Ensure 'predictions' is the evaluated DataFrame)
y_true = predictions.select("label").toPandas()
y_pred = predictions.select("prediction").toPandas()
cm = confusion_matrix(y_true, y_pred)
cm_df = pd.DataFrame(cm, index=['Actual Negative', 'Actual Positive'],
columns=['Predicted Negative', 'Predicted Positive'])
plt.figure(figsize=(6, 5))
sns.heatmap(cm_df, annot=True, fmt='d', cmap='Blues', cbar=False)
plt.title('Confusion Matrix')
plt.ylabel('Actual')
plt.xlabel('Predicted')
plt.show()5. Verification Checklist
- Metric Selection: Verify if the dataset is imbalanced. If yes, ensure AUC-PR is used instead of just accuracy.
- Safe Local Conversion: Confirm that
.toPandas()is only called on the final prediction summary/evaluation set, never on the main training dataset.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

