## Mathpy 0.2.0 Released!

My Python library, mathpy, a collection of mathematical and statistical functions with Excel integration, has a new release! Version 0.2.0 introduces a ton of additional mathematical and statistical functions have been added in this release along with a large effort centered on documentation and testing. Installing the package is easily accomplished...

## 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 $q_j$, which may result in a non-orthogonal $Q$ 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 $A$, into two components, $Q$, and $R$. [latex display="true"] A = QR [/latex] Where $Q$ 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...

## Iterated Principal Factor Method of Factor Analysis with R

The iterated principal factor method is an extension of the principal factor method that seeks improved estimates of the communality. As seen in the previous post on the principal factor method, initial estimates of $R - \hat{\Psi}$ or $S - \hat{\Psi}$ are found to obtain $\hat{\Lambda}$ from which the factors...

## Factor Analysis with the Principal Factor Method and R

As discussed in a previous post on the principal component method of factor analysis, the $\hat{\Psi}$ term in the estimated covariance matrix $S$, $S = \hat{\Lambda} \hat{\Lambda}' + \hat{\Psi}$, was excluded and we proceeded directly to factoring $S$ and $R$. The principal factor method of factor analysis (also called the...

## Factor Analysis with the Principal Component Method Part Two

In the first post on factor analysis, we examined computing the estimated covariance matrix $S$ of the rootstock data and proceeded to find two factors that fit most of the variance of the data using the principal component method. However, the variables in the data are not on the same...

## Factor Analysis Introduction with the Principal Component Method and R

Factor analysis is a controversial technique that represents the variables of a dataset $y_1, y_2, \cdots, y_p$ as linearly related to random, unobservable variables called factors, denoted $f_1, f_2, \cdots, f_m$ where $m \lt p$. The factors are representative of ‘latent variables’ underlying the original variables. The existence of the...

## Image Compression with Principal Component Analysis

Image compression with principal component analysis is a frequently occurring application of the dimension reduction technique. Recall from a previous post that employed singular value decomposition to compress an image, that an image is a matrix of pixels represented by RGB color values. Thus, principal component analysis can be used...

## Principal Component Analysis

Often, it is not helpful or informative to only look at all the variables in a dataset for correlations or covariances. A preferable approach is to derive new variables from the original variables that preserve most of the information given by their variances. Principal component analysis is a widely used...