Giter VIP home page Giter VIP logo

derohde / fred Goto Github PK

View Code? Open in Web Editor NEW
41.0 2.0 8.0 571 KB

A fast, scalable and light-weight C++ Fréchet and DTW distance library, exposed to python and focused on clustering of polygonal curves.

Home Page: https://pypi.org/project/Fred-Frechet/

License: MIT License

Makefile 0.08% C++ 78.41% Python 20.75% CMake 0.77%
polygonal-chain frechet-distance time-series clustering dimension-reduction continuous-frechet-distance fr-chet-distance dimensional-polygonal-curves nearest-centers python

fred's People

Contributors

derohde 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

Watchers

 avatar  avatar

fred's Issues

install error with `boost_python` in Ubuntu 18.04

Hi, I am unable to install the package because of boost_python in ubuntu 18.04. I think it maybe because of I installed miniconda3. I tried changing the python path in install boost 1.74.0 and also "-DPYTHON_EXECUTABLE" in setup.py, but it still does not work. The full error message can be found in the following.

cd py && /usr/bin/python3 ./setup.py install --user
running install
running bdist_egg
running egg_info
writing Fred.egg-info/PKG-INFO
writing dependency_links to Fred.egg-info/dependency_links.txt
writing requirements to Fred.egg-info/requires.txt
writing top-level names to Fred.egg-info/top_level.txt
reading manifest file 'Fred.egg-info/SOURCES.txt'
writing manifest file 'Fred.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
CMake Error at /home/ubuntu/miniconda3/envs/tra/lib/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package):
  Could not find a package configuration file provided by "boost_python"
  (requested version 1.74.0) with any of the following names:

    boost_pythonConfig.cmake
    boost_python-config.cmake

  Add the installation prefix of "boost_python" to CMAKE_PREFIX_PATH or set
  "boost_python_DIR" to a directory containing one of the above files.  If
  "boost_python" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /home/ubuntu/miniconda3/envs/tra/lib/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component)
  /home/ubuntu/cmake-3.17.5-Linux-x86_64/share/cmake-3.17/Modules/FindBoost.cmake:444 (find_package)
  CMakeLists.txt:21 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/Program/Fred/py/build/temp.linux-x86_64-3.8/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "./setup.py", line 77, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 172, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command
    self.run_command(cmdname)
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 24, in run
    self.build()
  File "/usr/lib/python3.8/distutils/command/install_lib.py", line 109, in build
    self.run_command('build_ext')
  File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "./setup.py", line 36, in run
    self.build_extension(ext)
  File "./setup.py", line 72, in build_extension
    subprocess.check_call(['cmake', "{}/..".format(ext.sourcedir)] + cmake_args,
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/home/ubuntu/Program/Fred/py/..', '-DBPY=python38', '-DBNPY=numpy38', '-DBOOST_ROOT=~/boost', '-DBOOST_LIBRARYDIR=~/boost/lib', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/Program/Fred/py/build/lib.linux-x86_64-3.8/Fred', '-DPYTHON_EXECUTABLE=/home/ubuntu/miniconda3/envs/tra/bin/python', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
Makefile:9: recipe for target 'install' failed
make: *** [install] Error 1

minimum_error_simplification bug

predecessor = predecessors[predecessor][--ell];

The referenced line should be executed one time less. On the last iteration of the loop 'ell' becomes -1, which is a bug. As a workaround this line can be prefixed with something like 'if (i < l - 1)' or 'if (ell)' like below:

        curve_size_t ell = l;
        
        result.push_back(curve.back());
        curve_size_t predecessor = predecessors[curve.complexity() - 1][--ell];
        
        for (curve_size_t i = 0; i  < l; ++i) {
            result.push_back(curve[predecessor]);
            if (i < l - 1)  // or if (ell)
                predecessor = predecessors[predecessor][--ell];
        }

Wrong call of functions in the readme

In the README.md, multiple call of discrete_klcenter and discrete_klmedian should be fred.discrete_klcenter_multi and fred.discrete_klmedian_multi respectively.

Is it possible to provide examples of using fred.discrete_klcenter_multi and fred.discrete_klmedian_multi in the mini-example?

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.