Recent Question/Assignment

This assignment has to be done using R studio and R part
Problem 1. Optimization Models [15 Points]
A data-processing company processes three types of jobs – A, B, and C– for clients. In-house processing costs per job are estimated to be $1, $2, and $3 for job types A, B, and C respectively. Each job requires three types of computing resources – CPU, storage, and network services. It requires:
• 1 unit of CPU, 2 unit of storage, and 3 units of network services for each job of type A;
• 2 unit of CPU, 2 units of storage, and 3 units of network services for each job of type B; and
• 1 unit of CPU, 2 units of storage, and 4 units of network services for each job of type C.
Because of contractual obligations the company must process 1,000,000 jobs of type A, 300,000 jobs of type B, and 250,000 jobs of type C in the upcoming week.
Over this time period it has 1,200,000 units, 2,500,000 units, and 3,600,000 units, respectively, of CPU, storage, and network services available.
Limited resource availability prevents the company from meeting the entire demands for all job types through in-house processing alone. The company has two other options to fulfill its contractual obligations: it can out-source some jobs to an external partner, and it can use cloud computing services from a provider. No in-house computing resources are used for jobs out-sourced to the external partner. Nor are in-house computing resources needed when cloud computing services are used.
The external partner charges $1.20 for each job of type A, $2.40 for each job of type B, and $3.20 for each job of type C. The external partner, too, has capacity limitations. It can process at most 100,000 jobs of type A, 20,000 jobs of type B, and 20,000 jobs of type C in the upcoming week.
When cloud-computing services are used, costs per job are estimated to be $1.50, $2.50, and $3.60 for job types A, B, and C, respectively. There are no capacity limitations for jobs processed using cloud computing services.
For your convenience, the information presented above is summarized in the table below:
job Type A B C Available
Resource for in-house processing CPU units per job 1 2 1 1,200,000
Storage units per job 2 2 2 2,500,000
Network units per job 3 3 4 3,600,000
Outsourcing partner Capacity 100,000 20,000 20,000
Number of jobs to process 1,000,000 300,000 250,000
Cost per unit In-house cost per job $1.00 $2.00 $3.00
Out sourcing cost per job $1.20 $2.40 $3.20
Cloud computing cost per job $1.50 $2.50 $3.60
The company uses a linear programming model to determine an optimal job processing plan so as to meet their contractual obligations in the upcoming week at minimum cost. It also uses the model to perform sensitivity analysis.

Formulate the problem as a linear program (LP), solve the LP, and perform sensitivity analysis to answer the following questions:
i. What is the minimum cost attainable under an optimal plan? [3 Points]
ii. How many jobs of each type should be processed in-house, out-sourced to the external business partner, and processed using cloud computing services under this optimal plan? [3 Points]
iii. How many units of CPU, storage, and network services are used up under this optimal plan? [3 Points]
iv. If the available 3,600,000 units of network costs $ 0.10 cents per unit, how much should the company be willing to pay for an additional unit of network services (beyond its current availability)? [3 Points]
v. The company has located an alternate business partner (New-Partner) that can only process jobs of type A. It can process at most 10,000 jobs of type A in the upcoming week, but the price per job is subject to negotiations. What is the maximum amount that the company should be willing to pay New-Partner for processing each unit of job type A? [3 Points]

