SlideShare una empresa de Scribd logo
© SuperDataScience
Machine Learning A-Z
Idea de K-NN
© SuperDataScience
Machine Learning A-Z
¿Qué son los K-NN?
Antes de K-NN
Categoría 1
Categoría 2
x1
X2
© SuperDataScience
Machine Learning A-Z
¿Qué son los K-NN?
Nuevo dato
Antes de K-NN
Categoría 1
Categoría 2
x1
X2
© SuperDataScience
Machine Learning A-Z
¿Qué son los K-NN?
Después de K-NN
Nuevo dato asignado
a Categoría 1
K-NN
Categoría 1
Categoría 2
x1
x2
Nuevo dato
Antes de K-NN
Categoría 1
Categoría 2
x1
X2
© SuperDataScience
Machine Learning A-Z
¿Cómo lo hace?
PASO 1: Elegir el número K de vecinos
PASO 2: Tomar los K vecinos más cercanos del nuevo dato, según la distancia Euclídea
PASO 3: Entre esos K vecinos, contar el número de puntos que pertenecen a cada categoría
PASO 4: Asignar el nuevo dato a la categoría con más vecinos en ella
Nuestro modelo está listo
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 1: Elegir el número K de vecinos: K = 5
Nuevo dato
Categoría 1
Categoría 2
x1
x2
© SuperDataScience
Machine Learning A-Z
Distancia Euclidiana
x
y
P1(x1,y1)
P2(x2,y2)
x2
x1
y2
y1
Distancia Euclidiana entre P1 y P2
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 2: Tomar los K = 5 vecinos más cercanos del nuevo dato,
según la distancia Euclidiana
Nuevo dato
Categoría 1
Categoría 2
x1
x2
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 2: Tomar los K = 5 vecinos más cercanos del nuevo dato,
según la distancia Euclidiana
Nuevo dato
Categoría 1
Categoría 2
x1
x2
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 3: De entre esos K vecinos, contar el número de puntos de cada categoría
Nuevo dato
Categoría 1
Categoría 2
x1
x2
Categoría 1: 3 vecinos
Categoría 2: 2 vecinos
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 4: Asignar el nuevo dato a la categoría con más vecinos
Nuevo dato
Categoría 1
Categoría 2
x1
x2
Categoría 1: 3 vecinos
Categoría 2: 2 vecinos
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 4: Asignar el nuevo dato a la categoría con más vecinos
Nuevo dato
Categoría 1
Categoría 2
x1
x2
Categoría 1: 3 vecinos
Categoría 2: 2 vecinos
© SuperDataScience
Machine Learning A-Z
Algoritmo de los K-NN
PASO 4: Asignar el nuevo dato a la categoría con más vecinos
Nuevo dato
Categoría 1
Categoría 2
Nuestro modelo está listo x1
x2
Categoría 1: 3 vecinos
Categoría 2: 2 vecinos

Más contenido relacionado

Último

Projecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdf
Projecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdfProjecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdf
Projecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdf
Festibity
 
TIC en educacion.rtf.docxlolololololololo
TIC en educacion.rtf.docxlolololololololoTIC en educacion.rtf.docxlolololololololo
TIC en educacion.rtf.docxlolololololololo
KukiiSanchez
 
Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...
Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...
Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...
AMADO SALVADOR
 
Computacion cuántica y sus ventajas y desventajas
Computacion cuántica y sus ventajas y desventajasComputacion cuántica y sus ventajas y desventajas
Computacion cuántica y sus ventajas y desventajas
sofiahuarancabellido
 
mantenimiento de chasis y carroceria1.pptx
mantenimiento de chasis y carroceria1.pptxmantenimiento de chasis y carroceria1.pptx
mantenimiento de chasis y carroceria1.pptx
MiguelAtencio10
 
Presentación Seguridad Digital Profesional Azul Oscuro (1).pdf
Presentación Seguridad Digital Profesional Azul Oscuro (1).pdfPresentación Seguridad Digital Profesional Azul Oscuro (1).pdf
Presentación Seguridad Digital Profesional Azul Oscuro (1).pdf
giampierdiaz5
 
edublogs info.docx asdasfasfsawqrdqwfqwfqwfq
edublogs info.docx asdasfasfsawqrdqwfqwfqwfqedublogs info.docx asdasfasfsawqrdqwfqwfqwfq
edublogs info.docx asdasfasfsawqrdqwfqwfqwfq
larapalaciosmonzon28
 
El uso de las TIC por Cecilia Pozos S..pptx
El uso de las TIC  por Cecilia Pozos S..pptxEl uso de las TIC  por Cecilia Pozos S..pptx
El uso de las TIC por Cecilia Pozos S..pptx
cecypozos703
 
Informació Projecte Iniciativa TIC HPE.pdf
Informació Projecte Iniciativa TIC HPE.pdfInformació Projecte Iniciativa TIC HPE.pdf
Informació Projecte Iniciativa TIC HPE.pdf
Festibity
 
Sitios web 3.0 funciones ventajas y desventajas
Sitios web 3.0 funciones ventajas y desventajasSitios web 3.0 funciones ventajas y desventajas
Sitios web 3.0 funciones ventajas y desventajas
paulroyal74
 
