Toolverse
All skills

custom-distance-metrics

by benchflow-ai

Define custom distance/similarity metrics for clustering and ML algorithms. Use when working with DBSCAN, sklearn, or scipy distance functions with application-specific metrics.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Data Science
Views
2

About this skill

Define custom distance/similarity metrics for clustering and ML algorithms. Use when working with DBSCAN, sklearn, or scipy distance functions with application-specific metrics.

How to use

  1. Zaimportuj DBSCAN z biblioteki sklearn.cluster oraz numpy do obliczeń matematycznych. 2. Zdefiniuj funkcję odległości, która przyjmuje dwa punkty (tablice 1D) i zwraca wartość liczbową reprezentującą odległość między nimi — na przykład metrykę Manhattanu, euklidesową ze zmienionymi wagami lub całkowicie niestandardową. 3. Jeśli chcesz parametryzować metrykę (na przykład różne wagi dla poszczególnych wymiarów), opatrz funkcję odległości w funkcję fabrykującą, która zwraca zamknięcie z ustalonymi parametrami. 4. Przekaż swoją funkcję odległości do DBSCAN poprzez parametr metric, na przykład DBSCAN(eps=10, min_samples=3, metric=my_distance). 5. Uruchom klastrowanie na swoich danych — algorytm będzie używać Twojej metryki do obliczania odległości między wszystkimi punktami. 6. Eksperymentuj z parametrami funkcji odległości (wagami, skalami) i parametrami DBSCAN (eps, min_samples), aby znaleźć konfigurację najlepiej pasującą do Twojego problemu.

Related skills

data-storytelling

by wshobson

Transform data into compelling narratives using visualization, context, and persuasive structure. Use when presenting analytics to stakeholders, creating data reports, or building executive presentations.

Data Science
26105

stock-analyzer

by FrancyJGLisboa

Provides comprehensive technical analysis for stocks and ETFs using RSI, MACD, Bollinger Bands, and other indicators. Activates when user requests stock analysis, technical indicators, trading signals, or market data for specific ticker symbols.

Data Science
23128

codex

by Lucklyric

Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention \

Data Science
16163

moon-dev-trading-agents

by moondevonyt

Master Moon Dev's Ai Agents Github with 48+ specialized agents, multi-exchange support, LLM abstraction, and autonomous trading capabilities across crypto markets

Data Science
102232

docx

by anthropics

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content,

Data Science
39142

market-research-reports

by davila7

Generate comprehensive market research reports (50+ pages) in the style of top consulting firms (McKinsey, BCG, Gartner). Features professional LaTeX formatting, extensive visual generation with scientific-schematics and generate-image, deep integration with research-lookup for

Data Science
16115