Mars clouds clustering

From XuShuwenn/RedAct · View interactive version

Mars clouds clustering is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Optimize DBSCAN hyperparameters to find Pareto frontier of F1 score and centroid delta for Mars cloud annotations.

How to use this skill

Skill file

Mars Cloud Clustering with DBSCAN

When to Use

Proven default workflow:

  1. Inspect both CSVs first to confirm the real schema and image/group key.
  2. Implement the full optimization in one reproducible script.
  3. Run a small end-to-end smoke test before the full sweep.
  4. Execute the full search.
  5. Open /root/pareto_frontier.csv after completion and verify the written artifact directly.

Input Data

Before coding, inspect the real CSV headers and sample rows from both files. If the files do not literally contain file_rad, x, and y, reconcile the actual schema first (for example, determine which column identifies the image and whether coordinates need renaming or extraction) before implementing clustering logic. If any logic depends on filename/path structure in file_rad, derive it from observed sample rows rather than assumptions.

Practical first-pass sequence:

  1. List the data directory and confirm both CSV paths exist.
  2. Inspect header plus a few real rows from each CSV.
  3. Verify required analysis libraries import successfully (pandas, numpy, sklearn/DBSCAN) before committing to the implementation approach.
  4. Record row counts before writing the main script.
  5. Only then map identifier/coordinate columns and implement the pipeline.

Minimum schema/alignment check before coding:

Practical pre-run gate:

Hyperparameter Search

Grid search over:

Before launching the full 847-combination sweep, run a small timing check on a few combinations. If runtime looks poor, restructure first rather than starting a long unattended run.

Custom Distance Metric

DBSCAN uses:

d(a,b) = sqrt((w*Δx)² + ((2-w)*Δy)²)

Implementation guidance:

Evaluation Per Combination

  1. Run DBSCAN on citizen science points per image
  2. Match clusters to expert annotations (greedy, max 100px)
  3. Compute F1 and average delta (Euclidean distance)
  4. Only keep results with F1 > 0.5

Additional required rules:

Validate the implementation against the spec before trusting results:

Output

/root/pareto_frontier.csv:

F1,delta,min_samples,epsilon,shape_weight

Before declaring completion, verify /root/pareto_frontier.csv was actually written, is non-empty, and is specification-compliant:

Use direct artifact inspection after execution: read the written CSV itself, confirm row count is greater than zero, and inspect the header plus sample data rows before concluding the task succeeded.

New Section

Execution Discipline

Protocol-first rules:

Critical protocol and evidence checklist:

Mandatory pre-final checklist:

  1. Confirm every tool/action used the exact required interface for this environment.

1a. Confirm the final response will be the exact required completion string if one is specified (for example, a bare token with no surrounding prose).

  1. If a script was written, inspect the actual saved contents before execution.
  2. Run the script using its exact path.
  3. Wait for completion rather than stopping at monitoring output.
  4. Verify /root/pareto_frontier.csv exists, is non-empty, and matches the spec.
  5. Emit any required final completion text verbatim.
  1. Do not stop at partial progress or monitoring output; continue until the main run finishes and the required artifact has been directly verified.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.