Skip to content
Snippets Groups Projects
Commit 1e3af0be authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Implement full part 3

parent 9cd7b34f
Branches
No related merge requests found
......@@ -393,6 +393,19 @@ def calc_part_3():
logger.info('minkowski distance of 2: {0}'.format(mink_dist_2))
logger.info('minkowski distance of inf: {0}'.format(mink_dist_inf))
# Get cosine similarity.
cosine_similarity = RelationalAnalysis.cosine_similarity(lib_array, 'CML', 'CBL')
# Get kl divergence.
cml_dict = {}
cbl_dict = {}
for index in range(len(cml_array)):
cml_dict[index] = cml_array[index]
cbl_dict[index] = cbl_array[index]
adjusted_lib_array = [cml_dict, cbl_dict]
kl_divergence = RelationalAnalysis.kl_divergence(adjusted_lib_array, 0, 1)
def calc_part_4():
"""
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment