Question
What to submit: For this section of the project, you will be submitting a .Rmd file (LastName_FirstName.Rmd) that will contain all the code and written
What to submit: For this section of the project, you will be submitting a .Rmd file (LastName_FirstName.Rmd) that will contain all the code and written answers for the steps mentioned below. a knitted file (LastName_FirstName.pdf ) from the .Rmd file. Details: The R portion of the project will test your ability to wrangle, graph, analyze, and understand a complicated, real-world data set using R. This portion of the project utilizes the tidy version of the data (LastName_FirstName.csv) you generated during the SQL portion of the project. In a .Rmd file, write the code and include written answers to the following steps: Qus 1 - [50 PTS] 1a. Read the data. Tell R to treat admission_type_id, discharge_disposition_id, and admission_source_id as categorical. 1b. Clean the variables `diag_1`, `diag_2`, and `diag_3` using the code you wrote in the Lesson 11 Homework. You should end up with 3 new variables, `diagnosis1`, `diagnosis2`, and `diagnosis3`, containing human-readable interpretations of the ICD-9 billing codes. 1c. Remove the old variables `diag_1`, `diag_2`, `diag_3`. If you created any intermediate variables (such as `injury_cause1`), remove those also. 1d. Use code to determine which columns have no variability (i.e., all rows contain the same value). Print the names of the columns, and remove those columns. Q] 2a. Count the number of missing values that are denoted by NA. Count the number of missing values that are denoted by "?". (In a factor/character variable, R will not automatically ignore rows containing "?".) Which column has the most missing values? 2b. Replace the "?" in the `race` column with NAs. Then use mode imputation to impute the NAs in the data. (Leave the "?" in other columns alone.)
Setup and Explore
1. Calculate mean IsCorrect by gender and premiumpupil. comment 2. Make a variable for the absolute deviation between correct answer and answer value. histogram + comment 3. Add answer date into the merged table (from answers metadata). don't forget to check for typos, outliers, etc. 4. Make an age variable using DOB and and answer date. histogram + comment 5. Replicate [this overlaid histogram](https://www.r-graph-gallery.com/histogram_several_group.html) for distribution of age across genders. comment 6. Make bins for the age variable and find mean of IsCorrect for each bin. Comment 7. Scatter plot: x = age, y = mean of IsCorrect. color based on gender or premiumpupil (either is fine)
Model Building
1. Comment on what relevant features/variables you can get using the metadata tables and how 2. Add some of those variables into your merged dataset 3. Build a linear probability model for IsCorrect 4. Build a logistic probability model 5. Make a grid for lambda 6. Build Ridge for each lambda and find the best using CV 7. Build Lasso for each lambda and find the best using CV 8. Which variables your Lasso models tend to choose? 9. Build an elasticnet model (similar code just alpha = 0.5) and find the best lambda using CV * Check the review session folder and ISLR book for sample code
Test and Compare
1. Build a test dataset using test_private_answers_task_1.csv * you can merge the same characteristics from the metadata tables and make test_merged have the same variables as train_merged 2. Calculate out of sample MSE for each of the models you have built 3. Report them in a table and comment on their performance
https://eedi.com/projects/neurips-education-challenge
The data can be downloaded here at Download Eedi Dataset.
test_private_answers_task_1.csv
Why is my program returning 0 for the area of a triangle? public class GeometricObjects{ private String color = " white "; private boolean filled; private java.util.Date dateCreated; public GeometricObjects0 { dateCreated = new java.util.Date0; public GeometricObjects(String color, boolean filled) dateCreated = new java.util.Date 0: this.color = color; this.filled = filled; public String getColor00 return color; public void setColor(String color) { this.color = color public boolean isFilled 0 { return filled;public void setColor(String color) { this.color = color public boolean isFilled0 { return filled; public void setFilled(boolean filled) { this.filled = filled; public java.util.Date getDateCreated0 { return dateCreated; public String toString0 return "Created on" + dateCreated+ " color"color+"and filled" Below is the class containing the formula for the area of a triangle: import java.lang.Math; public class Triangle extends GeometricObjects { private double side1, side2, side3 1.0; public Trianale0Below is the class containing the formula for the area of a triangle import java.lang.Math; public class Triangle extends GeometricObjects{ private double side1, side2, side3 = 1.0; public Triangle0 { public Triangle(double side1, double side2, double side3) { this.side1 = side1; this.side2 side2; this.side3 = side3; public double setSide10 { return side1; public double setSide20 return side2; public double setSide30 return side3;public double setSide10 { return side1; public double setSide20 return side2; public double setSide30 return side3; public void getSide1(double side1) { this.side1 = side1; public void getSide2(double side2){ this.side2 = side2; public void getSide3(double side3) { this.side3 = side3; public double getPerimeter0 return side1 + side2 +side3;And finally, beloW Is my code for the test class: import java.util.Scanne public class TestGeometricObjects{ private double side1, side2, side3, length, width = 1.0; public static void main(String | args){ Scanner input = new Scanner(System.in); System.out.println("Enter three sides of the triangle: "); double side1 = input.nextDouble0: double side2 = input.nextDouble0: double side3 = input.nextDouble0: System.out.println("'Enter the color of the triangle: "); String triangleColor = input.next0; System.out.printin("ls the triangle filled? Reply with True or False' "); boolean triangleFilled = inputnextBoolean0; Triangle triangle = new Triangle(side1, side2, side3); triangle.setFilled(triangleFilled) triangle.setColor(triangleColor); System.out.println("The triangle's 3 sides are " +side1"," + side2+ ". side3): Cuctom.out nrintln/"Tha trianalo'c oroa ic" trianals cotAroa)):
kindly answer all the questions
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To address the issue with your program returning 0 for the area of the triangle you need to fix the formula to calculate the area Heres a corrected ve...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started