Linear graphs in Machine Learning

Machine learning often uses line graphs to represent relationships. A line graph displays the values ​​of a linear function: y = ax + b.

Machine learning often uses line graphs to represent relationships.

 

The line graph shows the values ​​of a linear function: y = ax + b

Keywords:

  • Linear
  • Slope (Corner)
  • Intercept (Starting value)

Linear

Linear means straight. A linear graph is a straight line.

The graph consists of two axes: the x-axis (horizontal) and the y-axis (vertical).

 

For example:

const xValues = []; const yValues = []; // Generate values for (let x = 0; x <= 10; x += 1) { xValues.push(x); yValues.push(x); } // Define Data const data = [{ x: xValues, y: yValues, mode: "lines" }]; // Define Layout const layout = {title: "y = x"}; // Display using Plotly Plotly.newPlot("myPlot", data, layout);

Slope

Slope is the angle of a graph.

Slope is the value of 'a' in the linear graph: y = ax

In this example, slope = 1.2:

For example:

let slope = 1.2; const xValues = []; const yValues = []; // Generate values for (let x = 0; x <= 10; x += 1) { xValues.push(x); yValues.push(x * slope); } // Define Data const data = [{ x: xValues, y: yValues, mode: "lines" }]; // Define Layout const layout = {title: "Slope=" + slope}; // Display using Plotly Plotly.newPlot("myPlot", data, layout);

Intercept

Intercept is the starting value of the graph.

Intercept is the value of b in the linear graph: y = ax + b

In this example, slope = 1.2 and intercept = 7:

For example:

let slope = 1.2; let intercept = 7; const xValues = []; const yValues = []; // Generate values for (let x = 0; x <= 10; x += 1) { xValues.push(x); yValues.push(x * slope + intercept); } // Define Data const data = [{ x: xValues, y: yValues, mode: "lines" }]; // Define Layout const layout = {title: "Slope=" + slope + " Intercept=" + intercept}; // Display using Plotly Plotly.newPlot("myPlot", data, layout);

You've just finished reading the article "Linear graphs in Machine Learning" edited by the TipsMake team. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.

Related posts
Other Technology articles
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