Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement the best_4_lin_reg() function such that when the generated dataset is passed to both learners, the LinRegLearner performs significantly better than the DTLearner (see

Implement the best_4_lin_reg() function such that when the generated dataset is passed to both learners, the Implementing this method correctly does not provide any points, but there will be a penalty of up to -10

Implement the best_4_lin_reg() function such that when the generated dataset is passed to both learners, the LinRegLearner performs significantly better than the DTLearner (see rubric below for specific performance details). Also implement the best_4_dt() function such that when the generated dataset is passed to both learners, the DTLearner performs significantly better than the LinRegLearner (see rubric below for specific performance details). Each dataset must include no fewer than 2 and no more than 10 features (or "X") columns. The dataset must contain 1 target (or "Y") column. The Y column must contain real numbers. Y values may not be hard-coded and must be generated by the X value. Each dataset must contain no fewer than 10 and no more than 1000 examples (I.e., rows). While you are free to determine these sizes, they may not vary between generated datasets. 3.2.1 Example 1 X1, V1 2 X1, Y1 best_4_dt( seed - 5) best_4_lin_reg( seed = 5 ) defeat learner_example.py hosted with by GitHub 1 3.3 Implement the author() function (Up to 10 point penalty) You must implement a function called author() that returns your Georgia Tech user ID as a string. This is the ID you use to log into Canvas. It is not your 9 digit student number. Here is an example of how you might implement author(): 2 def author(): return 'tb34' # replace tb34 with your Georgia Tech username. view raw author_example.py hosted with by GitHub Activate Wind view to Settings to a Implementing this method correctly does not provide any points, but there will be a penalty of up to -10 points for not implementing the author function. 3.4 Technical Requirements The following technical requirements apply to this assignment 1. You will use your DTlearner from Project 3 and the provided LinRegLeaner during development, local testing, and any testing performed in the Gradescope TESTING environment. 2. The decision tree learner (DTLearner) will be instantiated with leaf_size=1. (Note: We expect you to fix your DTLearner implementation from Project 3 if it was incorrect since this code is required to run/test on Gradescope TESTING.) 3. You will use the LinRegLearner that is provided as part of the project setup.zip file. 4. The dataset must be a regression dataset (i.e., the target "Y" column must contain real numbers). 5. You should set the seed every time to ensure dataset reproducibility. The grader will pass in a seed, and if your code does not produce the same result for the same seed, and different results for different seeds, you will receive a points deduction. 6. No part of this project implementation may read data from files. All data must be generated by the functions. 7. Your code must run in less than 5 seconds per test case. 8. The code you submit should NOT generate any output: No prints, no charts, etc. 9. gen_data() must not import any learner. Activate Wind Go to Settings to

Step by Step Solution

3.45 Rating (171 Votes )

There are 3 Steps involved in it

Step: 1

To implement the best4linreg function we will generate a dataset with random values for the features X and calculate the target values Y using a linear function We will then train both the LinRegLearn... 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

Management Accounting Information for Decision-Making and Strategy Execution

Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young

6th Edition

137024975, 978-0137024971

More Books

Students also viewed these Programming questions