Latest 0.2.8
Homepage https://github.com/HeartRateLearning/HRLEngine
License MIT
Platforms ios 8.0
Dependencies HRLAlgorithms
Authors

CI Status
codecov.io
Version
Docs

This repository is DEPRECATED. Refer to HRLClassifier instead.

Use Machine Learning to predict if a person is working out based of his/her heart rate.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

HRLEngine is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "HRLEngine"

Usage

let date = Date()

let dataFrame = DataFrame()
dataFrame.append(record: Record(date:date.addingTimeInterval(-6 * 60 * 60),
                                bpm:Float(100)),
                 isWorkingOut: false)
dataFrame.append(record: Record(date:date.addingTimeInterval(-5 * 60 * 60),
                                bpm:Float(140)),
                 isWorkingOut: true)
dataFrame.append(record: Record(date:date.addingTimeInterval(-4 * 60 * 60),
                                bpm:Float(120)),
                 isWorkingOut: true)
dataFrame.append(record: Record(date:date.addingTimeInterval(-3 * 60 * 60),
                                bpm:Float(70)),
                 isWorkingOut: false)
dataFrame.append(record: Record(date:date.addingTimeInterval(-2 * 60 * 60),
                                bpm:Float(55)),
                 isWorkingOut: false)
dataFrame.append(record: Record(date:date.addingTimeInterval(-1 * 60 * 60),
                                bpm:Float(125)),
                 isWorkingOut: true)

let engine = Engine()
engine.train(with: dataFrame)

let predictDate = date.addingTimeInterval(-3.5 * 60 * 60)
let predictBPM = Float(130)
let isWorkingOut = engine.predictedWorkingOut(for: Record(date:predictDate,
                                                          bpm:predictBPM))

print("At (predictDate) with (predictBPM) bpm, is user working out? (isWorkingOut)")

License

HRLEngine is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "HRLEngine",
    "version": "0.2.8",
    "summary": "(DEPRECATED) Use Machine Learning to predict if a person is working out based of his/her heart rate.",
    "description": "(DEPRECATED) Use Machine Learning to predict if a person is working out based of his/her heart rate.",
    "homepage": "https://github.com/HeartRateLearning/HRLEngine",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Enrique de la Torre": "[email protected]"
    },
    "source": {
        "git": "https://github.com/HeartRateLearning/HRLEngine.git",
        "tag": "0.2.8"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HRLEngine/Classes/**/*",
    "dependencies": {
        "HRLAlgorithms": [
            "~> 0.1"
        ]
    },
    "pushed_with_swift_version": "3.0",
    "deprecated": true
}

Pin It on Pinterest

Share This