How to use the retentioneering.core.preprocessing.weight_by_mechanics function in retentioneering

To help you get started, we’ve selected a few retentioneering examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github retentioneering / retentioneering-tools / retentioneering / core / utils.py View on Github external
def weight_by_mechanics(self, main_event_map, **kwargs):
        """
        Calculates weights of mechanics over ``index_col``.

        Parameters
        --------
        main_event_map:
            Mapping of main events into mechanics.
        kwargs:
            ``sklearn.decomposition.LatentDirichletAllocation()`` and ``BaseDataset.retention.extract_features()`` parameters.

        Returns
        --------
        Weights of mechanics for each ``index_col`` and mechanics description.
        """
        mechs, mech_desc = preprocessing.weight_by_mechanics(self._obj, main_event_map, **kwargs)
        return mechs, mech_desc