Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This assignment is focused on machine learning, mainly on the implementation of 2 different algorithms - Stochastic Gradient Descent & ID 3 decision tree.

This assignment is focused on machine learning, mainly on the implementation of 2 different algorithms - Stochastic Gradient Descent \& ID3 decision tree. The assignment is divided into two sections, each for one unique ML algorithm. The base structure and comments are provided on what should be done. You can use some libraries that help support you for the successful completion of the assignment. However, you CANNOT use a complete library that contains the implementation of ML algorithms. You can get pieces of code from online, but please cite the source properly.In this section, you will implement the Stochastic Gradient Descent algorithm. The training is for a binary classification task i.e. each instance will have a class value of 0 or 1. Also, assume that you are given all binary-valued attributes and that there are no missing values in the train test data. Algorithm (40 points) Following are the data files that will be provided to you for the gradient descent algorithm implementation. - Training file -'gd-train.dat' - Testing file -'gd-test.dat' In these files, only non-space characters are relevant. The first line contains the attribute names. All the other lines are different example instances to be used for the algorithm. Each column holds values of the attributes, whereas the last column holds the class label for that instance. Write the code in the following code block, structure is provided. Instructions on the steps to follow are provided as comments. []\# Data file name variables train = basePath +"gd-train. dat" test = basePath +"gd-test.dat" []\# Read the training and testing data files

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago