Inverse document frequency vector, only defined if `use_idf=True`. Returns ------- ndarray of shape (n_features,)
(self)
| 2008 | |
| 2009 | @property |
| 2010 | def idf_(self): |
| 2011 | """Inverse document frequency vector, only defined if `use_idf=True`. |
| 2012 | |
| 2013 | Returns |
| 2014 | ------- |
| 2015 | ndarray of shape (n_features,) |
| 2016 | """ |
| 2017 | if not hasattr(self, "_tfidf"): |
| 2018 | raise NotFittedError( |
| 2019 | f"{self.__class__.__name__} is not fitted yet. Call 'fit' with " |
| 2020 | "appropriate arguments before using this attribute." |
| 2021 | ) |
| 2022 | return self._tfidf.idf_ |
| 2023 | |
| 2024 | @idf_.setter |
| 2025 | def idf_(self, value): |
nothing calls this directly
no test coverage detected