Implement the best_4_lin_reg() function such that when the generated dataset is passed to both learners, the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Management Accounting Information for Decision-Making and Strategy Execution
ISBN: 978-0137024971
6th Edition
Authors: Anthony A. Atkinson, Robert S. Kaplan, Ella Mae Matsumura, S. Mark Young
Posted Date:
Students also viewed these programming questions
-
Submit a written critique of the video, Top Tips for How to Tape Your Speech , using the praise, question, polish (PQP) method. The PQP method is described in the course's Assignment Expectations...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A steam turbine receives a flow of 3 kg/s water at 1200 kPa, 350 C and velocity of 15 m/s. The steam exits the turbine at 100 kPa, 150 C and very low velocity. Find the specific work and the power...
-
When 178J of energy is supplied as heat to 1.9 mol of gas molecules, the temperature of the sample increases by 1.78 K. Calculate the molar heat capacities at constant volume and constant pressure of...
-
A series of solutions containing NaOH, Na2CO3, and NaHCO3, alone or in compatible combination, was titrated with 0.1202 M HCl. Tabulated below are the volumes of acid needed to titrate 25.00-mL...
-
Which of the following statements about the training of a neural network is false? a. The training of a neural network is an iterative process of predicting an observation or batch of observations...
-
Suppose Lattin Corp.s breakeven point is revenues of $1,500,000. Fixed costs are $720,000. Required 1. Compute the contribution margin percentage. 2. Compute the selling price if variable costs are $...
-
Arvin, Inc., produces two products, ins and outs, in a single process. The joint costs of this process were $77,300, and 14,000 units of ins and 36,000 units of outs were produced. Separable...
-
The sequence number field in the TCP header is 32 bits long, which is big enough to cover over 4 billion bytes of data. Even if this many bytes were never transferred over a single connection, why...
-
Create a website to host your professional and technical background and resume. This is your chance to show off your web development skills to prospective employers. Create a design diagram or...
-
Anne Glover, CEO and co-founder of Amadeus Capital Ltd USA stated that the Silicon Valley Bank (SVB) crisis was caused by "utterly irresponsible" practices by SVB and its management namely, taking...
-
Your employer offers you a group retirement saving benefits of matching 20% of your monthly saving in the retirement account. Every month, you plan to save CAD 200. You expect to earn 6% return from...
-
What is the future value of $35 per week for 30 years at 9.5 percent interest? Assume the first payment occurs at the end of this week.
-
The sales price of a product is $ 2 0 per unit; the variable cost is $ 5 per unit; and fixed costs total $ 1 , 5 0 0 . How many units must be sold to break even?
-
Let's pretend you own a small business that cannot afford to pay huge salaries for talent. In the old days, you could grant key employees a fist full of stock options in lieu of a large paycheck. If...
-
Air at 200 kPa and 350 K enters an adiabatic nozzle at low velocity. At the outlet of the nozzle the pressure is measured as 150 kPa. (Consider constant thermo physical properties : Cp = 1.008...
-
Audrey purchases a riding lawnmower using a 2-year, no-interest deferred payment plan at Lawn Depot for x dollars. There was a down payment of d dollars and a monthly payment of m dollars. Express...
-
Hoechst Celanese, a pharmaceutical manufacturer, has used a profit-sharing plan, the Hoechst Celanese Performance Sharing Plan, to motivate employees. To operationalize the plan, the Hoechst Celanese...
-
You are willing to donate to worthy organizations. However, you believe strongly that each request for a donation should be evaluated on the basis of its own merits. You would not feel bad in any...
-
Pierre LeBlanc, manager of Centaur Corporation, is thinking about implementing a target costing system in his organization. Several managers have taken him aside and have expressed concerns about...
-
Someone who exposes the ethical misdeeds of others in an organization is usually called a/an _________. (a) whistleblower (b) ethics advocate (c) ombudsman (d) stakeholder
-
If a manager fails to enforce a late-to-work policy for all workersthat is, by allowing some favored employees to arrive late without penaltiesthis would be considered a violation of _________. (a)...
-
According to research on ethics in the workplace, _________ is/are often a major and frequent source of pressures that create ethical dilemmas for people in their jobs. (a) declining morals in...
Study smarter with the SolutionInn App