Skip to main content

A python package for supervised learning of behavioral modes from sensor data.

Project description

pyecoacc

A python package for supervised learning of behavioral modes from sensor data.

pyecoacc is built on top of sklearn and pytorch, and provides convenient pipelines of feature computations and other preprocessing necessary to easily run behavior classification on sensor data. This package contains easy to use out of the box optoins, together with extendability and customization.

Documentation

You can find the full documentation here. Complete workflow examples can be found in the examples folder.

📦 Installation

Install from PyPI:

pip install pyecoacc   

Or from the source:

git clone https://github.com/Hezi-Resheff/pyecoacc.git
cd pyecoacc
pip install .

🔗 Dependencies

All required dependencies are listed in requirements.txt. To install them manually:

pip install -r requirements.txt

🧑‍💻 Usage

pyecoacc allows a wide range of classifiers ranging from simple out of the box models, to custom pipelines and deep learning.

Simple out of the box classifier:

from pyecoacc.models.pipeline import get_default_random_forest_pipeline

classifier = get_default_random_forest_pipeline()
classifier.fit(ACC_train, y_train)
y_hat = classifier.predict(ACC_test)

Simple XGBoost based model:

from xgboost import XGBClassifier
from pyecoacc.models.pipeline import make_classifier_pipeline

xg_model = make_classifier_pipeline(features=ACCStatsTransformer(), 
                                    model=XGBClassifier(n_estimators=250)) 

Custom CNN classifier:

from pyecoacc.models.deep.cnn import make_cnn_model


tiny_cnn_model = make_cnn_model(input_dim=INPUT_ACC_LENGTH, 
                                num_behav=NUMBER_OF_BEHAVIORS, 
                                conv_filters=[32, 64],
                                fc_layers=[20],
                                verbose=0)

classifier.fit(ACC_train, y_train)
y_hat = classifier.predict(ACC_test)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyecoacc-1.1.0.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyecoacc-1.1.0-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file pyecoacc-1.1.0.tar.gz.

File metadata

  • Download URL: pyecoacc-1.1.0.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for pyecoacc-1.1.0.tar.gz
Algorithm Hash digest
SHA256 50eededf954108d33baf3dd664d8dda965d17f8b87bbf2769f7c082ec1d5b466
MD5 8890fa4e54c4a90b37be1e794cec819e
BLAKE2b-256 f22774a8f793abb0ddf2cf48f6a03e7f28fd36c597a24e310f26c072c818579e

See more details on using hashes here.

File details

Details for the file pyecoacc-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyecoacc-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for pyecoacc-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a783cf5b3dd0e7535be1a28428c43d15ea141e4814775a0dafb3b948599b880d
MD5 c394dfba09d366f8ee63f3355673f1ed
BLAKE2b-256 ce79b178a41bb19c43f9ce541d517fa5ebb70514da04a2e3f2fc8692e01771c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page