benlansdell / ethome Goto Github PK
View Code? Open in Web Editor NEWTools for machine learning of animal behavior
Home Page: https://benlansdell.github.io/ethome/
License: MIT License
Tools for machine learning of animal behavior
Home Page: https://benlansdell.github.io/ethome/
License: MIT License
From imcatta JOSS review:
There are two methods to get example data: get_sample_nwb__paths(), which returns NWB data, and get_sample_data_paths(), which returns DLC and BORIS. I suggest renaming the latter to something that recalls DLC and BORIS for consistency.
When running create_dataset the animal_renamer has to be provided as None (even though it's the default value) if not being used, otherwise, at least for me it throws an error like a dict was passed instead of the file path. Happens in read_boris_annotation here when loading the BORIS csv file.
More examples could be provided for different inputs so that the users can quickly navigate or follow an example notebook by just pointing to their directories with data.
For the speeds feature for all my files first five indices are not calculated - which stems from here where dt = features_df['time'].diff(periods = n_shifts) . Same will happen for compute_part_speed here. Because periods=5 first five indices have nothing to be compared to resulting in NaNs, propagating them further in the feature extraction. Then modelling crashes as there are NaNs in the data.
In the How to guide add a clear indication of which features can be added for non-MARS data
From imcatta JOSS review:
Documentation
I struggled a little in following the code presented in the README.
dataset.features.add('cnn1d_prob') If I run this on the nwb example dataset, as suggested above, it tells me that DataFrame doesn't have necessary columns to compute this set of features.. Also, I can’t find which columns are needed. Please consider stating in the documentation what columns are needed and how to get those in the sample dataset.
cross_val_score(..., dataset.ml.labels, ...). No labels are present in the nwb example dataset, so this is not working with the dataset proposed above.
Please add package requirements (e.g. Python versions supported) to the README.
“For this, you must have labeled your body parts in a certain way (refer to How To)”. Please add the link to the How to section.
Please add a link to the web documentation in the README.
It is stated that “dataset.features.add('cnn1d_prob')Uses a pretrained CNN to output probabilities of 3 behaviors (attack, mount, social investigation).”. More information on this is needed. How was this CNN built? Also, I found out that the repository contains 5 pre-trained models, but no information on that is provided.
Some users may not be fully confident with the DLC, SLEAP, NWB, BORIS and NWB file formats. Please explain the different data input formats supported in more detail.
Guidelines for report issues or problems with the software and seek support are missing.
In How To guide, section “3a In-built support for resident-intruder setup”, more information on what is MARS and context should be provided.
About the styling, this is rather minor and quickly fixable - in some places type hints are provided in other they are not and in some function definitions arguments are in separate lines while in others they are in one line (as far as I noted these are in the features part of the module).
In io.py read_DLC_tracks uses splitext but compares to file extensions without the . hence if statement is never True and cannot load h5 files.
Hi! I'm one of the reviewers of your JOSS submission openjournals/joss-reviews#5623.
I noticed that ethome-ml
fails to install when using Poetry, a widely used and advanced Python package manager. I do not consider this as acceptance-blocking as the package can be installed successfully using PIP, but I thought you might want to know.
OS: Ubuntu 22.04 (WSL)
$ poetry add ethome-ml
Using version ^0.6.0 for ethome-ml
Updating dependencies
Resolving dependencies... (5.3s)
Package operations: 74 installs, 1 update, 0 removals
• Installing attrs (23.1.0)
• Installing rpds-py (0.8.10)
• Installing six (1.16.0)
• Installing asttokens (2.2.1)
• Installing executing (1.2.0)
• Installing numpy (1.25.1)
• Installing parso (0.8.3)
• Installing platformdirs (3.8.1)
• Installing ptyprocess (0.7.0)
• Installing pure-eval (0.2.2)
• Installing referencing (0.29.1)
• Installing traitlets (5.9.0)
• Installing wcwidth (0.2.6)
• Installing backcall (0.2.0)
• Installing decorator (5.1.1)
• Installing jedi (0.18.2): Installing...
• Installing joblib (1.3.1)
• Installing jsonschema-specifications (2023.6.1)
• Installing jupyter-core (5.3.1)
• Installing llvmlite (0.34.0): Preparing...
• Installing matplotlib-inline (0.1.6)
• Installing pexpect (4.8.0)
• Installing pickleshare (0.7.5): Pending...
• Installing prompt-toolkit (3.0.39): Pending...
• Installing llvmlite (0.34.0): Failed
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
running bdist_wheel
/tmp/tmpp9_iampk/.venv/bin/python /tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
• Installing joblib (1.3.1)
• Installing jsonschema-specifications (2023.6.1)
• Installing jupyter-core (5.3.1)
• Installing llvmlite (0.34.0): Failed
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
running bdist_wheel
/tmp/tmpp9_iampk/.venv/bin/python /tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
• Installing jedi (0.18.2)
• Installing joblib (1.3.1)
• Installing jsonschema-specifications (2023.6.1)
• Installing jupyter-core (5.3.1)
• Installing llvmlite (0.34.0): Failed
ChefBuildError
Backend subprocess exited when trying to invoke build_wheel
running bdist_wheel
/tmp/tmpp9_iampk/.venv/bin/python /tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py", line 191, in <module>
main()
File "/tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/tmpmpu1hn12/llvmlite-0.34.0/ffi/build.py", line 107, in main_posix
raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
error: command '/tmp/tmpp9_iampk/.venv/bin/python' failed with exit code 1
at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare
143│
144│ error = ChefBuildError("\n\n".join(message_parts))
145│
146│ if error is not None:
→ 147│ raise error from None
148│
149│ return path
150│
151│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with llvmlite (0.34.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "llvmlite (==0.34.0)"'.
• Installing matplotlib-inline (0.1.6)
• Installing pexpect (4.8.0)
• Installing pickleshare (0.7.5)
• Installing prompt-toolkit (3.0.39)
• Installing pygments (2.15.1)
• Installing python-dateutil (2.8.2)
• Installing pytz (2023.3)
• Installing pyzmq (25.1.0)
• Installing ruamel-yaml-clib (0.2.7)
• Installing scipy (1.9.3)
• Updating setuptools (67.8.0 -> 68.0.0)
• Installing stack-data (0.6.2)
• Installing threadpoolctl (3.1.0)
• Installing tornado (6.3.2)
• Installing tzdata (2023.3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.