transbigdata.grid_params_optimize

transbigdata.grid_params_optimize(data, initialparams, col=['uid', 'lon', 'lat'], optmethod='centerdist', printlog=False, sample=0, pop=15, max_iter=50, w=0.1, c1=0.5, c2=0.5)

Optimize the grid params

Parameters:
  • data (DataFrame) – Trajectory data

  • initialparams (List) – Initial griding params

  • col (List) – Column names [uid,lon,lat]

  • optmethod (str) – The method to optimize: centerdist, gini, gridscount

  • printlog (bool) – Whether to print detail result

  • sample (int) – Sample the data as input, if 0 it will not perform sampling

  • pop – Params in PSO from scikit-opt

  • max_iter – Params in PSO from scikit-opt

  • w – Params in PSO from scikit-opt

  • c1 – Params in PSO from scikit-opt

  • c2 – Params in PSO from scikit-opt

Returns:

params_optimized – Optimized params

Return type:

List