Orange: Neighbors

From OnnoWiki
Revision as of 10:53, 2 February 2020 by Onnowpurbo (talk | contribs) (→‎Contoh)
Jump to navigation Jump to search

Sumber: https://docs.biolab.si//3/visual-programming/widgets/data/neighbors.html

Hitung tetangga terdekat dalam data sesuai dengan referensi.

Input

Data: An input data set.
Reference: A reference data for neighbor computation.

Output

Neighbors: A data table of nearest neighbors according to reference.

Neighbors widget menghitung tetangga terdekat untuk referensi yang diberikan dan untuk ukuran jarak tertentu. Referensi dapat berupa satu atau lebih instance. Dalam kasus dengan satu widget referensi, output terdekat n contoh dari data di mana n diatur oleh opsi Number of neighbors option pada widget. Ketika referensi mengandung lebih banyak instance widget menghitung jarak gabungan untuk setiap instance data sebagai jarak minimum untuk setiap referensi. Output widget dan instance data dengan jarak gabungan terendah.

Neighbours-stamped.png
  • Distance measure for computing neighbors. Supported measures are: Euclidean, Manhattan, Mahalanobis, Cosine, Jaccard, Spearman, absolute Spearman, Pearson, absolute Pearson.
  • Number of neighbors on the output.
  • If Exclude rows (equal to) references is ticked, data instances that are highly similar to the Reference (distance < 1e-5), will be excluded.
  • Click Apply to commit the changes. To communicate changes automatically tick Apply Automatically.
  • Status bar with access to widget help and information on the input and output data.

Contoh

Pada contoh pertama, kita menggunakan data iris dan meneruskannya ke Neighbors dan Data Table. Dalam Tabel Data, kita memilih contoh iris, yang akan berfungsi sebagai referensi kita, artinya kita ingin mengambil 10 contoh terdekat ke instance data terpilih. Kita menghubungkan Data Table ke Neighbors juga.

Kita dapat mengamati hasil neighbor computation di Data Table (1), di mana kita dapat melihat 10 gambar terdekat dengan bunga iris pilihan kita.

Neighbours-example1.png

Now change the selection Data Table to multiple examples. As a result, we get instances with closest combined distances to the references. The method computes the combined distance as a minimum of distances to each reference.

Neighbours-example-multiple.png

Another example requires the installation of Image Analytics add-on. We loaded 15 paintings from famous painters with Import Images widget and passed them to Image Embedding, where we selected Painters embedder.

Then the procedure is the same as above. We passed embedded images to Image Viewer and selected a painting from Monet to serve as our reference image. We passed the image to Neighbors, where we set the distance measure to cosine, ticked off Exclude reference and set the neighbors to 2. This allows us to find the actual closest neighbor to a reference painting and observe them side by side in Image Viewer (1).

Neighbours-example2.png

Referensi

Pranala Menarik