DistanceFunction
Nearest等の関数のオプションで,指定された2点間に想定される距離の値を指定する.
詳細
- DistanceFunction->f は,x と y の間に想定される距離がf[x,y]であると指定する.
例題
例 (2)
ChessboardDistanceを使って{5,5}に最も近い点を求める:
Nearest[{{5, 9}, {2, 4}, {3, 8}, {0, 8}, {5, 2}}, {5, 5}, DistanceFunction -> ChessboardDistance]Nearest[{{5, 9}, {2, 4}, {3, 8}, {0, 8}, {5, 2}}, {5, 5}]DiceDissimilarityを使ってブールデータ中のクラスタを求める:
data = {{1, 0}, {0, 1}, {0, 0}, {1, 1}, {1, 1}, {1, 0}, {0, 1}, {0, 1}};FindClusters[data, DistanceFunction -> DiceDissimilarity]FindClusters[data]テクニカルノート
-
▪
- Nearestを使う ▪
- データのクラスタ分割
関連するガイド
-
▪
- 距離と類似度の測定基準 ▪
- クラスタ解析 ▪
- 評価の比較法 ▪
- 質問と評価
テキスト
Wolfram Research (2007), DistanceFunction, Wolfram言語関数, https://reference.wolfram.com/language/ref/DistanceFunction.html.
CMS
Wolfram Language. 2007. "DistanceFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DistanceFunction.html.
APA
Wolfram Language. (2007). DistanceFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DistanceFunction.html
BibTeX
@misc{reference.wolfram_2026_distancefunction, author="Wolfram Research", title="{DistanceFunction}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/DistanceFunction.html}", note=[Accessed: 05-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_distancefunction, organization={Wolfram Research}, title={DistanceFunction}, year={2007}, url={https://reference.wolfram.com/language/ref/DistanceFunction.html}, note=[Accessed: 05-September-2026]}