@pbx1022:

MAHAL ji022
MAHAL ji022
Open In TikTok:
Region: IN
Friday 25 October 2019 12:34:41 GMT
39
10
0
1

Music

Download

Comments

There are no more comments for this video.
To see more videos from user @pbx1022, please go to the Tikwm homepage.

Other Videos

➡️ Machine Learning from Scratch, part 24: k-nearest neighbors algorithm Our photos are simulated. A small program of ours placed 900 photos from three made-up trips on the same kind of map as in part 17: a city trip, a week on the coast and a mountain hike. 600 come with their trip (250 city, 200 coast, 150 mountains), and 300 more are held back for the test. A few were taken on the drives, and some of those sit among another trip's photos. How it works: A new photo comes in. The program measures its distance to all 600 labeled photos, keeps the k closest and lets them vote with their trips. The most votes win. There is no training step, the program simply keeps every labeled photo. In part 17, k-means had to find the trips without any labels; k-nearest neighbors uses the labels it already has. Our example is a new city photo. Its two closest photos are coast photos snapped on the drive through the city (0.91 and 1.20 km away), the next three are city photos. With k = 5 the vote is 3 city to 2 coast, which is right. With k = 1 it copies the single closest photo and says coast, which is wrong. The test on the 300 held-back photos: k = 1: 285 of 300 right k = 5: 295 of 300 right In all 12 photos that k = 1 gets wrong and k = 5 gets right, the closest photo was an odd one from a drive. The 5 that k = 5 still misses were all taken on a drive, right among another trip's photos. Why it matters: It needs no training and works on any data where similar things sit close together. It is one of the top 10 algorithms in data mining, on the same list as k-means from part 17. Sources: Wu et al.,
➡️ Machine Learning from Scratch, part 24: k-nearest neighbors algorithm Our photos are simulated. A small program of ours placed 900 photos from three made-up trips on the same kind of map as in part 17: a city trip, a week on the coast and a mountain hike. 600 come with their trip (250 city, 200 coast, 150 mountains), and 300 more are held back for the test. A few were taken on the drives, and some of those sit among another trip's photos. How it works: A new photo comes in. The program measures its distance to all 600 labeled photos, keeps the k closest and lets them vote with their trips. The most votes win. There is no training step, the program simply keeps every labeled photo. In part 17, k-means had to find the trips without any labels; k-nearest neighbors uses the labels it already has. Our example is a new city photo. Its two closest photos are coast photos snapped on the drive through the city (0.91 and 1.20 km away), the next three are city photos. With k = 5 the vote is 3 city to 2 coast, which is right. With k = 1 it copies the single closest photo and says coast, which is wrong. The test on the 300 held-back photos: k = 1: 285 of 300 right k = 5: 295 of 300 right In all 12 photos that k = 1 gets wrong and k = 5 gets right, the closest photo was an odd one from a drive. The 5 that k = 5 still misses were all taken on a drive, right among another trip's photos. Why it matters: It needs no training and works on any data where similar things sit close together. It is one of the top 10 algorithms in data mining, on the same list as k-means from part 17. Sources: Wu et al., "Top 10 algorithms in data mining" (2008) #machinelearning #ai #coding #python #numpy

About