Skip to main content

Linear Regression with one variable - Introduction

 It is not but making a some how clear relationship among variables

the dependent and independent variables.

talking in terms of maths the equation can be used meaningfully for something

may be to determine /predict values from data.


if y = m * x + b 

the values for m , b can be anything but has to appropriate to predict y 

so the loss which is  difference from existing to prediction is close to zero ~0

to start with we can say the one variable as -x 

in some scenario m , b are called variables 

 

the equation stated about is a line equation we have any equation 

y = 2*x 

y = x*x

y = 2x +2x*x 


so why the need of all these equations , it is all about playing data now a days

in machine learning problems we create a data sets , lets consider as x 

y to be a value of x the datas .

y = datas 

when we express the data as a function and plot in the graph we get the curves 

take some random data x and plot x and y 

x =1 , 2, 3 ,4 

y = x 

the equation we have formed here is whatever the value of x the same for y ,plotting that in graph , dont worry jus try to understanding these things ,going forward will prove the relation to real time machine learning problems.




ok consider another example 

y = x + b adding a constant b 

x = 1 ,2 ,3, 4

b = 1

y = 2, 3 , 4, 5  plotting in graph 





if y = w1 * x1 + w2 * x2 + b

here x1 ,x2 are 2 variables let say which is called Linear regression multiple variables  which we will see later.

Comments

Popular posts from this blog

Node and Auth0 - Integration

 so now we have completed all the steps for integration  since we have the node and auth0 as two separate things the integration happens in the app.js  we need to modify the app.js with some auth0 code  app.js / const http = require('http'); const express = require('express'); var router = require('express').Router(); const { auth } = require('express-openid-connect'); const app = express(); app.use('/', router); const hostname = '127.0.0.1'; const port = 3000; http.createServer(app)   .listen(port, () => {     console.log(`Listening on `);   }); const config = {   authRequired: false,   auth0Logout: true,   secret: 'a long, randomly-generated string stored in env',   baseURL: 'http://localhost:3000',   clientID: 'QxpAXsXkzy0Vm2VdT6dFFS0VOKdrah67',   issuerBaseURL: 'https://dev-bnga041p.us.auth0.com' }; console.log(config) // auth router attaches /login, /logout, and /callback routes to the baseURL app.u

Auth0

You might be wondering what is this auth0  it is used for authentication of you applications  could be any apps  1.SPA - Angular , React  2.web app 3.Node  here we will talk about the node use case and go with example  moving ahead for now  if your are not familiar with node dont worry its a funny exercise for now walk with me  we dont have to worry too much for authentication as the service is  provided from auth0   create your node app  install node  https://nodejs.org/en/download/package-manager/  choose your os and do the installation once installed check for the version ' node -v  ' i assume u have installed so that u wil get the version for now  since iam using LINUX this will look like root@strings-desktop:/home/strings/js# node -v v16.13.0 moving on to creating node app for now    create a file app.js and paste the contents  app.js/ const http = require('http'); const express = require('express'); const app = express(); const hostname = '127.0.0.1&#