フィルターのクリア

how to determining threshold distance using knn

4 ビュー (過去 30 日間)
merlin toche
merlin toche 2023 年 1 月 29 日
Hello everyone
please i still need you
I want to detect defects and classify them using the kNN rule. however with your help I understood a lot about knn.
now i would like to know how to set distance threshold (euclidean).
example Detection rule:
Unclassified incoming sample,Find its nearest neighbor from the training sample,Calculate its distance kNN squared for each sample. Squared kNN distance < threshold, then sample labeled as normal otherwise defective. we can set a threshold with a certain level and the unclassified sample is considered normal if its distance to its nearest neighboring training sample is less than the threshold otherwise the sample is detected as defective. can anyone help me out?. the nominal data belongs to the class
NB: does classification take the place of detection? attached my code, my data (i have 5 class)

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by