def tfidf_weighted(model, given_users):
    # get submatrix for given users (still sparse)
    U_given = __weighted_user_profiles(model.R()[given_users], model.I())
    # having given user profiles in U_given and all item profiles, compute pairwise similarity (distance)
    # using cosine distance function
    scores = cosine(U_given, model.I())

    # now set to -999 scores of all items rated by user
    # as we're working from dense matrix given_users x items, 
    # use the corresponding part of ratings matrix to mask all cells with ratings and fill them with -999
    # -999 is used because if there's less than n item user likes, we'll recommend some with score < 0
    return np.ma.masked_array(scores.todense(), model.R()[given_users].todense()).filled(-999)
Unbinds the methods and class variables from the DCOSConfig
dataset/ETHPy150Open ksavenkov/recsys-001/recsys/score.py/tfidf_weighted--crossover with--dataset/ETHPy150Open dcos/dcos/ext/dcos-installer/dcos_installer/config/__init__.py/DCOSConfig._unbind_configuration