Press "Enter" to skip to content

Month: April 2023

Passing the Buck: Hyperparameters Edition

John Mount is not a fan of hyperparamters:

In my opinion one can see this scam of hiding some debt in with an asset spreading.

Earliest modeling systems, such as linear regression, had no hyper-parameters. An under specified algorithm was not considered a fully specified method.

Click through for John’s thoughts on the matter. I’m sympathetic to this argument and want to bring in an extra point John didn’t make. With hyperparameter tuning, you also introduce the risk of spurious correlation between the label and input features. This is particularly relevant if changing the seed or making hyperparameter tweaks results in a major change in model effectiveness.

Comments closed

Removing Chartjunk

Elizabeth Ricks takes out the trash:

Why is clutter so hard for us to let go of? Perhaps because we think something has always been there, so it must belong there and we’re afraid of what might happen if we eliminate it. Or perhaps we don’t have a good framework for evaluating whether something is useful or not. 

This same concept applies to our graphs and business communications. We tend to blindly accept the default settings of our tools and very rarely consider if the included elements actually have a purpose. The “Windows XP” question, in this case, is: does this element add enough informative value to make up for its presence?” 

This is one of the most important ideas Edward Tufte championed—other than “pie charts are dumb, so don’t use them”. I don’t completely agree with Tufte’s definition of the term, which is (paraphrasing and going by memory) any marking on the page not absolutely necessary to convey the most relevant details to a viewer. But in this post, Elizabeth shows quite a bit we could remove while losing no critical information.

Comments closed

Parsing Library of Congress Data with Powershell

Robert Cain continues a series on books:

For this demo, we’ll be using an LCCN of 54-9698Elements of radio servicing by William Marcus. When we call the web API URL in our web browser, we get the following data.

Click through for the results of the API call, which happen to be a blob of XML data. Robert shows how to get that data programmatically, then how to shred it into what he needs.

Comments closed

Getting Started with Postgres’s psql

Ryan Booz provides a primer:

PostgreSQL has a separate command-line tool that’s been available for decades and is included with any installation of PostgreSQL. Many long-term PostgreSQL users, developers, and administrators rely on psql to help them quickly connect to databases, examine the schema, and execute SQL queries.

Knowing how to install and use basic psql commands is an essential skill to have for anyone that will connect to PostgreSQL.

Most of the article covers installation and starting up, but before you can write queries, you’ve got to connect to the server and database.

Comments closed

Rounding Errors by Data Type in DAX

Marco Russo and Alberto Ferrari shave of fractions of a cent:

The first reason to choose a data type is the range of numbers supported and the precision. However, the result of a mathematical operation may produce a number that cannot be represented in the chosen data type, which requires a rounding operation. Therefore, the result of one same sequence of operations can produce different results depending on the data type and the order of execution. In this article, we discuss the typical rounding behavior for each data type and how to avoid possible issues in your DAX formulas because of any differences from the results you may have expected.

Read on to learn what granularity limits exist for integers, fixed decimal numbers, and floating point operations.

Comments closed

Using Redis as a Power BI Datasource

Kyle Teegarden has me wondering:

Power BI is a widely used, interactive visualization tool capable of querying a variety of SQL-powered back ends. To accelerate these queries, and provide an even more responsive Power BI user experience, we’ve developed Redis SQL ODBC.

Redis SQL ODBC is a native ODBC driver that lets you seamlessly integrate Azure Cache for Redis Enterprise and Enterprise Flash tiers with Power BI. This may dramatically improve your Power BI query response times.

Knowing that the intent of Redis is individual point lookups, this was a bit surprising. Doing the queries over secondary indexes does help square that circle, however.

Comments closed

R in 10 Minutes

Holger von Jouanne-Diedrich gives us a quick primer on R:

R is a powerful programming language and environment for statistical computing and graphics. In this post, we will provide a quick introduction to R using the famous iris dataset.

We will cover loading data, exploring the dataset, basic data manipulation, and plotting. By the end, you should have a good understanding of how to get started with R, so read on!

Click through for the intro.

Comments closed

Diagramming a Finite State Machine with Mermaid.JS

Matt Eland defeats the boss:

A year or two ago I built a small game prototype that featured a boss fight with a crab monster that was powered by a finite state machine. This monster waited for the player to enter its arena, then descended from the ceiling, roared a challenge, and began fighting the player.

The monster was only damageable after it finished descending. Taking enough damage would make the monster react in pain before it could attack again. Hurting the monster enough caused it to die.

Read on to see how you can model this information in a finite state machine and, from there, how to visualize it with the Mermaid library. I have used Mermaid in the past and can certainly recommend it if you need to generate diagrams programmatically.

Comments closed