Latest 1.0.2
Homepage https://github.com/HeartRateLearning/HRLAlgorithms
License MIT
Platforms ios 8.0, requires ARC
Authors

CI Status
codecov.io
Version
Docs

Wrapper around LearnKit to easy its integration
in Swift CocoaPods.

Installation

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

pod "HRLAlgorithms"

Usage


#import "HRLMatrix.h"
#import "HRLMatrixSplitter.h"
#import "HRLSplittedMatrix.h"
#import "HRLTrainedKNNClassifier.h"
#import "HRLTrainedKNNClassifierFactory.h"
#import "HRLVector.h"

id<HRLMatrix> matrix = ...;

id<HRLMatrixSplitter> splitter = [[HRLMatrixSplitter alloc] init];
HRLSplittedMatrix *splittedMatrix = [splitter splittedMatrixWithMatrix:matrix
                                                          trainingBias:0.75f];

id<HRLTrainedKNNClassifierFactory> factory = [[HRLTrainedKNNClassifierFactory alloc] init];
id<HRLTrainedKNNClassifier> classifier = [factory makeTrainedKNNClassifierWithMatrix:splittedMatrix.trainingMatrix
                                                                      neighborsCount:5];

NSLog(@"Accuracy: %f", [classifier estimatedAccuracyWithMatrix:splittedMatrix.testMatrix]);

id<HRLVector> vector = ...;

NSLog(@"Predicted class: %lu", (unsigned long)[classifier predictedClassForVector:vector]);

License

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

Latest podspec

{
    "name": "HRLAlgorithms",
    "version": "1.0.2",
    "summary": "(DEPRECATED) Wrapper around LearnKit.",
    "description": "(DEPRECATED) Wrapper around [LearnKit](https://github.com/mattrajca/LearnKit) to easy its integration in Swift CocoaPods.",
    "homepage": "https://github.com/HeartRateLearning/HRLAlgorithms",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Enrique de la Torre": "[email protected]"
    },
    "source": {
        "git": "https://github.com/HeartRateLearning/HRLAlgorithms.git",
        "tag": "1.0.2",
        "submodules": true
    },
    "platforms": {
        "ios": "8.0"
    },
    "prefix_header_file": "HRLAlgorithms/Submodules/LearnKit/LearnKit/Prefix.pch",
    "source_files": [
        "HRLAlgorithms/Classes/**/*.{h,m}",
        "HRLAlgorithms/Submodules/LearnKit/fmincg/*.{h,m}",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Accelerate Extensions/*.{h,m}",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Config.h",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Core/*.{h,m}",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/K-NN/*.{h,m}",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Optimization/*.{h,m}",
        "HRLAlgorithms/Submodules/LearnKit/liblbfgs/include/*.h",
        "HRLAlgorithms/Submodules/LearnKit/liblbfgs/lib/*.{h,m}"
    ],
    "exclude_files": "HRLAlgorithms/Submodules/LearnKit/LearnKit/Core/LNKMatrixImages.{h,m}",
    "private_header_files": [
        "HRLAlgorithms/Classes/Common/Private/*.h",
        "HRLAlgorithms/Classes/K-NN/Private/*.h",
        "HRLAlgorithms/Submodules/LearnKit/fmincg/*.h",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Accelerate Extensions/*.h",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Config.h",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Core/*.h",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/K-NN/*.h",
        "HRLAlgorithms/Submodules/LearnKit/LearnKit/Optimization/*.h",
        "HRLAlgorithms/Submodules/LearnKit/liblbfgs/include/*.h",
        "HRLAlgorithms/Submodules/LearnKit/liblbfgs/lib/*.h"
    ],
    "requires_arc": "HRLAlgorithms/Classes/**/*.m",
    "deprecated": true
}

Pin It on Pinterest

Share This