singular value decomposition

[[concept]]

Topics

const fieldName = "theme"; // Your field with links
const oldPrefix = "Thoughts/01 Themes/";
const newPrefix = "Digital Garden/Topics/";
 
const relatedLinks = dv.current()[fieldName];
 
if (Array.isArray(relatedLinks)) {
    // Map over the links, replace the path, and output only clickable links
    dv.el("span",
        relatedLinks
            .map(link => {
                if (link && link.path) {
                    let newPath = link.path.startsWith(oldPrefix)
                        ? link.path.replace(oldPrefix, newPrefix)
                        : link.path;
                    return dv.fileLink(newPath);
                }
            })
            .filter(Boolean).join(", ") 
	// Remove any undefined/null items
    );
} else {
    dv.el(dv.current().theme);
}
 
 

Definitions

Theorem (Matrix Analysis 1)

Theorem (Matrix Analysis 2)

Theorem (Singular Value Decomposition)

For any , there exists , both unitary and “diagonal” with real, nonnegative, nonincreasing, entries such that

Further, if is real-valued, we can take each of to be real.

(we take “diagonal” to mean that the only entries that can be nonzero have the same row and column index)

Note

  • We can think of this as a generalization of diagonalization/spectral decomposition, but where the loss is that and are distinct.
  • if is positive semidefinite, then the diagonalization is the singular value decomposition since we have that for some unitary and nonnegative all real.

, then by the previous definition here we have where unitary, diagonal, and with orthogonal columns. Since , we add columns of zeros to to make it size . Then we can append orthogonal rows to with Gram-Schmidt to get a

If

If , then is SVD by the above case. But then is an SVD of !

Another Definition (Data Science)

Notes on SVD

Say and its SVD. Suppose there are non-negative singular values call them . Denote the columns of and the rows of . Then

  1. - easy to see from (1)
  2. - easy to see from (1)
  3. For any , we have

To see (5) and (6) , recall that and we simply apply (3) and (4) in this case.

To see (7), note that

  • Note is by Rayleigh-Ritz that this equals the largest eigenvalue of .
  • Then is by the fact that the eigenvalues of - ie the eigenvalues are the squared singular values of .

References

References

See Also

Mentions

Mentions

const modules = await cJS()
 
const COLUMNS = [  
	{ id: "Name", value: page => page.$link },  
	{ id: "Last Modified", value: page => modules.dateTime.getLastMod(page) },
];  
  
return function View() {  
	const current = dc.useCurrentFile();
// Selecting `#game` pages, for example. 
	let queryString = `@page and linksto(${current.$link})`;
	let pages = dc.useQuery(queryString);
	
	// check types
	pages = pages.filter( (p) => !modules.typeCheck.checkAll(p, current) ).sort()
	
	
	return <dc.Table columns={COLUMNS} rows={pages} paging={20}/>;  
}  
const { dateTime } = await cJS()
 
return function View() {
	const file = dc.useCurrentFile();
	return <p class="dv-modified">Created {dateTime.getCreated(file)}     ֍     Last Modified {dateTime.getLastMod(file)}</p>
}