imports85: The Automobile Data

Description Usage Format Author(s) Source References See Also Examples

Description

This is the ‘Automobile’ data from the UCI Machine Learning Repository.

Usage

1

Format

imports85 is a data frame with 205 cases (rows) and 26 variables (columns). This data set consists of three types of entities: (a) the specification of an auto in terms of various characteristics, (b) its assigned insurance risk rating, (c) its normalized losses in use as compared to other cars. The second rating corresponds to the degree to which the auto is more risky than its price indicates. Cars are initially assigned a risk factor symbol associated with its price. Then, if it is more risky (or less), this symbol is adjusted by moving it up (or down) the scale. Actuarians call this process ‘symboling’. A value of +3 indicates that the auto is risky, -3 that it is probably pretty safe.

The third factor is the relative average loss payment per insured vehicle year. This value is normalized for all autos within a particular size classification (two-door small, station wagons, sports/speciality, etc...), and represents the average loss per car per year.

Author(s)

Andy Liaw

Source

Originally created by Jeffrey C. Schlimmer, from 1985 Model Import Car and Truck Specifications, 1985 Ward's Automotive Yearbook, Personal Auto Manuals, Insurance Services Office, and Insurance Collision Report, Insurance Institute for Highway Safety.

The original data is at http://www.ics.uci.edu/~mlearn/MLSummary.html.

References

1985 Model Import Car and Truck Specifications, 1985 Ward's Automotive Yearbook.

Personal Auto Manuals, Insurance Services Office, 160 Water Street, New York, NY 10038

Insurance Collision Report, Insurance Institute for Highway Safety, Watergate 600, Washington, DC 20037

See Also

randomForest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(imports85)
imp85 <- imports85[,-2]  # Too many NAs in normalizedLosses.
imp85 <- imp85[complete.cases(imp85), ]
## Drop empty levels for factors.
imp85[] <- lapply(imp85, function(x) if (is.factor(x)) x[, drop=TRUE] else x)

stopifnot(require(randomForest))
price.rf <- randomForest(price ~ ., imp85, do.trace=10, ntree=100)
print(price.rf)
numDoors.rf <- randomForest(numOfDoors ~ ., imp85, do.trace=10, ntree=100)
print(numDoors.rf)

Example output

randomForest 4.6-12
Type rfNews() to see new features/changes/bug fixes.
     |      Out-of-bag   |
Tree |      MSE  %Var(y) |
  10 | 5.883e+06     9.04 |
  20 | 4.918e+06     7.56 |
  30 | 4.478e+06     6.88 |
  40 | 4.412e+06     6.78 |
  50 | 4.098e+06     6.29 |
  60 | 4.053e+06     6.23 |
  70 | 3.997e+06     6.14 |
  80 | 4.004e+06     6.15 |
  90 | 3.99e+06     6.13 |
 100 | 3.955e+06     6.08 |

Call:
 randomForest(formula = price ~ ., data = imp85, do.trace = 10,      ntree = 100) 
               Type of random forest: regression
                     Number of trees: 100
No. of variables tried at each split: 8

          Mean of squared residuals: 3954657
                    % Var explained: 93.92
ntree      OOB      1      2
   10:  12.95% 11.61% 14.81%
   20:  12.44%  8.93% 17.28%
   30:  13.47% 10.71% 17.28%
   40:  13.99% 12.50% 16.05%
   50:  12.95% 11.61% 14.81%
   60:  12.44% 10.71% 14.81%
   70:  11.92%  9.82% 14.81%
   80:  11.92%  9.82% 14.81%
   90:  11.40%  8.93% 14.81%
  100:  10.36%  7.14% 14.81%

Call:
 randomForest(formula = numOfDoors ~ ., data = imp85, do.trace = 10,      ntree = 100) 
               Type of random forest: classification
                     Number of trees: 100
No. of variables tried at each split: 4

        OOB estimate of  error rate: 10.36%
Confusion matrix:
     four two class.error
four  104   8  0.07142857
two    12  69  0.14814815

randomForest documentation built on May 2, 2019, 3:26 p.m.