import numpy as np def jaccard_similarity(x, y): """ Calculate the Jaccard similarity between two vectors x and y Args: - x (np.array): The first vector - y (np.array): The second vector Returns: - the Jaccard similarity between two vectors x and y """ # Q1 # TODO def euclidean_similarity(x, y): """ Calculate the Euclidean similarity between two vectors x and y Args: - x (np.array): The first vector - y (np.array): The second vector Returns: - the Euclidean similarity between two vectors x and y """ # Q2 # TODO def manhattan_similarity(x, y): """ Calculate the Manhattan similarity between two vectors x and y Args: - x (np.array): The first vector - y (np.array): The second vector Returns: - the Manhattan similarity between two vectors x and y """ # Q3 # TODO def cosine_similarity(x, y): """ Calculates the Cosine similarity between two vectors x and y Args: - x (np.array): The first vector - y (np.array): The second vector Returns: - the Cosine similarity between two vectors x and y """ # Q4 # TODO def compute_classification_accuracy(classification_matrix): """ Computes classification accuracy from a classification matrix Args: - classification matrix (np.array): A classification matrix Returns: - The classification accuracy for a classification matrix. """ # Q5 # TODO