Problem 2. Linear Regression [10 Points]
The data file “finalExamFall2017train.csv” contains 3000 observations of 20 variables: -X1-, -X2-, -X3-, -X4-, -X5”, -X6-, -X7-, -X8-, -X9-, -X10-, -X11-, -X12-, -X13-, -X14-, -X15”, -X16-, -X17-, -X18-, “Y”, and -Z-.
(a) [5 Points]
Run a regression on the data in finalExamFall2017train.csv to predict the output variable - Y - based on the input variables -X1-, -X2-, -X3-, -X4-, -X5-, -X6-, -X7-, -X8-, and -X9-.
Interpret the regression results to complete the table below. Specify the coefficient estimates (rounded to 1 decimal place) under the column “Coefficient Estimate”. Specify whether the coefficient estimates are significant (Yes or No) at the 0.1% level under the column “Significant”
Coefficient Estimate Significant?
Intercept
X1
X2
X3
X4
X5
X6
X7
X8
X9
(b) [5 Points]
Predict the expected value of -Y- for the first 10 records in the data file “finalExamFall2017test.csv” and report the predicted values (rounded to the nearest integer) in the column “PredictedY” below. Under the column “Error” specify the difference (Y – PredictedY) for each observation.
No. X1 X2 X3 X4 X5 X6 X7 X8 X9 Y PredictedY Error
1 113 53 210 719 604 374 408 803 944 3056
2 176 854 453 789 939 696 723 597 473 3445
3 237 946 636 533 202 485 945 78 373 6646
4 184 647 584 122 209 312 799 63 196 5970
5 268 914 327 565 45 726 997 32 79 7383
6 409 291 528 31 666 541 854 406 285 5171
7 797 373 401 753 556 121 290 686 703 4040
8 665 340 277 243 100 875 917 608 650 7669
9 904 704 837 58 725 882 937 361 501 6345
10 349 549 803 427 257 800 705 612 82 5742

Problem 3. Decision Tree Inductive Learning [10 Points]
Train a decision tree classifier using the 2000 observations from the data file “finalExamFall2017train.csv” to classify the output binary variable “Z” based on the 9 input variables: -X10-, -X11-, -X12-, -X13-, -X14-, -X15”, -X16-, -X17-, and -X18-
(a) [5 Points]
Specify the rules obtained in the form:
IF Condition Then Z = 1 / 0
(b) [4 Points]
Use the rules obtained to predict the output class “Z” for the 1000 observations in data file “finalExamFall2017test.csv” and present your confusion matrix.
actual
predicted 0 1
0
1
(c) [1 Point]
What is the prediction accuracy of your trained model for the 1000 observations in data file “finalExamFall2017test.csv”?

This work strictly reflects my own efforts.
I have not discussed these questions or collaborated with anyone.
Name: _________________________________________________________________
(Please PRINT)
Question 1. (3 × 5 Points)
i.
Minimum cost Attainable $
ii.
Number of jobs A B C
In-house
Out sourcing
Cloud computing
iii.
Number of units Used Available
CPU units 1,200,000
Storage units 2,500,000
Network units 3,600,000
iv.
Maximum cost the company should be willing to pay for an additional unit of network services $
v.
Maximum amount that the company should be willing to pay New-Partner for processing each unit of job type A $

Question 2. (2 × 5 Points)
Part (a)
Coefficient Estimate Significant?
Intercept
X1
X2
X3
X4
X5
X6
X7
X8
X9
Part (b).
No. X1 X2 X3 X4 X5 X6 X7 X8 X9 Y PredictedY Error
1 113 53 210 719 604 374 408 803 944 3056
2 176 854 453 789 939 696 723 597 473 3445
3 237 946 636 533 202 485 945 78 373 6646
4 184 647 584 122 209 312 799 63 196 5970
5 268 914 327 565 45 726 997 32 79 7383
6 409 291 528 31 666 541 854 406 285 5171
7 797 373 401 753 556 121 290 686 703 4040
8 665 340 277 243 100 875 917 608 650 7669
9 904 704 837 58 725 882 937 361 501 6345
10 349 549 803 427 257 800 705 612 82 5742

Question 3. (5 + 4 + 1 Points)
Part (a).
Rules obtained:
Rule 1.
Rule 2.
….
Rule k.
Part (b).
Confusion matrix with test observations:
actual
predicted 0 1
0
1
Part (c).
Prediction accuracy for the 1000 test observations = _______ % (rounded to 2 decimal places)

Explanations for question 1:
Explanations for question 2:
Explanations for question 3:

Looking for answers ?