Search code examples
rtext2vec

How to get IDF Vector with text2vec


is it possible to extract not just the transformed TF-IDF Term-Document Matrix, but also the IDF vector that was used for this transformation with the latest version of text2vec (0.5.1)?

Thank you!


Solution

  • You can access it with:

    model$.__enclos_env__$private$idf
    

    But it is not part of public API (can be easily changed/removed in future without any notification).

    I would like to emphasize - this API should not be used in practice. Please use model$transform() method instead.