Elastic net regularization

Assignment Help Python Programming
Reference no: EM132804665

Problem - Elastic net regularization

In statistics, the Elastic net uses a regularization that linearly combines the L1 and L2 penalties. The estimates from the elastic net method can be denoted as

β^ = arg minβ(f(β) + λ1||β|| + λ2||β||22

where f(β) is the loss function without regularization subject to the optimization variable β and λ1, λ2 are the coefficients to control the magnitude of penalty. Now we consider a linear model with

f(β) = ||y - xβ||22

where y ∈ Rn X∈Rnxp, and β∈RP. Please find the data of X and y with in = 500 and p = 200 via Canvas, solve the problem with different values of (A1, A2), then fill in the table by computing

Σpi=1 I(|βi*|≤ ∈)

where β* is the corresponding optimal solution, ∈ is set to be 10-3, and the indicator function is defined as

I(|βi*|≤ ∈) = 1   if |βi*| ≤ ∈,

                   0      otherwise.

1795_figure1.jpg

(b) Solve the following optimization problem:

minimize λmax(X) - λmin(X)
x∈s+n
subject to trace (AX) = 1.

Here we consider

62_figure.jpg

Please show the optimal value of X and all the code you use to solve the problem.

(c) Solve the unconstrained optimization problem with piecewise-linear objective function

minimize Maxi{aix ± bi}
x∈R

where a = (a1, a2, a3, a4, a5) = (-2, -4, -8,1, 3) and b = (b1, b2, b3, b4, b5) = (-1, -6, -1, -1, -12). Compare the results with the solution of following optimization problem:

minimize t
xER
subject to t ≥ aix + bi, i = 1,...,5.

Please show the optimal value of x for both problems and all the code you use to solve the problem.

Verified Expert

The solution was based on optimization using python programming language. The same can be implemented in R programming language but we selected python language due to the ease of implementation. Some of the libraries that might be important for the implementation include the sklearn and the matplotlib in order to allow the plotting of points on the console.

Reference no: EM132804665

Questions Cloud

How event will affect learning environments in the future : Examine the Tenth Amendment, Title I, No Child Left Behind and Determine how this event has impacted today's learning environments. Predict how this event will.
What is the primary goal of the management : What is the Primary Goal of the Management? PROFIT OR WEALTH MAXIMIZATION.Start a discussion by answering the question and how is it different
Compare the family background and leadership styles : You may compare their family background, leadership styles, accomplishments, victories, losses, or impact of the culture in which each lived.
How much is the loss recognized during the year : The fair value of the building on December 31, 20x5 is 17,200,000. How much is the loss recognized during the year
Elastic net regularization : Solve the unconstrained optimization problem with piecewise-linear objective function and show the optimal value of x for both problems and all the code
Determine the cost of the units of product made in january : Combine the individual overhead costs into a cost pool and calculate a predetermined overhead rate assuming the cost driver is number of units.
What is the exceptional adjust : 1) You've got chosen to purchase a car and fund it with a 15-year, 4.50% APR mortgage. The car costs $600,000 and the bank requires a 20% down installment. All
What items are included in manufacturing overhead : SR 200, your variable cost is SR2 per kilowatt hour, and your monthly activity level is 3,000 kilowatt hours, what is the amount of your utility bill?
Determining the best estimate of the value of bonds : Given the facts in the problem, what is the best estimate of the value of one of these bonds today? Why? (No calculations necessary.)

Reviews

len2804665

2/22/2021 3:09:03 AM

I have problem in finishing an Optimization Assignment and may need for Tutors''s help. Not a big work but I need to understand the logic and the coding steps.

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd