Monitor: Using category labels

July 26, 2012

(This article was first published on NIR-Quimiometría, and kindly contributed to R-bloggers)

I´ve been checking recently the performance of a calibration of compound feed with  a set of samples (15): 3 samples of hen feed, 3 of pig feed, 3 of chicken feed, 3 of ovine feed and 3 of cattle feed.
The idea is to check if the calibration predicts correctly the results, but in this post I will visualize the plots in order to get conclusions.
Sample set has been imported into R with a column called “Category” (with the labels of feed types: hen, pig,).
I will check just the protein X-Y plots:



I will not go into details of the statistics this time, just interpretation.
Chicken seems quite well predicted and the 3 samples fits fine into the 0 intercept, 1 slope line. Same for pig feed.
Sheep feed is a little bit worse but could be fine.
I have problems with hen feed (high residuals and low variability in the test set).
For cattle feed I have a bias problem (one of the methods is predicting higher than the other), we need to check with more samples to confirm this tendency.
Comments are welcome about how to improve this plot with colors for the categories.

To leave a comment for the author, please follow the link and comment on their blog: NIR-Quimiometría. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...


Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)