cover photo

COURSEWORK

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

Anagha RaghavanAUTHORACTIVE
This Report is yet to be approved by a Coordinator.

20 / 3 / 2025


Task -1 Linear and Logistic Regression - HelloWorld for AIML

Linear regression - It is a Machine Learning model used predict values for targets which are linearly dependent on the data. In this task, we were asked to predict the price of a home, based on multiple different variables using linear regression. Here's how I did it.

  1. First i loaded the file required
  2. Converted the file into dataframe
  3. Split the data into training and testing data
  4. Made prediction for the testing data using linear regression
  5. Calculated percentage error. Logistic regression- This is a machine learning model used to classify the data and predict the category of the target variable. Here, there is no linear relationship between the features and target variable. Here, we were asked to train a model to distinguish between different species of the Iris flower based on sepal length, sepal width, petal length, and petal width. Here is how i did it:

i First i loaded the file required

ii Converted the file into dataframe

iii Split the data into training and testing data

iv Classified the data and made prediction through logistic regression.

v converted the string in y_test and y_pred to numerical values so as to find the accuracy of the model

UVCE,
K. R Circle,
Bengaluru 01