<commit_before>
#return the symmetric part of the graph/matrix
function symmetrize(A)
    return (A+A')/2
end

#normalize: a matrix along a dimension 1 means column stochastic.
function normalize(A, dim::Int)
    return A./sum(A,dim)
end
<commit_msg>compute residuals in the naive way<commit_after>
#return the symmetric part of the graph/matrix
function symmetrize(A)
    return (A+A')/2
end

#normalize: a matrix along a dimension 1 means column stochastic.
function normalize(A, dim::Int)
    return A./sum(A,dim)
end

function residuals(A,W,H)
    sum(.^(A-W*H, 2), 1)
end


{'fraction_non_alphanumeric': 0.11072664359861592, 'fraction_numerical': 0.010380622837370242, 'mean_word_length': 4.462264150943396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6833963', 'n_tokens_mistral': 208, 'n_tokens_neox': 191, 'n_words': 69}