Neville’s Method of Polynomial Interpolation

Neville’s method evaluates a polynomial that passes through a given set of [latex]x[/latex] and [latex]y[/latex] points for a particular [latex]x[/latex] value using the Newton polynomial form. Neville’s method is similar to a now-defunct procedure named Aitken’s algorithm and is based on the divided differences recursion relation (“Neville’s Algorithm”, n.d). It was...

Lagrangian Polynomial Interpolation with R

Polynomial interpolation is the method of determining a polynomial that fits a set of given points. There are several approaches to polynomial interpolation, of which one of the most well known is the Lagrangian method. This post will introduce the Lagrangian method of interpolating polynomials and how to perform the...

Set Theory Ordered Pairs and Cartesian Product with R

Ordered and Unordered Pairs A pair set is a set with two members, for example, [latex]\{2, 3\}[/latex], which can also be thought of as an unordered pair, in that [latex]\{2, 3\} = \{3, 2\}[/latex]. However, we seek a more a strict and rich object that tells us more about two sets...

Algebra of Sets in R

The set operations, union and intersection, the relative complement [latex]-[/latex] and the inclusion relation (subsets) [latex]\subseteq[/latex] are known as the algebra of sets. The algebra of sets can be used to find many identities related to set relations that will be discussed later. We turn now to introducing the relative...

Set Theory Arbitrary Union and Intersection Operations with R

The union and intersection set operations were introduced in a previous post using two sets, [latex]a[/latex] and [latex]b[/latex]. These set operations can be generalized to accept any number of sets. Arbitrary Set Unions Operation Consider a set of infinitely many sets: [latex display="true"] A = \large{\{b_0, b_1, b_2, \cdots \} \large} [/latex] It would...

Set Operations Unions and Intersections in R

The set operations of unions and intersections should ring a bell for those who’ve worked with relational databases and Venn Diagrams. The ‘union’ of two of sets [latex]A[/latex] and [latex]B[/latex] represents a set that comprises all members of [latex]A[/latex] and [latex]B[/latex] (or both). One of the most natural ways to visualize...

Introduction to Set Theory and Sets with R

Sets define a ‘collection’ of objects, or things typically referred to as ‘elements’ or ‘members.’ The concept of sets arises naturally when dealing with any collection of objects, whether it be a group of numbers or anything else. Conceptually, the following examples can be defined as a ‘set’: {1, 2, 3,...

QR Decomposition with Householder Reflections

The more common approach to QR decomposition is employing Householder reflections rather than utilizing Gram-Schmidt. In practice, the Gram-Schmidt procedure is not recommended as it can lead to cancellation that causes inaccuracy of the computation of [latex]q_j[/latex], which may result in a non-orthogonal [latex]Q[/latex] matrix. Householder reflections are another method...

QR Decomposition with the Gram-Schmidt Algorithm

QR decomposition is another technique for decomposing a matrix into a form that is easier to work with in further applications. The QR decomposition technique decomposes a square or rectangular matrix, which we will denote as [latex]A[/latex], into two components, [latex]Q[/latex], and [latex]R[/latex]. [latex display="true"] A = QR [/latex] Where [latex]Q[/latex] is...

Hierarchical Clustering Nearest Neighbors Algorithm in R

Hierarchical clustering is a widely used and popular tool in statistics and data mining for grouping data into ‘clusters’ that exposes similarities or dissimilarities in the data. There are many approaches to hierarchical clustering as it is not possible to investigate all clustering possibilities. One set of approaches to hierarchical...