<jupyter_start><jupyter_text>ground<jupyter_code>liz_ground = "/mnt/Stuff/Acads/UGP/mycode/ground_bach/01-AchGottundHerr-violin.npy"
gl = np.load(liz_ground)
liz_ground = "/mnt/Stuff/Acads/UGP/mycode/ground_/leon_4_02.npy"
gl = np.load(liz_ground)
gl.shape
grmat = np.zeros([61,gl.shape[0]])
for i in range(gl.shape[0]):
    if gl[i]!=0:
        grmat[int(max(gl[i] -1, 0)) , i] +=1
gl.shape[0]
N
n=0
acc = 0
for i in range(2519):
    min = np.max
    pr = np.nonzero(predict[:,i])[0]

    if gl[i] == 0:
        #n-=1
        continue
    if pr.size==0:
        #n-=1
        continue

    x = np.min(abs(pr - gl[i]))
    n+=1
    #print(x)
    if x %12 <2:
        acc+=1
acc/n
n=0
acc = 0
for i in range(2519):
    min = np.max
    pr = np.nonzero(predict[:,i])[0]

    if gl[i] == 0:
        #n-=1
        continue
    if pr.size==0:
        #n-=1
        continue

    x = np.min(abs(pr - gl[i]))
    n+=1
    #print(x)
    if x %12 < 2:
        acc+=1
acc/n<jupyter_output><empty_output><jupyter_text>Raw Pitch and Chroma acc<jupyter_code>def RPA():
    n=N
    acc = 0
    for i in range(N):
        min = np.max
        pr = np.nonzero(predict[:,i])[0]
        
        if gl[i] == 0:
            n-=1
            continue
        if pr.size==0:
            continue
        
        x = np.min(abs(pr - gl[i]))
        
        if x == 0:
            acc+=1
    return acc/n
def RCA():
    n=N
    acc = 0
    for i in range(N):
        min = np.max
        pr = np.nonzero(predict[:,i])[0]
        
        if gl[i] == 0:
            n-=1
            continue
        if pr.size==0:
            continue
        
        x = np.min(abs(pr - gl[i]))
        
        if x % 12 == 0:
            acc+=1
    return acc/n<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1622083096186682, 'fraction_numerical': 0.035287421741605006, 'mean_word_length': 1.592920353982301, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '165168', 'license': 'MIT', 'n_tokens_mistral': 762, 'n_tokens_neox': 737, 'n_words': 150, 'path': 'jupyter notebooks/ground_bach.ipynb', 'repo_name': 'gargrohin/Melody_extraction', 'size': '1757'}