Pattern Recognition in Machine Learning

Neural networks are used in applications such as facial recognition. These applications utilize pattern recognition. This type of classification can be performed using Perceptron.

  • Neural networks are used in applications such as facial recognition.
  • These applications utilize pattern recognition.
  • This type of classification can be performed using Perceptron .
  • Perceptrons can be used to classify data into two parts.
  • The perceptron is also known as a linear binary classifier.

Sample classification

Imagine a straight line (linear graph) in space with scattered x and y points. How would you classify the points that lie above and below the line?

 

Images 1 of Pattern Recognition in Machine Learning

A perceptron can be trained to identify points lying on a straight line, without needing to know the formula for that line.

Images 2 of Pattern Recognition in Machine Learning

 

How to program neural networks

To program a neural network, we can use a simple JavaScript program to:

  1. Create a simple graphing object.
  2. Generate 500 random x, y points.
  3. Display the x and y points.
  4. Create a function to draw a line: f(x)
  5. Display straight lines
  6. Calculate the desired results.
  7. Display the desired results

Create a simple graphing object.

Creating a simple graphing object is described in AI Canvas.

For example:

const plotter = new XYPlotter("myCanvas"); plotter.transformXY(); const xMax = plotter.xMax; const yMax = plotter.yMax; const xMin = plotter.xMin; const yMin = plotter.yMin;

Generate random X and Y points.

  • Create as many xy points as you like.
  • Let the value of x be random (from 0 to the maximum value).
  • Let the value of y be random (from 0 to the maximum value).
  • Display the points on the graph:

For example:

const numPoints = 500; const xPoints = []; const yPoints = []; for (let i = 0; i < numPoints; i++) { xPoints[i] = Math.random() * xMax; yPoints[i] = Math.random() * yMax; }

Create a function to draw a straight line.

Displaying a line on the plotter:

For example:

function f(x) { return x * 1.2 + 50; }

Calculate the correct answer

Calculate the correct answer based on the linear function:

y = x * 1.2 + 50.

The desired answer is 1 if y lies on the line and 0 if y lies below the line.

Store the desired answers in an array (desired[]).

For example:

let desired = []; for (let i = 0; i < numPoints; i++) { desired[i] = 0; if (yPoints[i] > f(xPoints[i])) {desired[i] = 1;} }

Show the correct answers

For each point, if desired[i] = 1, display the point in black; otherwise, display the point in blue.

For example:

for (let i = 0; i < numPoints; i++) { let color = "blue"; if (desired[i]) color = "black"; plotter.plotPoint(xPoints[i], yPoints[i], color); }

How to train a Perceptron

In the next chapter, you will learn how to use the correct answers to: Train a perceptron to predict the output value of unknown input values.

Close
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup