Skip to content

Commit f58c03d

Browse files
committed
ClassificationKNN: remove unnecessary check for ScoreTransform function
1 parent a4363c8 commit f58c03d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

inst/Classification/ClassificationKNN.m

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -897,12 +897,7 @@ function disp (this)
897897

898898
## Apply ScoreTransform (if applicable)
899899
if (! strcmp (this.ScoreTransform, "none"))
900-
f = this.ScoreTransform;
901-
if (! strcmp (class (f), "function_handle"))
902-
error (strcat ("ClassificationKNN.predict: 'ScoreTransform'", ...
903-
" must be a 'function_handle' object."));
904-
endif
905-
scores = f (scores);
900+
scores = this.ScoreTransform (scores);
906901
endif
907902

908903
endfor

0 commit comments

Comments
 (0)