Giter Site home page Giter Site logo

kapilraghuwanshi / linearregression-ml-tensorflowjs Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 17 KB

This is the basic most example of TensorflowJS to predict simple mathematical formula results using Linear Regression.

HTML 21.20% JavaScript 78.80%
ai ml dl tensorflow tensorflow-js

linearregression-ml-tensorflowjs's Introduction

FirstML_TensorflowJS_Example

This is the basic most example of TensorflowJS to predict simple mathematical formula results using Linear Regression.

TensorFlow.js is a JavaScript library which makes it possible to add machine learning capabilities to any web application. With TensorFlow.js you can develop machine learning scenarios from scratch.

Tensorflow building block - 1)Tensors 2)Operations 3)Models/Layers.

  1. Tensors Tensors are the central unit of data in TensorFlow. A tensor contains a set of numeric values and can be of any shape: one or more dimensional. When you’re creating a new Tensor you need to define the shape as well. const t1 = tf.tensor([1,2,3,4,2,4,6,8]), [2,4]); [[1,2,3,4], [2,4,6,8]] In TensorFlow.js all tensors are immutable. That means that a tensor once created, cannot be changed afterwards. If you perform an operation which is changing values of a tensor, always a new tensor with the resulting value is created and returned.

  2. Operations By using TensorFlow operations you can manipulate data of a tensor. Because of the immutability of tensor operations are always returning a new tensor with the resulting values. const t3 = tf.tensor2d([1,2], [3, 4]); const t3_squared = t3.square(); [[1, 4 ], [9, 16]]

  3. Models And Layers Models and Layers are the two most important building blocks when it comes to deep learning. Each model is build up of one or more layers. TensorFlow is supporting different types of layers. For different machine learning tasks you need to use and combine different types of layers. For the moment it’s sufficient to understand that layers are used to build up neural networks (models) which can be trained with data and then used to predict further values based on the trained information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.