कृत्रिम होशियारी

घर एआई क्या है? मानव बुद्धि भाषाओं का इतिहास संख्याओं का इतिहास कंप्यूटिंग का इतिहास रोबोटों नौकरी बदलना एआई . के उदाहरण मस्तिष्क का सिद्धांत प्रोग्रामिंग जावास्क्रिप्ट ब्राउज़र में एआई

गणित

गणित रैखिक कार्य रेखीय बीजगणित वैक्टर मैट्रिसेस टेंसर

आंकड़े

संभावना आंकड़े वितरण

ग्राफिक्स

एआई प्लॉटर एआई रैखिक रेखांकन एआई स्कैटर प्लॉट्स

एआई साइंस

विज्ञान डेटा एकत्रित करना क्लस्टरिंग प्रतिगमन यंत्र अधिगम तंत्रिका जाल

यंत्र अधिगम

परसेप्ट्रोन मान्यता प्रशिक्षण परिक्षण सीखना शब्दावली Brain.js

टेंसरफ्लो

TFJS ट्यूटोरियल टीएफजेएस संचालन टीएफजेएस मॉडल TFJS व्यूअर

उदाहरण 1

Ex1 परिचय Ex1 डेटा Ex1 मॉडल Ex1 प्रशिक्षण

उदाहरण 2

Ex2 परिचय Ex2 डेटा Ex2 मॉडल Ex2 प्रशिक्षण

जेएस ग्राफिक्स

पहचान ग्राफ़ कैनवास ग्राफ़ प्लॉटली.जेएस ग्राफ चार्ट.जेएस ग्राफ़ गूगल ग्राफ़ D3.js

एक प्लॉटर ऑब्जेक्ट

आर्टिफिशियल इंटेलिजेंस का अध्ययन करते समय प्लॉटर ऑब्जेक्ट होना अच्छा है:

  • AI को और मज़ेदार बनाता है
  • AI को और अधिक विज़ुअल बनाता है
  • AI को और अधिक समझने योग्य बनाता है

प्लॉटर ऑब्जेक्ट बनाएं

उदाहरण

function XYPlotter(id) {

this.canvas = document.getElementById(id);
this.ctx = this.canvas.getContext("2d");
this.xMin = 0;
this.yMin = 0;
this.xMax = this.canvas.width;
this.yMax = this.canvas.height;
.
.

एक लाइन प्लॉट करने के लिए एक विधि जोड़ें

उदाहरण

this.plotLine = function(x0, y0, x, y, color) {
  this.ctx.moveTo(x0, y0);
  this.ctx.lineTo(x, y);
  this.ctx.strokeStyle = color;
  this.ctx.stroke();
}


XY मान बदलने के लिए एक विधि जोड़ें

उदाहरण

this.transformXY = function() {
  this.ctx.transform(1, 0, 0, -1, 0, this.canvas.height)
}


अंक प्लॉट करने के लिए एक विधि जोड़ें

उदाहरण

this.plotPoints = function(n, xArr, yArr, color, radius = 3) {
  for (let i = 0; i < n; i++) {
    this.ctx.fillStyle = color;
    this.ctx.beginPath();
    this.ctx.ellipse(xArr[i], yArr[i], radius, radius, 0, 0, Math.PI * 2);
    this.ctx.fill();
  }
}

कुछ यादृच्छिक बिंदुओं को प्लॉट करें

उदाहरण

// Create a Plotter
let myPlotter = new XYPlotter("myCanvas");

// Create random XY Points
numPoints = 500;
const xPoints = Array(numPoints).fill(0).map(function(){return Math.random() * myPlotter.xMax});
const yPoints = Array(numPoints).fill(0).map(function(){return Math.random() * myPlotter.yMax});

// Plot the Points
myPlotter.plotPoints(numPoints, xPoints, yPoints, "blue");


कोड को लाइब्रेरी में रखें

सोर्स कोड

function XYPlotter(id) {

this.canvas = document.getElementById(id);
this.ctx = this.canvas.getContext("2d");
this.xMin = 0;
this.yMin = 0;
this.xMax = this.canvas.width;
this.yMax = this.canvas.height;

// Plot Line Function
this.plotLine = function(x0, y0, x, y, color) {
  this.ctx.moveTo(x0, y0);
  this.ctx.lineTo(x, y);
  this.ctx.strokeStyle = color;
  this.ctx.stroke();
}

// Transform XY Function
this.transformXY = function() {
  this.ctx.transform(1, 0, 0, -1, 0, this.canvas.height)
}

// Pot Points Function
this.plotPoints = function(n, xArr, yArr, color, radius = 3) {
  for (let i = 0; i < n; i++) {
    this.ctx.fillStyle = color;
    this.ctx.beginPath();
    this.ctx.ellipse(xArr[i], yArr[i], radius, radius, 0, 0, Math.PI * 2);
    this.ctx.fill();
  }
}

} // End Plotter Object

इसे एक फ़ाइल में सहेजें (जैसे "myplotlib.js")

अपने एचटीएमएल पेजों में इसका इस्तेमाल करें

अब आप अपने आलेखक वस्तु को अपने HTML पृष्ठों में जोड़ सकते हैं:

उदाहरण

<script src="myplotlib.js"></script>