Calculating Surprise Values in ClojureScript

Saturday, April 01, 2017

Earlier this year I rewrote Ben Birnbaum’s outlier-detect Python code in ClojureScript and combined it with some very simple React glue code to build an on-demand s-Value calculator. s-Values represent the amount of surprise in a grouped value relative to other data in a larger dataset. A higher s-Value means the data is less expected.

The output is based on what Birnbaum presented as a screenshot of a prototype in his dissertation, Algorithmic approaches to detecting interviewer fabrication in surveys. In that version the color of the text changed depending on the s-Value. In my version the text color is constant but the background color of the cells are different shades of red, with darker shades indicating an s-Value more standard deviations from the mean for that row.

ghetto

You can use the web interface to generate s-Values by URL from a JSON file represented as a list of maps, or use your Ona.io credentials to load data in your account. This is very much a work in progress, please get in touch or open an issue with any feedback or ideas you have.

Peter
Lubell-Doughtie

about
projects
archive