Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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