subject
Mathematics, 21.03.2020 10:58 plumagirl

The file CommunityCrime. csv is a dataset containing 319 observations on 123 variables. The observations are communities within the United States. The data combines socio-economic data from the 1990 US Census, law enforcement data from the 1990 US LEMAS survey, and crime data from the 1995 FBI Uniform Crime Reporting program. A detailed description of all variables is available at http://archive. ics. uci. edu/ml/machine-learning-databases/c ommunities/communities. names. We seek to predict the variable ViolentCrimesPerPop, the total number of violent crimes per 100,000 people.

Note: when asked to perform cross validation to select a tuning parameter, be sure to conduct this cross validation on the training data only, then see how well your cross validated tuning parameter does on the test data.

(a). Set a seed of 1 and split the data into a 90% training set, and a 10% test set.

(b). Fit a linear model using least squares on the training set. Report the test error obtained.

(c). Fit a ridge regression model on the training set with λ chosen by cross-validation. Report
the test error obtained.

(d). Fit a lasso model on the training set with λ chosen by cross-validation. Report the test error obtained, along with the number of non-zero coefficient estimates.

(e). Fit a PCR model on the training set with M chosen by crossvalidation. Report the test error obtained along with the value of M selected by cross-validation.

(f). Fit a PLS model on the training set with M chosen by cross-validation. Report the test error obtained, along with the value of M selected by cross-validation.

(g). Comment on the above parts and how well you believe we can predict violent crime rate using these methods.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 15:50
Agreeting card company can produce a box of cards for $7.50. if the initial investment by the company was $50,000, how many boxes of cards must be produced before the average cost per box falls to $10.50?
Answers: 1
question
Mathematics, 21.06.2019 17:00
An airplane consumes fuel at a constant rate while flying through clear skies, and it consumes fuel at a rate of 64 gallons per minute while flying through rain clouds. let c represent the number of minutes the plane can fly through clear skies and r represent the number of minutes the plane can fly through rain clouds without consuming all of its fuel. 56c+64r < 900056c+64r< 9000 according to the inequality, at what rate does the airplane consume fuel while flying through clear skies, and how much fuel does it have before takeoff? the airplane consumes fuel at a rate of gallons per minute while flying through clear skies, and it has gallons of fuel before takeoff. does the airplane have enough fuel to fly for 60 minutes through clear skies and 90 minutes through rain clouds?
Answers: 3
question
Mathematics, 21.06.2019 22:40
Use this graph to find the cost of 6 show tickets
Answers: 1
question
Mathematics, 22.06.2019 00:00
What is the measure of each of the two angles formed by the bisector of the diagonal of a rhombus if the original angle measures 58 degrees?
Answers: 1
You know the right answer?
The file CommunityCrime. csv is a dataset containing 319 observations on 123 variables. The observat...
Questions
question
Chemistry, 25.08.2019 04:00
question
Biology, 25.08.2019 04:00
question
Biology, 25.08.2019 04:00
Questions on the website: 13722362