日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

matlab knnsearchidx,matlab查找最临近搜索knnsearch

發布時間:2025/3/8 循环神经网络 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlab knnsearchidx,matlab查找最临近搜索knnsearch 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

[Idx,D] =?knnsearch(___)?additionally returns the matrix?D, using any of the input arguments in the previous syntaxes.?D?contains the distances between each observation in?Y?and the corresponding closest observations in?X.

使用先前語法中的任何輸入參數返回矩陣D。D包含Y中每個觀測值與X中對應的最近觀測值之間的距離。

舉例:

Load Fisher's iris data set.

load fisheriris

X= meas(:,3:4); %Measurements of original flowers

Y= [5 1.45;6 2;2.75 .75]; % New flower data

Perform a?knnsearch?between?X?and the query points?Y?using Minkowski and Chebychev distance metrics.

使用Minkowski和chebychev距離度量在x和查詢點y之間執行?knnsearch。

[mIdx,mD] = knnsearch(X,Y,'K',10,'Distance','minkowski','P',5);

[cIdx,cD] = knnsearch(X,Y,'K',10,'Distance','chebychev');

Visualize the results of the two nearest neighbor searches. Plot the training data. Plot the query points with the marker X. Use circles to denote the Minkowski nearest neighbors. Use pentagrams to denote the Chebychev nearest neighbors.

可視化兩個最近鄰搜索的結果。繪制訓練數據。用標記x繪制查詢點。用圓表示Minkowski最近的鄰居。用五角星表示切比雪夫最近的鄰居。

gscatter(X(:,1),X(:,2),species);

line(Y(:,1),Y(:,2),'Marker','x','Color','k',...

'Markersize',10,'Linewidth',2,'Linestyle','none');

line(X(mIdx,1),X(mIdx,2),'Color',[.5 .5 .5],'Marker','o',...

'Linestyle','none','Markersize',10);

line(X(cIdx,1),X(cIdx,2),'Color',[.5 .5 .5],'Marker','p',...

'Linestyle','none','Markersize',10);

legend('setosa','versicolor','virginica','query point',...

'minkowski','chebychev','Location','best');

來源:https://ww2.mathworks.cn/help/stats/knnsearch.html?searchHighlight=knnsearch&s_tid=doc_srchtitle

總結

以上是生活随笔為你收集整理的matlab knnsearchidx,matlab查找最临近搜索knnsearch的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。