Пример #1
0
def critiqueTagLess(baseDict, tag):
    #given a tag, return songs that are similar to inputed tag vector, but less *tag*
    newBase = baseDict
    if not baseDict.has_key(tag):
        newBase[tag] = 0
    else:
        newBase[tag] -=15
    return calcSimilarity.allCorrelations(newBase)
Пример #2
0
def initialSims(tid):
    # returns original top 5 similar songs for a given track
    baseGenome = songDict[tid]
    return calcSimilarity.allCorrelations(baseGenome)