O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Output from the str() function

  • The str() function tells us that there are 768 observations and 9 variables. All of the variables have been loaded as numeric, except for the target variable diabetes, which has been coded as a factor with two levels.
  • neg indicates the diabetic condition that is not present.
  • pos indicates the diabetic condition that is present.

Again, the str() is a great way to quickly get insights. Always scan for 0's and NA's in the first few rows and start asking yourself if it is reasonable to expect those values.

Refer to the following figure:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required