Difference between revisions of "Orange: Neighbors"

From OnnoWiki
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Sumber: https://docs.biolab.si//3/visual-programming/widgets/data/neighbors.html
 
Sumber: https://docs.biolab.si//3/visual-programming/widgets/data/neighbors.html
  
 +
Widget Neighbors menghitung tetangga terdekat dalam data sesuai dengan referensi.
  
 +
==Input==
  
Compute nearest neighbors in data according to reference.
+
Data: An input data set.
 +
Reference: A reference data for neighbor computation.
  
Inputs
+
==Output==
  
    Data: An input data set.
+
Neighbors: A data table of nearest neighbors according to reference.
    Reference: A reference data for neighbor computation.
 
  
Outputs
+
Widget Neighbors menghitung tetangga terdekat untuk referensi yang diberikan dan untuk ukuran jarak tertentu. Referensi dapat berupa satu atau lebih instance. Dalam kasus dengan satu referensi, widget Neighbors output n instance dari data di mana n diatur oleh opsi Number of neighbors pada widget Neighbors. Ketika referensi mengandung lebih banyak instance, widget Neighbors menghitung jarak gabungan untuk setiap instance data sebagai jarak minimum untuk setiap referensi. Widget Neighbors akan menghasilkan n instance data dengan jarak gabungan terendah.
 
 
    Neighbors: A data table of nearest neighbors according to reference.
 
 
 
The Neighbors widget computes nearest neighbors for a given reference and for a given distance measure. The reference can be either one instance or more instances. In the case with one reference widget outputs closest n instances from data where n is set by the Number of neighbors option in the widget. When reference contains more instances widget computes the combined distance for each data instance as a minimum of distances to each reference. Widget outputs n data instances with lowest combined distance.
 
  
 
[[File:Neighbours-stamped.png|center|200px|thumb]]
 
[[File:Neighbours-stamped.png|center|200px|thumb]]
  
    Distance measure for computing neighbors. Supported measures are: Euclidean, Manhattan, Mahalanobis, Cosine, Jaccard, Spearman, absolute Spearman, Pearson, absolute Pearson.
+
* 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.
+
* 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.
+
* 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.
+
* 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.
+
* Status bar with access to widget help and information on the input and output data.
  
 
==Contoh==
 
==Contoh==
  
In the first example, we used iris data and passed it to Neighbors and to Data Table. In Data Table, we selected an instance of iris, that will serve as our reference, meaning we wish to retrieve 10 closest examples to the select data instance. We connect Data Table to Neighbors as well.
+
Pada contoh ini, kita menggunakan data iris dan meneruskannya ke widget Neighbors dan widget Data Table. Dalam widget Data Table, kita memilih contoh iris, yang akan berfungsi sebagai referensi kita, artinya kita ingin mengambil 10 contoh terdekat ke instance data terpilih. Kita menghubungkan widget Data Table ke widget Neighbors juga.
 
 
We can observe the results of neighbor computation in Data Table (1), where we can see 10 closest images to our selected iris flower.
 
 
 
[[File:Neighbours-example1.png|center|200px|thumb]]
 
  
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.
+
Kita dapat mengamati hasil neighbor computation di widget Data Table (1), di mana kita dapat melihat 10 gambar terdekat dengan bunga iris pilihan kita.
  
[[File:Neighbours-example-multiple.png|center|200px|thumb]]
+
[[File:Neighbours-example1.png|center|600px|thumb]]
  
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.
+
Sekarang ubah selection pada widget Data Table menjadi multiple examples. Sebagai hasilnya, kita mendapatkan instance dengan jarak gabungan terdekat ke referensi. Metode ini menghitung jarak gabungan sebagai jarak minimum untuk setiap referensi.
  
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).
+
[[File:Neighbours-example-multiple.png|center|600px|thumb]]
  
[[File:Neighbours-example2.png|center|200px|thumb]]
+
Contoh ini, kita membutuhkan tambahan add-on Image Analytics. Kita me-load 15 lukisan dari pelukis terkenal dengan widget Import Images dan menyerahkannya ke widget Image Embedding, dimana kita memilih Painter.
  
 +
Maka prosedurnya sama seperti di atas. Kita meneruskan embedded images ke widget Image Viewer dan memilih lukisan dari Monet untuk dijadikan gambar referensi kita. Kita meneruskan gambar ke widget Neighbors, tempat kita mengatur ukuran jarak ke cosinus, menandai agar exclude dari referensi dan menset ke neighbour ke 2. Ini memungkinkan kita untuk menemukan actual closest neighbor dengan lukisan referensi dan mengamati mereka berdampingan di widget Image Viewer (1).
  
 +
[[File:Neighbours-example2.png|center|600px|thumb]]
  
 
==Referensi==
 
==Referensi==

Latest revision as of 11:24, 20 April 2020

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

Widget Neighbors menghitung 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.

Widget Neighbors menghitung tetangga terdekat untuk referensi yang diberikan dan untuk ukuran jarak tertentu. Referensi dapat berupa satu atau lebih instance. Dalam kasus dengan satu referensi, widget Neighbors output n instance dari data di mana n diatur oleh opsi Number of neighbors pada widget Neighbors. Ketika referensi mengandung lebih banyak instance, widget Neighbors menghitung jarak gabungan untuk setiap instance data sebagai jarak minimum untuk setiap referensi. Widget Neighbors akan menghasilkan n 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 ini, kita menggunakan data iris dan meneruskannya ke widget Neighbors dan widget Data Table. Dalam widget Data Table, kita memilih contoh iris, yang akan berfungsi sebagai referensi kita, artinya kita ingin mengambil 10 contoh terdekat ke instance data terpilih. Kita menghubungkan widget Data Table ke widget Neighbors juga.

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

Neighbours-example1.png

Sekarang ubah selection pada widget Data Table menjadi multiple examples. Sebagai hasilnya, kita mendapatkan instance dengan jarak gabungan terdekat ke referensi. Metode ini menghitung jarak gabungan sebagai jarak minimum untuk setiap referensi.

Neighbours-example-multiple.png

Contoh ini, kita membutuhkan tambahan add-on Image Analytics. Kita me-load 15 lukisan dari pelukis terkenal dengan widget Import Images dan menyerahkannya ke widget Image Embedding, dimana kita memilih Painter.

Maka prosedurnya sama seperti di atas. Kita meneruskan embedded images ke widget Image Viewer dan memilih lukisan dari Monet untuk dijadikan gambar referensi kita. Kita meneruskan gambar ke widget Neighbors, tempat kita mengatur ukuran jarak ke cosinus, menandai agar exclude dari referensi dan menset ke neighbour ke 2. Ini memungkinkan kita untuk menemukan actual closest neighbor dengan lukisan referensi dan mengamati mereka berdampingan di widget Image Viewer (1).

Neighbours-example2.png

Referensi

Pranala Menarik