GithubHelp home page GithubHelp logo

traj-dist's People

Contributors

bguillouet avatar djjavo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

traj-dist's Issues

Cant run this program: traj-dist

Hello,

Can someone please help me run the program located at: https://github.com/bguillouet/traj-dist

So I followed the instructions and did this:

  1. Navigate to the folder where traj-dist is
  2. python setup.py install
  3. pip install .
  4. After this I don't know how to proceed, I went into traj_dist folder and tried to run every python file, but I kept getting an error every time.

So if anyone can help me out here and help to run this python project, I would highly appreciate it.

There is a problem in the part of erp.py

I think there is a problem in the initialization of C, where:
C[1:, 0] = sum(gt0_dist)
C[0, 1:] = sum(gt1_dist)

It should be:
j = 1
sum = 0
for i in gt0_dist:
sum += i
C[j, 0] = sum
j += 1

Same to the C[0, 1:]

Windows error

Hello, I have tryed to run your code on Windows and I always get the same error, "ModuleNotFoundError: No module named 'setuptools'"
Of course I have an upgraded setuptools package but still I get the error message.
Here the commans I used:

pip install NumPy Cython shapely geohash2 pandas scipy # To be sure about the requirement--> all ok
pip install setuptools # all ok

pip install setup.py #--> all ok

pip install . # -->ERROR: Exception:... ModuleNotFoundError: No module named 'setuptools'
I hope you can help me. Thanks a lot.

My python version--> python 3.8.2
My pip -version--> pip 20.1.1 from c:\users\usuario\appdata\local\programs\python\python38\lib\site-packages\pip (python 3.8)

how to run this ?? HELP PLEASE URGENT !!!

Hello,

Can someone please help me run the program located at: https://github.com/bguillouet/traj-dist
if you want to contact me, contact me at: [email protected]

So I followed the instructions and did this:

Navigate to the folder where traj-dist is
python setup.py install
pip install .
After this I don't know how to proceed, I went into traj_dist folder and tried to run every python file, but I kept getting an error every time.
So if anyone can help me out here and help to run this python project, I would highly appreciate it.

pydist and windows support

Hey, great job but is there a way to avoid this error on windows ?
Thanks !

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-12-3c704a212d75> in <module>()
----> 1 import traj_dist.distance as tdist

c:\users\<placeholder>\appdata\local\conda\conda\envs\playground\lib\site-packages\traj_dist\distance.py in <module>()
----> 1 from pydist.linecell import trajectory_set_grid
      2 
      3 from cydist.sspd import c_e_sspd, c_g_sspd
      4 from cydist.dtw import c_e_dtw, c_g_dtw
      5 from cydist.erp import c_e_erp, c_g_erp

ModuleNotFoundError: No module named 'pydist'

error: no commands supplied

hi. i'm trying to install the package but when running setup.py in pycharm i got this error:
C:\Users\user\AppData\Local\Programs\Python\Python38\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'download_urt' error: no commands supplied

does anybody know how to fix it?by the way is there a way to run this package in browser notebooks like jupyter?

ModuleNotFoundError: No module named 'setuptools'

Hey guys, I have a problem when running the command line pip install , it gets me these errors:

