Skip to content

Instantly share code, notes, and snippets.

@IwanThomas
IwanThomas / SQL Database Search.sql
Last active May 24, 2017 14:14
Searching around a Database
select name from sys.tables where name like '%%';
select t.name as TableName, c.name as ColumnName
from sys.columns c join sys.tables t on c.object_id = t.object_id
where c.name like '%%'
@IwanThomas
IwanThomas / Handling Variables.md
Last active June 21, 2017 10:38
Handling Variables in Regression

Sources:

The Paper Learning When to Be Discrete: Continuous vs. Categorical Predictors by David Pasta

There can be instances where it makes sense to treat a continuous predictor as categorical and a categorical predictor as continuous.

Treating a continuous predictor as categorical

  • If the continuous variable has a linear relationship with the outcome, converting it into a categorical variable can remove information.
  • On the other hand, if the relationship is not perfectly linear, then choosing to make the variable categorical can make sense enabling you to capture more complicated relationships.