-
Notifications
You must be signed in to change notification settings - Fork 189
math overview
This page describes the implementation of Polis' core math algorithms.
The core math code can be found in the polismath.math.*
namespaces namespaces.
Things specifically come together in the polismath.math.conversation
namespace, in the conv-update
function.
This function is implemented in terms of the small-conv-update-graph
map.
This is compiled using the plumatic/plumbing
library, which allows us to specify a series of data transformations as a Clojure map, and compile this map into a single function which performs all of the individual operations.
-
conv
- previousconv
map -
votes
- new votes -
opts
- options map for configuring the algorithm(s)
The output of the conv-update
process is a new conv
map, with the following (notable) entries:
-
rating-mat
- the vote matrix, as a NamedMatrix (named rows & columns), withnil
entries for missing data -
mat
- the vote matrix, with missing data imputed by columnwise means -
pca
- results of the Principal Components Analysis -
proj
- projection of the data, given thepca
-
repness
- representativeness values -
base-clusters
- a fine grained clustering (K-means clusters, with K=100) -
group-clusters
- a course grained group clustering, with the number of groups chosen by silhouette coefficient - etc.
The following figure represents the flow of data in the small-conv-update-graph
:
Note that this figure is generated directly from the small-conv-update-graph
(one of the advantages of the computational flow being specified as a data structure).