def similarity_to_connection(matrix, rows, columns, threshold):
    """ Convert similarity to connections
    
    Parameters
    ----------
    matrix : np.array
        Similarity matrix
    rows : list
        Components 0
    columns : list
        Components 1
    threshold : float
        Threshold for connections
    
    Returns
    -------  
    connections : list (tuples)
        Connections between components       
    """     

    # Calculation
    connections = []
    for col in range(matrix.shape[0]):
        for row in range(matrix.shape[1]):
            if matrix[col, row] < threshold:
                connections.append([columns[row], rows[col]])
                
    return connections