Gabinete, puertos y dispositivos que se conectan al case
Gabinete,  puertos y  dispositivos que se conectan al caseGabinete,  puertos y  dispositivos que se conectan al case
Gabinete, puertos y dispositivos que se conectan al case
JuanaNT7
 
Inteligencia Artificial
Inteligencia ArtificialInteligencia Artificial
Inteligencia Artificial
YashiraPaye
 
Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)
Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)
Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)
AbrahamCastillo42
 
Manual de soporte y mantenimiento de equipo de cómputo
Manual de soporte y mantenimiento de equipo de cómputoManual de soporte y mantenimiento de equipo de cómputo
Manual de soporte y mantenimiento de equipo de cómputo
doctorsoluciones34
 
Tecnología 5G Presentación.pdf trabajo .
Tecnología 5G Presentación.pdf trabajo .Tecnología 5G Presentación.pdf trabajo .
Tecnología 5G Presentación.pdf trabajo .
asrielgamer3421
 
Programming & Artificial Intelligence ebook.pdf
Programming & Artificial Intelligence ebook.pdfProgramming & Artificial Intelligence ebook.pdf
Programming & Artificial Intelligence ebook.pdf
Manuel Diaz
 
HERRAMIENTAS WEB--------------------.pptx
HERRAMIENTAS WEB--------------------.pptxHERRAMIENTAS WEB--------------------.pptx
HERRAMIENTAS WEB--------------------.pptx
maralache30
 
computacion global 3.pdf pARA TERCER GRADO
computacion global 3.pdf pARA TERCER GRADOcomputacion global 3.pdf pARA TERCER GRADO
computacion global 3.pdf pARA TERCER GRADO
YaniEscobar2
 
PLAN DE MANTENMIENTO preventivo de un equipo de computo.pdf
PLAN DE MANTENMIENTO preventivo de un equipo de computo.pdfPLAN DE MANTENMIENTO preventivo de un equipo de computo.pdf
PLAN DE MANTENMIENTO preventivo de un equipo de computo.pdf
70244530
 
Manual Web soporte y mantenimiento de equipo de computo
Manual Web soporte y mantenimiento de equipo de computoManual Web soporte y mantenimiento de equipo de computo
Manual Web soporte y mantenimiento de equipo de computo
mantenimientocarbra6
 

Último (20)

Projecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdf
Projecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdfProjecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdf
Projecte Iniciativa TIC 2024 SOPRA STERIA. inCV.pdf
 
TIC en educacion.rtf.docxlolololololololo
TIC en educacion.rtf.docxlolololololololoTIC en educacion.rtf.docxlolololololololo
TIC en educacion.rtf.docxlolololololololo
 
Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...
Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...
Catalogo general tarifas 2024 Vaillant. Amado Salvador Distribuidor Oficial e...
 
Computacion cuántica y sus ventajas y desventajas
Computacion cuántica y sus ventajas y desventajasComputacion cuántica y sus ventajas y desventajas
Computacion cuántica y sus ventajas y desventajas
 
mantenimiento de chasis y carroceria1.pptx
mantenimiento de chasis y carroceria1.pptxmantenimiento de chasis y carroceria1.pptx
mantenimiento de chasis y carroceria1.pptx
 
Presentación Seguridad Digital Profesional Azul Oscuro (1).pdf
Presentación Seguridad Digital Profesional Azul Oscuro (1).pdfPresentación Seguridad Digital Profesional Azul Oscuro (1).pdf
Presentación Seguridad Digital Profesional Azul Oscuro (1).pdf
 
edublogs info.docx asdasfasfsawqrdqwfqwfqwfq
edublogs info.docx asdasfasfsawqrdqwfqwfqwfqedublogs info.docx asdasfasfsawqrdqwfqwfqwfq
edublogs info.docx asdasfasfsawqrdqwfqwfqwfq
 
El uso de las TIC por Cecilia Pozos S..pptx
El uso de las TIC  por Cecilia Pozos S..pptxEl uso de las TIC  por Cecilia Pozos S..pptx
El uso de las TIC por Cecilia Pozos S..pptx
 
Informació Projecte Iniciativa TIC HPE.pdf
Informació Projecte Iniciativa TIC HPE.pdfInformació Projecte Iniciativa TIC HPE.pdf
Informació Projecte Iniciativa TIC HPE.pdf
 
Sitios web 3.0 funciones ventajas y desventajas
Sitios web 3.0 funciones ventajas y desventajasSitios web 3.0 funciones ventajas y desventajas
Sitios web 3.0 funciones ventajas y desventajas
 
Gabinete, puertos y dispositivos que se conectan al case
Gabinete,  puertos y  dispositivos que se conectan al caseGabinete,  puertos y  dispositivos que se conectan al case
Gabinete, puertos y dispositivos que se conectan al case
 
Inteligencia Artificial
Inteligencia ArtificialInteligencia Artificial
Inteligencia Artificial
 
Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)
Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)
Todo sobre la tarjeta de video (Bienvenidos a mi blog personal)
 
