cover photo

COURSEWORK

Vinutha's AI-ML-001 course work. Lv 1

Vinutha V MAUTHORACTIVE

Vinutha\'s Report

14 / 4 / 2023


Name: Vinutha V M\n##### Branch : CSE\n##### Year : 2nd year\n##### Domain : AI ML\n## Task 1: 3D printing\n3D printing is a process of creating three dimensional objects by adding material layer by layer .\n In this task I learnt the working of 3D printer ,process of 3D printing STL file, slicing process using creality slicer. \nProcedure of 3D printing: Open Thingiverse.com websit ollect a model of your choice and generate STL fil TL stores the details of your model ,modify the dimensions accordingly and slice it. Now copy the link generated to SD card and this SD card is inserted to the 3D printer.\nIMG_20230414_121631\n\n## Task 2: API\nApplication programming interfaces(APIs) are an accessible way to extract and share data within and across organizations.\nFirst a free account on openweathermap is created, then an API key is generated and this key is copied to your website. An API key is a code used to identify and authenticate an application or user. API keys provide project authorization.\nBy identifying the calling project, you can use API keys to associate usage information with that project. API keys allow the Extensible Service Proxy (ESP) to reject calls from projects that haven't been granted access or enabled in the API.\nBy using this API key in our website we were able to get information like temperature and humidity of different place. \napi\n\n## Task 3: Get familiar with the command line on ubuntu\nUbuntu is an open source Debian-based Linux distribution. Sponsored by Canonical Ltd., Ubuntu is considered a good distribution for beginners. The operating system was intended primarily for personal computers (PCs) but it can also be used on servers.\n\nIn this task using command line mkdir a new folder is created. Then cd(change directory) into the folder. The cd command is used to change the current directory of the terminal. Command line touch is used to create a blank file, ls to list all the files in the folders and created 2600 folders in this folders . Using cat command 2 files are concatenated.\nUbuntu 1\nubuntu2\n\n## Task 4: Tinkercad\nTinkercad is a free web app for 3D design, electronics, and coding. \nFrom this task I learnt how to use tinkercad and its application. First I created my tinkercad account and then designed a circuit to estimate the distance between the sensor and an obstacle and displayed this distance on the screen.\nArduino Uno R3 boar ltrasonic sensor HC-SR0 6*2 LCD I2C display and jumper wires are the components used in the circuit.\ntinkercad\ntinkercad 2\n\n## Task 5: Speed control of DC motor\nIn this we implemented a circuit to control the speed of DC motor using potentiometer. We also changed the rotation direction of motor using push button.\nFirst a circuit was designed in tinkercad using DC motor, L298N motor drive rduino boar ush button and potentiometer. Then this connections is replicated practically. The C++ code given the reference is uploaded to Arduino IDE and implemented. Checked the working of DC motor and then changed the rotation of motor using push button.\nSpeed control of DC motor\ndc\nDC motor 1\nDC motor 2\n\n## Task 6: LED toggle using ESP32\nESP32 is a series of low-cost, low-power system on a chip microcontrollers with integrated Wi-Fi and dual-mode Bluetooth. ESP32 can perform as a complete standalone system or as a slave device to a host MCU, reducing communication stack overhead on the main application processor. ESP32 can interface with other systems to provide Wi-Fi and Bluetooth functionality through its SPI / SDIO or I2C / UART interfaces.\nIn this task we used this ESP32 to create a standalone web server that controls the LED connected with ESP32 GPIOs using Arduino IDE.\n[LED toggle using ESP32]led\nLED toggle\nESP32 development board ,25mm LE readboar umper wires and 2330 ohm resistors are the components used. Using these components a circuit was made as shown in reference. The reference code was uploaded to ESP32 through Arduino IDE and then by pasting the IP address generated in browser we were able to control the LEDs .\n\n## Task 7: Soldering prerequisites\nSoldering is a joining process used to join different types of metals together by melting solder. Solder is a metal alloy usually made of tin and lead which is melted using a hot iron. The iron is heated to temperatures above 600 degrees fahrenheit which then cools to create a strong electrical bond.\nSoldering is widely used in the electronics industry for electrical connections, such as joining copper to printed circuit boards.\nIn this task we learnt about the soldering equipment present in our lab, the solder the soldering iron ,wick ,flux and others.\nWe soldered the given LED and resistor to the circuit using the soldering equipmen he leads of LED and resistor were also soldered together . We also checked working of LED by connecting it to a battery.\nsoldering \nsoldering 2 (1)\n## Task 8:Working with Github\nGitHub facilitates social coding by providing a hosting service and web interface for the Git code repository, as well as management tools for collaboration.\nIn this task learnt about github actions ,terms like repositor ull reques ork and others.\nGitHub repository is used as a database that keeps all the files and folders of the projects. Projects are the management element in GitHub utilized to organize issues and pull requests for better work visualization. It saves changes that are made over time by the users. It is used to manage the workflow.\nhttps://github.com/UVCE-Marvel/git-task.git\nPull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. \n\n## Task 9: Active participation\nI have always actively participated in the techinical events conducted in our college. I have also been one of the organizers for Tech inspire a tech workshop on image processing using python in INSPIRON 22.0. I have also volunteered for the tech fest IMPETUS 22.0.\nI have enrolled for a Udemy course on C++ and completed it. \nInspiron\nImpetus\nVinutha V M (1).pdf\nScreenshot (11)\nScreenshot (12)\n\n# Domain Tasks\n## Task 1: Linear and Logistic Regression\n### 1. Linear Regression:\nLinear regression analysis is used to predict the value of a variable based on the value of another variable.It aims to predict continuous output. In this task, we employed Linear regression to predict home prices based on various input variables. We used California housing dataset and scikit-learn's Linear regression module to build the model. sklearn is a popular open-source machine learning library for Python.'linear_model.LinearRegression()' is a class provided by sklearn for performing linear regression in machine learning. \nhttps://github.com/VinuthaVM/Domain-tasks/blob/dcff415877fb514e563324ef45446ef12575b70f/linear_regression.ipynb\n### 2. Logistic regression:\nLogistic regression is a statistical analysis method to predict a binary outcome, such as yes or no, based on prior observations of a data set. In this part of the task, we applied Logistic Regression to classify different species of Iris flower based on their sepal and petal measurements. We utilized sklearn's LogisticRegression module i.e 'linear_model.LogisticRegression' class .\nhttps://github.com/VinuthaVM/Domain-tasks/blob/585ad8c3be26e9068d37c052aa35dadc02cdae6b/logstic_regression_li.ipynb\n\n## Task 2: Matplotlib and Visualizing data\nMatplotlib is a python library used to create 2D graphs and plots by using python scripts. In this part of task, we explored fundamental plot characteristics using Matplotlib. \nSetting axes labels: To set axes labels , we used 'xlabel() ' and 'ylabel()'.\nSetting axes limit: xlim() and ylim().\nCreating Multiple plots with subplot: By using subplot().\nAdding a legend: legend(), provide labels for different elements in the plot\nSaving Plots as PNG: savefig(). \n Exploring Various Plot Types:\n We explored a wide range of plot types, including line and area plots, scatter and , bar plots histograms, pie plots, box plots, marginal plots, contour plots, heatmaps, and 3D plots. \n Multivariate Distribution and Clustering:\n We generated multivariate distributions for a given dataset, possibly for a classification task. We created visualizations that help understand the data's distribution and patterns, which are crucial for clustering analysis. \nhttps://github.com/VinuthaVM/Domain-tasks/blob/ee8573a82af15955439b382d4eda0555cde28c3f/task2_plots.ipynb\n\n## Task 3: Metrics and Performance Evaluation\nMetrics and performance evaluation are the fundamental concepts in machine learning that involves assessing how well a trained model performs on a given task.\n1.Regression Metrics: Regression metrics provide quantitative measures to evaluate how well a model predicts continuous numerical values. Common regression metrics model include Mean Squared Error(MSE), Root Mean Squared Error(RMSE), Mean Absolute Error(MAE), and R squared .\n2.Classification Metrics: The second aspect centers on classification metrics, which are used to evaluate the performance of classification algorithms.. Standard classification metrics encompass accuracy, precision, recall, F1-score, and the ROC-AUC curve.\nhttps://github.com/VinuthaVM/Domain-tasks/blob/a478dc5f1536c797cf2d0930be9a667b2ffb9467/classification_metrcs.ipynb\n\n## Task 4: Linear and Logistic Regression\nLinear Regression:\n Implementing the linear regression algorithm from scratch involves:\nCreating the mode efining the cost function and Performing gradient descent to optimize model parameters.\n-Testing and Comparison: After building the custom linear regression model, it's crucial to test it on various datasets and compare its performance with sklearnbuilt-in LinearRegression. This step evaluates the accuracy and effectiveness of the custom implementation.\nLogistic Regression:\n Logistic regression is used for classification tasks and is based on the logistic (sigmoid) function.\nhttps://github.com/VinuthaVM/Domain-tasks/blob/f6f86e49ea17b9ecaccc65548fa7f022d1dfebba/4a_linear_regre.ipynb\n\n## Task 5: K- Nearest Neighbor Algorithm\nThe k-nearest neighbors algorithm, also known as KNN or k-NN, is a non-parametric, supervised learning classifier, which uses proximity to make classifications or predictions about the grouping of an individual data point.\nImplementing KNN from Scratch:\n1. Calculate distances (e.g., Euclidean) between data points.\n2. Select 'k' nearest neighbors.\n3. Apply majority voting for classification or averaging for regression.\n4. Split data into training and testing sets.\n5. Train custom KNN on training data.\n6. Make predictions on testing data.\n7. Evaluate using the same metrics.\n8. Document code and results for comparison.\nComparing Results:\n1.Compare sklearn KNN with custom KNN results.\n2.Analyze accuracy, precision, recall, and F1-score.\n3.Note performance differences and insights.\nhttps://github.com/VinuthaVM/Domain-tasks/blob/9b69caf3b84b9459f0484ccd587b72e48f150157/k_nearest_neigh.ipynb\n\n## Task 6: An elementary step towards understanding Neural Networks\n### 1. Here is a blog on Neural Networks and its types\nhttps://github.com/VinuthaVM/Domain-tasks/blob/0f0e6cb92c41b915b6ca03e93ea7fd381b358ed8/Task6.md\n### 2. Blog post explaining GPT-4 build\nhttps://github.com/VinuthaVM/Domain-tasks/blob/0f0e6cb92c41b915b6ca03e93ea7fd381b358ed8/task6b.md\n\n## Task 7: Mathematics behind machine learning\n### 1. Curve fitting:\nIt is the process of finding a mathematical function in an analytic form that best fits this set of data.\ndesmos-graph\ndesmos-graph (1)\n### 2. Fourier series :\nIt is a mathematical model which helps to transform the signals between two different domains, such as transforming signal from frequency domain to time domain or vice versa.\nhttps://github.com/VinuthaVM/Domain-tasks/blob/ea10f5de9b1a379298b653db6bd2b34ddbe70238/task7.md\n\n## Task 8: Data Visualization for Exploratory Data Analysis\nExploratory Data Analysis (EDA) is a crucial step in data science that involves analyzing and summarizing datasets to uncover patterns, trends, and insights. Data visualization, a key component of EDA, is the graphical representation of data using plots, charts, and graphs.\nhttps://github.com/VinuthaVM/Domain-tasks/blob/248155d897166bf0572dd49145fdcaba273436dc/marvel8.ipynb\n\n## Task 9: An introduction to Decision Trees\nDecision Trees (DTs) are a non-parametric supervised learning method used for classification and regression. The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features.\nhttps://github.com/VinuthaVM/Domain-tasks/blob/ebfa98db055343236952faa5972f668e6d3a093f/Decision_tree_9.ipynb\n\n## Task 10: Exploration of a Real world application of Machine Learning\nhttps://github.com/VinuthaVM/Domain-tasks/blob/ebfa98db055343236952faa5972f668e6d3a093f/task10.md\n\n\n\n\n\n\n\n\n\n\n \n\n\n\n\n\n\n \n\n\n \n\n\n\n\n\n

UVCE,
K. R Circle,
Bengaluru 01