specific_term_estimators module¶
-
wayward.specific_term_estimators.
idf_fallback_for_many_docs
(document_term_frequencies: Sequence[numpy.ndarray], primary_estimator: Callable[[Sequence[numpy.ndarray]], numpy.ndarray], fallback_thresh: int)[source]¶
-
wayward.specific_term_estimators.
inverse_doc_frequency
(document_term_frequencies: Sequence[numpy.ndarray]) → numpy.ndarray[source]¶ Estimate the fixed specific model with the inverse doc frequency method.
-
wayward.specific_term_estimators.
me_up_to_40_docs
(document_term_frequencies: Sequence[np.ndarray], *, primary_estimator: SpecificTermEstimator = <function mutual_exclusion>, fallback_thresh: int = 40)¶
-
wayward.specific_term_estimators.
mutual_exclusion
(document_term_frequencies: Sequence[numpy.ndarray]) → numpy.ndarray[source]¶ Estimate the fixed specific model with the mutual exclusion method.
-
wayward.specific_term_estimators.
requires_multiple_docs
(estimator_func: Callable[[Sequence[numpy.ndarray]], numpy.ndarray])[source]¶ Do not let the decorated function be called with fewer than two docs.
Parameters: estimator_func (SpecificTermEstimator) – Raises: RequiresMultipleDocuments
Returns: decorated_func Return type: SpecificTermEstimator