cover photo

COURSEWORK

Manu's AI-ML-001 course work. Lv 2

Manu KalyaniAUTHORACTIVE
This Report is flagged by a Coordinator and it probably requires some changes to be approved.

26 / 10 / 2024


Level 1 Aiml Report

27/10/2024


Task 1: Linear and Logistic Regression - HelloWorld for AIML

The objective of this task is to implement linear and logistic regression models using Python's scikit-learn library.

1. Linear Regression - Predict the price of a home, based on multiple different variables using Linear Regression.

Task Steps :

  • Import Libraries.
  • Load the california housing data from sklearn.datasets.
  • Split the data into training and testing data.
  • Create a Linear Regression model
  • Train the model with our training data.
  • Print the predictions on our test data.
  • Evaluate the model's performance on the test data
  • Visualize predictions
  • Check the model performance by calculating mean squared error. Click Here

2. Logistic Regression - Train a model to distinguish between different species of the Iris flower based on sepal length, sepal width, petal length and petal width.

Task Steps :

  • Load Iris Dataset.
  • Split Data into Train and Test Sets.
  • Create and Train Logistic Regression Model.
  • Make Predictions.
  • Evaluate Model Performance. Click Here

Task 2: - Matplotlib and Data Visualisation

  • Environment Setup: Ensure Python and required libraries are installed.
  • Library Import: Import Matplotlib, Seaborn and Pandas.
  • Prepare Sample Data: Create or load data for demonstration.
  • Set Axes Label and Limits: Use Matplotlib to set labels and limits for the axes.
  • Create Multiple Plots: Utilize Matplotlib's subplot() function to create a grid of subplots.
  • Add Legend: Use Matplotlib's legend() function to explain plot elements.
  • Save Plot as PNG: Use Matplotlib's savefig() function to save the plot as a PNG file.
  • Explore Plot Types: Experiment with various plot types like line, scatter, bar etc.
  • Execute and Visualize: Run the code and visualize the plots. Click Here

Task 3 - Numpy

The main motto of this Task is to generate an array by repeating a small array across each dimension and generate an array with element indexes such that the array elements appear in ascending order. Click Here


Task 4 - Metrics and Performance Evaluation

  1. Regression Metrics - used to evaluate performance of regression algorithms.
    Regression Matrics
  2. Classification Metrics - used to evaluate performance of classification algorithms. Classification Matrics

Task 5 - Linear and Logistic Regression - Coding the model from SCRATCH

The objective of this task is to gain a deeper understanding of linear and logistic regression by implementing the algorithm from scratch.

1. Linear Regression - Linear Regression is a basic and most commonly used type of predictive analysis. It is used to predict the value of a dependent variable based on the value of independent variable.

The simplest of regression equation is:

y = m*x + b

where,
y = estimated dependent value.
b = intercept or constant.
m = regression coefficient or slope.
x = value of the independent variable.

Logistic Regression - Logistic regression is a supervised machine learning algorithm used for classification tasks where the goal is to predict the probability that an instance belongs to a given class or not.

Click Here


Task 6 - K- Nearest Neighbor Algorithm

The K-Nearest Neighbor (KNN) algorithm is a simple, supervised machine learning technique used for classification and regression tasks.
The main objective of this task is to implement KNN using sci-kit’s neighbors. K-Neighbors-Classifier for multiple suitable datasets by measuring accuracy and other relevant metrics. Implementation


Task 7 - An elementary step towards understanding Neural Networks

Neural Networks

Neural networks are computational models inspired by the human brain, consisting of interconnected layers of nodes (neurons) that process and learn from data. They excel at recognizing patterns and making predictions in complex datasets, particularly in fields like image and speech recognition.

  • The main objective is to understand Neural Networks and types like Convolution Neural Network(CNN), Artificial Neural Networks (ANN) and Recurrent Neural Networks(RNN)., etc.
Large Language Models(LLM)

Large Language Models (LLMs) are advanced AI systems trained on vast amounts of text data to understand and generate human-like language. They can perform various tasks, such as answering questions, summarizing text, and engaging in conversation, by leveraging patterns learned during training.
Blog Post


Task 8 - Mathematics behind machine learning

  • Curve Fitting - Curve fitting is a statistical technique used to find the best-fitting curve that represents a dataset, minimizing the difference between the observed data points and the curve. It helps in modeling relationships, predicting future values, and smoothing noisy data across various applications. Curve Fitting Using Desmos
  • Fourier Transform - The Fourier Transform is a mathematical technique that transforms a time-domain signal into its frequency-domain representation, revealing the different frequency components of the signal. It is widely used in signal processing, image analysis, and solving differential equations, enabling insights into the underlying patterns and periodicities.

Task 9 - Data Visualization for Exploratory Data Analysis

The main objective of this task is to Use Plotly for data visualization, which is an advanced visualization library, more dynamic than the generally used MatPlotlib or Seaborn.

  • Plotly is an open-source graphing library that enables the creation of interactive and visually appealing plots and dashboards for web applications. It supports various chart types and allows users to easily explore data through features like zooming, panning, and hover effects. Click Here

Task 10 - An introduction to Decision Trees

Decision Trees are a powerful supervised learning algorithm which are used for classification tasks. They provide a visual representation of decision-making processes where each internal node represents a "decision" based on a feature, each branch represents the outcome of that decision, and each leaf node represents the final decision or outcome. Decision tree


Task 11 - SVM

The main motto of this task is to understanding "Support Vector Machines", correct and timely diagnosis of "Breast Cancer", an exquisite disease is an essential matter in the medical field. Using the concept of Support Vector Machines, detect the possibility of breast cancer.

  • Support Vector Machines (SVM) are supervised learning algorithms used for classification and regression tasks that find the optimal hyperplane separating different classes in a high-dimensional space. They are effective in handling both linear and non-linear data, utilizing techniques like the kernel trick to transform input data for improved classification. Click Here

UVCE,
K. R Circle,
Bengaluru 01