ERROR: Exception:
Traceback (most recent call last):
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
status = self.run(options, args)
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 178, inwrapper
return func(self, options, args)
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 316, in run
requirement_set = resolver.resolve(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 100, in resolve
r = self.factory.make_requirement_from_install_req(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 301, in make_requirement_from_install_req
cand = self._make_candidate_from_link(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 167, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 300, in init
super().init(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 144, in init
self.dist = self._prepare()
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare
dist = self._prepare_distribution()
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 311, in _prepare_distribution
return self._factory.preparer.prepare_linked_requirement(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 457,in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 500,in _prepare_linked_requirement
dist = _get_prepared_distribution(
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 66, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 39,in prepare_distribution_metadata
self._setup_isolation(finder)
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 97,in _setup_isolation
reqs = backend.get_requires_for_build_wheel()
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 177, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 284, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 86, in_build_backend
obj = import_module(mod_path)
File "/home/jovyan/anaconda3/envs/pytorch_vn/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

Thank you for your help.

ModuleNotFoundError: No module named 'cydist.sspd' with Python 3

Hi! I'm trying to run the examples using python 3, and I'm getting the following error:

[silencer@myhostname traj_dist]$ python example.py 
Traceback (most recent call last):
  File "example.py", line 2, in <module>
    import traj_dist.distance as tdist
  File "/usr/lib/python3.6/site-packages/traj_dist/distance.py", line 3, in <module>
    from cydist.sspd import c_e_sspd, c_g_sspd
ModuleNotFoundError: No module named 'cydist.sspd'

I have installed it as per the readme file. It is working in python 2, however.

Do you have any idea about what could be happening? I'd like to use this library with python 3.

Thank you for your hard work!
Rodrigo

dtw values comparison with tslearn

Hi! Comparing the values of DTW (with euclidean distance) from traj-dist and tslearn library, weren't the values supposed to be the same?

Thanks in advance.

No module named 'traj_dist.cydist.sspd'

Hi and thanks for such a good work.
I'm having troubles when I try to import traj_dist.distance as tdist. I get this error:
ModuleNotFoundError: No module named 'traj_dist.cydist.sspd'
do you know what is the problem?
I made the follow process to install the package:

  • I installed the Dependencies:
  • NumPy >= 1.16.2
  • Cython >= 0.29.6
  • shapely >= 1.6.4.post2
  • geohash2 == 1.1
  • pandas >= 0.24.2
  • scipy >= 0.20.3
  • A working C/C++ compiler.
    (# sudo python3 -m pip install Numpy Cython shapely geohash2 pandas scipy )--it works!
  • I made the next step:

sudo python3 setup.py install -- it works!

  • Then,

python3 -m pip install . --it works!

  • Finally,

python3 ./example.py --It doesn't work !

Here what I got:
import traj_dist.distance as tdist2
File "/home/equipo/Documentos/traj-dist-master/traj_dist/distance.py", line 3, in
from .cydist.sspd import c_e_sspd, c_g_sspd
ModuleNotFoundError: No module named 'traj_dist.cydist.sspd'

could you give me a light with this?
Thanks!

Installation seems fine but import-issues

Hey,
I don't know if someone still reads this, but I'm trying to run this package in python 3.10.

I installed it, via

  1. Git clone

  2. Inserting a cast to an int in the last function in frechet (line 534..), because it didnt compile:

          while(len(cc)!=1):
          m_i=int(len(cc)/2-1)
          eps = cc[m_i]
          rep = _decision_problem(P,Q,p,q,eps)
          if rep:
              cc=cc[:m_i+1]
          else:
              cc=cc[m_i+1:]
         return eps
    
  3. Inserting some requires into pyproject.toml, as in this issue :

       [build-system]
       requires = [
           "setuptools",
           "Cython>=0.27.3",  # Note: sync with setup.py
           "numpy"
       ]
       build-backend = "setuptools.build_meta"
    
  4. python setup.py install

  5. pip install .

With the changes, the installation seems to work.
But when I try to import the distance module via
import traj_dist.distance as tdist I get the following error:

      (synth_privacy_evaluation) ➜  privacyrisk git:(main) ✗ python example.py
      Traceback (most recent call last):
        File "/Users/alex/PycharmProjects/synth_privacy_evaluation/privacyrisk/example.py", line 12, in <module>
          import privrisk
        File "/Users/alex/PycharmProjects/synth_privacy_evaluation/privacyrisk/privrisk.py", line 10, in <module>
          import traj_dist.distance as tdist
        File "/Applications/anaconda3/envs/synth_privacy_evaluation/lib/python3.10/site-packages/traj_dist/distance.py", line 3, in <module>
          from .cydist.sspd import c_e_sspd, c_g_sspd
        File "traj_dist/cydist/sspd.pyx", line 8, in init traj_dist.cydist.sspd
      ModuleNotFoundError: No module named 'basic_euclidean'

I tried to change the imports and add paths manually, but that didn't work either. So if you could help me, that would be really nice!

How to define the spatial distance ε for EDR and LCSS similarity algorithms?

I observe on code the eps (ε) is set to 200 for LCSS.

Let's assume a dataset with human trajectories like Geolife. I want to measure the similarity of two random trajectories from this dataset using the EDR or/and LCSS algorithm(s).

I wonder, which factors to consider in order to define the value of spatial distance threshold ε used by EDR and LCSS?

I suppose that if I use a different dataset, like Hurricanes or Animals movements, this threshold should be different as the movement pattern is different. The speed of a hurricane is different than the speed of a walking human.

Also, the sampling rate is something to take into consideration?

Unable to import even on Python 2.7.5

import traj_dist.distance as tdist
Traceback (most recent call last):
File "", line 1, in
File "traj_dist/distance.py", line 3, in
from cydist.sspd import c_e_sspd, c_g_sspd
ImportError: No module named sspd

From earlier issues - it seems Python 3 is not supported. But I am installing it in an environment with Python 2.7.5 still gives the above error. Please help to resolve the same.

benchmark_trajectories.pkl file

I execute example.py in python but I have problem File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\pickle.py", line 1528, in load_global
klass = self.find_class(module, name)
File "C:\Users\hp\AppData\Local\Programs\Python\Python39\lib\pickle.py", line 1579, in find_class
import(module, level=0)
ModuleNotFoundError: No module named 'numpy.core.multiarray\r'

Error occur when installing

When I run pip install ., I come across the following error

Processing /home/local/trajectory-similarity/data/traj-dist
  Installing build dependencies ... done
  WARNING: Missing build requirements in pyproject.toml for file:///mnt/home/cyq/trajectory-similarity/data/traj-dist.
  WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
    status = self.run(options, args)
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 316, in run
    requirement_set = resolver.resolve(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 100, in resolve
    r = self.factory.make_requirement_from_install_req(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 301, in make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 167, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 300, in __init__
    super().__init__(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 311, in _prepare_distribution
    return self._factory.preparer.prepare_linked_requirement(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 457, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 500, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 66, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 39, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 97, in _setup_isolation
    reqs = backend.get_requires_for_build_wheel()
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 177, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/wrappers.py", line 284, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
  File "<frozen zipimport>", line 520, in _get_decompress_func
ModuleNotFoundError: No module named 'zlib'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen zipimport>", line 568, in _get_data
  File "<frozen zipimport>", line 523, in _get_decompress_func
zipimport.ZipImportError: can't decompress data; zlib not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/local/anaconda3/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 86, in _build_backend
    obj = import_module(mod_path)
  File "/home/local/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "<frozen zipimport>", line 241, in load_module
  File "<frozen zipimport>", line 709, in _get_module_code
  File "<frozen zipimport>", line 570, in _get_data
zipimport.ZipImportError: can't decompress data; zlib not available

However, when I run whereis zlib, I found that zlib is already installed:

zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz

Can you help me with the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.