Manual de soporte y mantenimiento de equipo de cómputo
Manual de soporte y mantenimiento de equipo de cómputoManual de soporte y mantenimiento de equipo de cómputo
Manual de soporte y mantenimiento de equipo de cómputo
 
Tecnología 5G Presentación.pdf trabajo .
Tecnología 5G Presentación.pdf trabajo .Tecnología 5G Presentación.pdf trabajo .
Tecnología 5G Presentación.pdf trabajo .
 
Programming & Artificial Intelligence ebook.pdf
Programming & Artificial Intelligence ebook.pdfProgramming & Artificial Intelligence ebook.pdf
Programming & Artificial Intelligence ebook.pdf
 
HERRAMIENTAS WEB--------------------.pptx
HERRAMIENTAS WEB--------------------.pptxHERRAMIENTAS WEB--------------------.pptx
HERRAMIENTAS WEB--------------------.pptx
 
computacion global 3.pdf pARA TERCER GRADO
computacion global 3.pdf pARA TERCER GRADOcomputacion global 3.pdf pARA TERCER GRADO
computacion global 3.pdf pARA TERCER GRADO
 
PLAN DE MANTENMIENTO preventivo de un equipo de computo.pdf
PLAN DE MANTENMIENTO preventivo de un equipo de computo.pdfPLAN DE MANTENMIENTO preventivo de un equipo de computo.pdf
PLAN DE MANTENMIENTO preventivo de un equipo de computo.pdf
 
Manual Web soporte y mantenimiento de equipo de computo
Manual Web soporte y mantenimiento de equipo de computoManual Web soporte y mantenimiento de equipo de computo
Manual Web soporte y mantenimiento de equipo de computo
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

K-NN.pptx

  • 2. © SuperDataScience Machine Learning A-Z ¿Qué son los K-NN? Antes de K-NN Categoría 1 Categoría 2 x1 X2
  • 3. © SuperDataScience Machine Learning A-Z ¿Qué son los K-NN? Nuevo dato Antes de K-NN Categoría 1 Categoría 2 x1 X2
  • 4. © SuperDataScience Machine Learning A-Z ¿Qué son los K-NN? Después de K-NN Nuevo dato asignado a Categoría 1 K-NN Categoría 1 Categoría 2 x1 x2 Nuevo dato Antes de K-NN Categoría 1 Categoría 2 x1 X2
  • 5. © SuperDataScience Machine Learning A-Z ¿Cómo lo hace? PASO 1: Elegir el número K de vecinos PASO 2: Tomar los K vecinos más cercanos del nuevo dato, según la distancia Euclídea PASO 3: Entre esos K vecinos, contar el número de puntos que pertenecen a cada categoría PASO 4: Asignar el nuevo dato a la categoría con más vecinos en ella Nuestro modelo está listo
  • 6. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 1: Elegir el número K de vecinos: K = 5 Nuevo dato Categoría 1 Categoría 2 x1 x2
  • 7. © SuperDataScience Machine Learning A-Z Distancia Euclidiana x y P1(x1,y1) P2(x2,y2) x2 x1 y2 y1 Distancia Euclidiana entre P1 y P2
  • 8. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 2: Tomar los K = 5 vecinos más cercanos del nuevo dato, según la distancia Euclidiana Nuevo dato Categoría 1 Categoría 2 x1 x2
  • 9. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 2: Tomar los K = 5 vecinos más cercanos del nuevo dato, según la distancia Euclidiana Nuevo dato Categoría 1 Categoría 2 x1 x2
  • 10. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 3: De entre esos K vecinos, contar el número de puntos de cada categoría Nuevo dato Categoría 1 Categoría 2 x1 x2 Categoría 1: 3 vecinos Categoría 2: 2 vecinos
  • 11. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 4: Asignar el nuevo dato a la categoría con más vecinos Nuevo dato Categoría 1 Categoría 2 x1 x2 Categoría 1: 3 vecinos Categoría 2: 2 vecinos
  • 12. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 4: Asignar el nuevo dato a la categoría con más vecinos Nuevo dato Categoría 1 Categoría 2 x1 x2 Categoría 1: 3 vecinos Categoría 2: 2 vecinos
  • 13. © SuperDataScience Machine Learning A-Z Algoritmo de los K-NN PASO 4: Asignar el nuevo dato a la categoría con más vecinos Nuevo dato Categoría 1 Categoría 2 Nuestro modelo está listo x1 x2 Categoría 1: 3 vecinos Categoría 2: 2 vecinos

Notas del editor

  1. Two categories of data points: Categoría 1 (red points) and Categoría 2 (green points)
  2. Nuevo dato => which Categoría does it belong to ?
  3. Nuevo dato => which Categoría does it belong to ?
  4. Choose the number K of neighbors => say that a good choice of this number K is 5, and it is the default number in most packages
  5. In the next PASO, we use the Euclidean distance to find the K nearest neighbors. So Kirill it's up to you if you want to remind our students how the Euclidean distance works so that they can understand the next PASO better.
  6. Majority vote !
  7. Majority vote !
  8. Majority vote !