🎓 Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

📑

University Syllabi

AKTU & AICTE aligned semester credit guidelines.

📝

Exam Question Papers

Previous 5 years solved university semester papers.

💡

Lab Manuals & Viva

Practical codes with outputs and interview questions.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

🎨 Computer Graphics (CG)

Scan Conversion, Transformations, Viewing & Clipping.

Unit 1: Raster Scan & Bresenham→
Unit 2: 2D & 3D Transformations→
Unit 3: Viewing & Clipping→
Unit 4: Hidden Surface Elimination→
Unit 5: Curves & Animation→

🧠 Machine Learning (ML)

Regression, Decision Trees, SVM, Neural Nets & Clustering.

Unit 1: Supervised & Regression→
Unit 2: Decision Trees & SVM→
Unit 3: Unsupervised & K-Means→
Unit 4: Neural Networks→
Unit 5: Reinforcement Learning→

🤖 Artificial Intelligence (AI)

Search Algorithms, First Order Logic, Expert Systems.

Unit 1: Propositional Logic→
Unit 2: Probabilistic Reasoning→
Unit 3: State Space Search & A*→
Unit 4: First Order Predicate Logic→
Unit 5: Expert Systems→

🗄️ Database Management

ER-Modeling, SQL Queries, Normalization and ACID.

Unit 1: ER Model & Attributes→
Unit 2: Normalization (1NF-BCNF)→
Unit 3: ACID & Concurrency→
Unit 4: Relational Algebra & SQL→
Unit 5: NoSQL & Advanced DB→

🌲 Data Structures (DSA)

Arrays, Linked Lists, Trees, Graphs & Sorting.

Unit 1: Arrays & Recursion→
Unit 2: Stacks, Queues & Postfix→
Unit 3: Binary Trees & BST→
Unit 4: Graphs (BFS, DFS)→
Unit 5: Sorting & Hashing→

⚡ Operating Systems (OS)

Process Scheduling, Deadlocks, Virtual Memory & Disks.

Unit 1: Process States & Threads→
Unit 2: CPU Scheduling→
Unit 3: Deadlocks & Banker's Algo→
Unit 4: Virtual Memory & Paging→
Unit 5: File & Disk Management→

🌐 Computer Networks

OSI Models, Subnetting, Routing and TCP Handshake.

Unit 1: OSI vs TCP/IP Models→
Unit 2: Data Link Layer & Framing→
Unit 3: IPv4 & Subnetting→
Unit 4: Transport Layer (TCP)→
Unit 5: Application Layer (DNS)→

⚙ Design of Algorithms

Asymptotic Notations, Divide & Conquer, Greedy.

Unit 1: Time Complexity→
Unit 2: Divide & Conquer→
Unit 3: Dynamic Programming→
Unit 4: Greedy Approach→
Unit 5: Backtracking→
Viewing All Lectures

k-NEAREST NEIGHBOR LEARNING

  • The most basic instance-based method is the K- Nearest Neighbor Learning. This algorithm assumes all instances correspond to points in the n-dimensional space Rn.
  • The nearest neighbors of an instance are defined in terms of the standard Euclidean distance.
  • Let an arbitrary instance x be described by the feature vector

((a1(x), a2(x), ………, an(x))

Where, ar(x) denotes the value of the rth attribute of instance x.

  • Then the distance between two instances xi and xj is defined to be d(xi , xj ) Where,
  • In nearest-neighbor learning the target function may be either discrete-valued or real- valued.

 Let us first consider learning discrete-valued target function of the form

f : Rn à V

Where, V is the finite set {v1, . . . vs }

The k- Nearest Neighbor algorithm for approximation a discrete-valued target function is given below:



  • The  value  𝑓̂(xq)  returned  by  this  algorithm  as  its  estimate  of  f(xq)  is  just  the  most common value of f among the k training examples nearest to xq.
  • If k = 1, then the 1- Nearest Neighbor algorithm assigns to 𝑓̂(xq) the value f(xi). Where xi is the training instance nearest to xq.
  • For larger values of k, the algorithm assigns the most common value among the k nearest training examples.


  • Below figure illustrates the operation of the k-Nearest Neighbor algorithm for the case where the instances are points in a two-dimensional space and where the target function is Boolean valued.
  • The positive and negative training examples are shown by “+” and “-” respectively. A query point xq is shown as well.
  • The 1-Nearest Neighbor algorithm classifies xq as a positive example in this figure, whereas the 5-Nearest Neighbor algorithm classifies it as a negative example.

  • Below figure shows the shape of this decision surface induced by 1- Nearest Neighbor over the entire instance space. The decision surface is a combination of convex polyhedra surrounding each of the training examples.

  • For every training example, the polyhedron indicates the set of query points whose classification will be completely determined by that training example. Query points outside the polyhedron are closer to some other training example. This kind of diagram is often called the Voronoi diagram of the set of training example

The K- Nearest Neighbor algorithm for approximation a real-valued target function is given below f : Rn à V




Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>