R on OranLooney.com
http://www.oranlooney.com/tags/r/
Recent content in R on OranLooney.com
Hugo  gohugo.io
en
© Copyright 2018 Oran Looney
Thu, 23 Aug 2018 00:00:00 +0000

Visualizing Multiclass Classification Results
http://www.oranlooney.com/post/viztsne/
Thu, 23 Aug 2018 00:00:00 +0000
http://www.oranlooney.com/post/viztsne/
Introduction Visualizing the results of a binary classifier is already a challenge, but having more than two classes aggravates the matter considerably.
Let’s say we have $k$ classes. Then for each observation, there is one correct prediction and $k1$ possible incorrect prediction. Instead of a $2 \times 2$ confusion matrix, we have a $k^2$ possibilities. Instead of having two kinds of error, false positives and false negatives, we have $k(k1)$ kinds of errors.

Complex Numbers in R, Part II
http://www.oranlooney.com/post/complexrpart2/
Sat, 30 Jun 2018 00:00:00 +0000
http://www.oranlooney.com/post/complexrpart2/
This post is part of a series on complex number functionality in the R programming language. You may want to read Part I before continuing if you are not already comfortable with the basics.
In Part I of this series, we dipped our toes in the water by explicitly creating some complex numbers and showing how they worked with the most basic mathematical operators, functions, and plots.
In this second part, we’ll take a more indepth look at some scenarios where complex numbers arise naturally – where they are less of a choice an more of a necessity.

Complex Numbers in R, Part I
http://www.oranlooney.com/post/complexr/
Sun, 17 Jun 2018 00:00:00 +0000
http://www.oranlooney.com/post/complexr/
R, like many scientific programming languages, has firstclass support for complex numbers. And, just as in most other programming languages, this functionality is ignored by the vast majority of users.
Yet complex numbers can often offer surprisingly elegant formulations and solutions to problems. I want to convince you that familiarizing yourself with R’s excellent complex number functionality is well worth the effort and will pay off in two different ways: first by showing you how they are so amazingly useful you’ll want to go out of your way to use them, and then by showing you how they are so common and fundamental to modern analysis that you couldn’t avoid them if you wanted to.