Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of HDAs #246

Open
wants to merge 12 commits into
base: 1.3.x
Choose a base branch
from

Conversation

francescodizzia
Copy link

Implementation of several HDAs (Home Location Detection Algorithms) and related variants:

Most Amount / Maximum Amount

  • MA
  • MA-WK
  • MA-WE
  • MA-R

Time Constraint

  • TC
  • TC-WK
  • TC-WE
  • TC-R

Distinct Days

  • DD (Distinct Days)

Inactivity

  • IN (Inactivity)




def home_location_ma(traj, week_period=None, radius=None, mode='sjoin', show_progress=True):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to call this most_amount(..) and then it will be called as

from skmob.measures import home_detection
home_detection.most_amount(..)

return _uid_apply(_home_location_ma, traj, show_progress, week_period=week_period, radius=radius, mode=mode)


def home_location_tc(traj, week_period=None, start_time='22:00', end_time='07:00', radius=None, mode='sjoin', show_progress=True):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as before. Let's use the name of the algorithm as a method name: time_constraint(..)

return (lat, lng)


def _home_location_ma(traj, week_period, radius, mode):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you have a private and a public method for each alg? Can't you just have everything in the same method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants