필터 지우기
필터 지우기

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 CenterFile Exchange에서 Statistics 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