Machine Learning Lab External 1. a) Create a small dataset with at least 10 records and 4 columns: · Age (numeric) · Height (numeric) · Weight (numeric) · City (categorical, with possible values: "City A", "City B", "City C") b) Ensure that some entries in the Age and Weight columns contain missing values. · Handle missing data by: o Replacing missing values in the Age column with the average age . o Replacing missing values in the Weight column with the median weight . c) Normalize the Age , Height , and Weight columns using min-max scaling to bring all values between 0 and 1. d) Display the original dataset, th...
Module – V 1. Binary Tree Traversals using Linked List Inorder: #include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node* left; struct Node* right; }; // Function to perform inorder traversal void inorderTraversal(struct Node* root) { // Empty Tree if (root == NULL) return; // Recur on the left subtree inorderTraversal(root->left); // Visit the current node printf("%d ", root->data); // Recur on the right subtree inorderTraversal(root->right); } // Function to create a new node struct Node* newNode(int data) { struct Node* node = (struct Node*)malloc(size...
Module-IV 1) Implementation of Queue Operations using i) Arrays ii) Linked List 2) Implementation of Circular Queue Operations using i) Arrays ii) Linked List 3) Implement Dequeue using Linked List. 1) a) Implementation of Queue Operations using Arrays. #include<stdio.h> #include<stdlib.h> #define SIZE 5 void enqueue(); void dequeue(); void display(); int queue[SIZE],front=-1,rear=-1,ele; int main() { int ch; while(1) { printf("\n menu"); printf("\n 1.enqueue\n 2.dequeue\n 3.display"); printf("\n enter ur choice"); scanf("...
Comments
Post a Comment