Orf523 S24 HW3
Orf523 S24 HW3
x
MC (x) = inf{t > 0 | ∈ C},
t
over the domain
x
dom(MC ) = {x ∈ Rn | ∈ C for some t > 0}.
t
1. Show that MC is a convex function.
2. Suppose C is also compact, origin symmetric (x ∈ C if and only if −x ∈ C), and has
nonempty interior. Show that MC is a norm over Rn . What is its unit ball?
3. Show that an even degree homogeneous polynomial is convex if and only if it is qua-
siconvex. (Hint: use what you proved in the previous parts of this question.)
1
Problem 3: Radiation treatment planning (Boyd&Vandenberghe, Additional Exer-
cises, Problem 17.2)
In radiation treatment, radiation is delivered to a patient, with the goal of killing or damaging
the cells in a tumor, while carrying out minimal damage to other tissue. The radiation is
delivered in beams, each of which has a known pattern; the level of each beam can be
adjusted. (In most cases multiple beams are delivered at the same time, in one ‘shot’, with
the treatment organized as a sequence of ‘shots’.) We let bj denote the level of beam j, for
j = 1, . . . , n. These must satisfy 0 ≤ bj ≤ B max , where B max is the maximum possible beam
level. The exposure area is divided into m voxels, labeled i = 1, . . . , m. The dose di delivered
∑
to voxel i is linear in the beam levels, i.e., di = nj=1 Aij bj . Here A ∈ Rm×n+ is a (known)
matrix that characterizes the beam patterns. We now describe a simple radiation treatment
planning problem.
A (known) subset of the voxels, T ⊂ {1, . . . , m}, corresponds to the tumor or target region.
We require that a minimum radiation dose Dtarget be administered to each tumor voxel, i.e.,
di ≥ Dtarget for i ∈ T . For all other voxels, we would like to have di ≤ Dother , where Dother
is a desired maximum dose for non-target voxels. This is generally not feasible, so instead
we settle for minimizing the penalty
∑
E= (di − Dother )+ ,
i̸∈T
where (·)+ denotes the nonnegative part of its argument (i.e., (z)+ = max{0, z}). We can
interpret E as the total nontarget excess dose.
1. Show that the treatment planning problem is a linear program. The optimization
variable is b ∈ Rn ; the problem data are B max , A, T , Dtarget , and Dother .
2. Solve the problem instance with data generated by the file treatment_planning_data.m.
If you are using Python, you can download Atumor.csv and Aother.csv, then use
treatment_planning_data.py to load them. Here we have split the matrix A into
Atarget, which contains the rows corresponding to the target voxels, and Aother,
which contains the rows corresponding to other voxels. Plot the dose histogram for
the target voxels, and also for the other voxels. (You can use the MATLAB function
hist or the Python function matplotlib.pyplot.hist to plot histograms.) Make a
brief comment on what you see.
Remark: The beam pattern matrix in this problem instance is randomly generated,
but similar results would be obtained with realistic data.
2
Problem 4: Support Vector Machines (SVMs)
Recall our Support Vector Machines application of convex optimization from lecture. We
have m feature vectors x1 , . . . , xm ∈ Rn with each xi having a label yi ∈ {−1, 1}. The goal
is to find a linear classifier, that is a hyperplane aT x − b, where a ∈ Rn and b ∈ R, by solving
the optimization problem1
max. t
a,b,t
3. Assume the optimal value of (2) is positive. Show that an optimal solution of (2)
always satisfies ∥a∥ = 1.
1
You can assume throughout that there is at least one data point with yi = 1 and one with yi = −1 as
otherwise there is nothing to classify.
3
Problem 5: Hillary or Bernie?
You would like to use the knowledge you’ve acquired in optimization over the past few weeks
to see if you could have predicted the outcome of each Hillary-Bernie race in the Democratic
primaries. To make things easier, you consider only the counties in the tri-state area and
New England, i.e., those that belong to the states of New York, New Jersey, Maine, New
Hampshire, Pennsylvania, Vermont, Massachussetts, Connecticut, or Rhode Island.
Your goal is to find a linear classifier that, for each county, labels it either as a Bernie win
or as a Hillary win. To do this, you have access to a feature vector comprising the following
features: mean income, percentage of hispanics, percentage of whites, percentage of residents
with a Bachelor’s degree or higher, and population density.
1. Load the data file Hillary_vs_Bernie in MATLAB. For Python users, you can use
the following code to load the data file.
1 import s c i p y
2 mat = s c i p y . i o . loadmat ( ‘ H i l l a r y _ v s _ B e r n i e . mat ’ )
3 X = mat [ ‘ f e a t u r e s _ t r a i n ’ ]
4 y = mat [ ‘ l a b e l _ t r a i n ’ ]
In features_train, we have given you the feature vectors for 175 counties and in
label_train, their corresponding labels (-1 is a Bernie win and 1 is a Hillary win).
As there was a wide disparity in the orders of magnitude of the original data, each
feature vector has already been normalized by its standard deviation. The original data
can be found at https://www.kaggle.com/benhamner/2016-us-election. Solve the
problem below:
min.∥a∥ + γ∥η∥1
a,b,η
2. Test the performance of your classifier using the feature vectors from 21 other coun-
ties (given in features_test) by comparing the labels obtained to the ones given in
label_test. Which γ gives you the highest success rate in terms of prediction? Take
a look at the entries of a∗ in this case – what does this suggest about the people who
vote for Hillary compared to those who vote for Bernie?