For some reason, sqlite3 repeats evaluation of the same function calls for each row in a query, so, e.g.,
ESTIMATE MUTUAL INFORMATION AS mutinf
FROM PAIRWISE COLUMNS OF t
ORDER BY mutinf
evaluates mutual information for each pair of columns twice (actually, four times, because mutual information is symmetric, but that's a separate issue). Using a subquery avoids the problem:
SELECT *
FROM (ESTIMATE MUTUAL INFORMATION AS mutinf
FROM PAIRWISE COLUMNS OF t)
ORDER BY mutinf
But this is silly. I looked into this briefly in sqlite3 but didn't find any obvious information about how to make sqlite3 save the result -- especially if it's already going to be stored in the result table anyway!
For some reason, sqlite3 repeats evaluation of the same function calls for each row in a query, so, e.g.,
evaluates mutual information for each pair of columns twice (actually, four times, because mutual information is symmetric, but that's a separate issue). Using a subquery avoids the problem:
But this is silly. I looked into this briefly in sqlite3 but didn't find any obvious information about how to make sqlite3 save the result -- especially if it's already going to be stored in the result table anyway!