Latest 1.3.0
Homepage https://github.com/Kalvar/ios-KRHebbian-Algorithm
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation
Authors

About

KRHebbian implemented Hebbian algorithm that is a non-supervisor of self-organization algorithm of Machine Learning (自分学習アルゴリズム).

Podfile

platform :ios, '7.0'
pod "KRHebbian", "~> 1.3.0"

How To Get Started

Import

#import "KRHebbian.h"

Sample

KRHebbian *_hebbian     = [KRHebbian sharedAlgorithm];
_hebbian.activeFunction = KRHebbianActiveFunctionBySgn;  // Tanh() for [-1.0, 1.0], Sgn() for (-1, 1)
_hebbian.learningRate   = 1.0f;
_hebbian.maxIteration   = 1;
[_hebbian addPatterns:@[@0.0f, @1.5f, @-2.0f, @1.0f]];   // X1
[_hebbian addPatterns:@[@-1.5f, @-2.0f, @-0.5f, @1.0f]]; // X2
[_hebbian initializeWeights:@[@0.5f, @0.0f, @-1.0f, @1.0f]];

[_hebbian setTrainingIteraion:^(NSInteger iteration, NSArray *outputs, NSArray *weights) {
    NSLog(@"Training %li iteration = %@, outputs = %@", iteration, weights, outputs);
}];

[_hebbian trainingWithCompletion:^(BOOL success, NSArray *outputs, NSArray *weights, NSInteger totalIteration) {
    NSLog(@"Trained %li iteration = %@, outputs = %@", totalIteration, weights, outputs);
    // Start in verifying
    [_hebbian directOutputAtInputs:@[@-0.5f, @-1.0f, @-0.2f, @0.5f] completion:^(NSArray *outputs, NSArray *weights) {
        NSLog(@"Verified weights = %@, outputs = %@", weights, outputs);
    }];
}];

Version

V1.3.0

LICENSE

MIT.

Latest podspec

{
    "name": "KRHebbian",
    "version": "1.3.0",
    "summary": "Non-supervisor that Hebbian self-organization learning method in machine learning. (u81eau5206u5b66u7fd2u30a2u30ebu30b4u30eau30bau30e0).",
    "description": "KRHebbian implemented Hebbian algorithm that is a non-supervisor of self-organization algorithm of Machine Learning (u81eau5206u5b66u7fd2u30a2u30ebu30b4u30eau30bau30e0).",
    "homepage": "https://github.com/Kalvar/ios-KRHebbian-Algorithm",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Kalvar Lin": "[email protected]"
    },
    "social_media_url": "https://twitter.com/ilovekalvar",
    "source": {
        "git": "https://github.com/Kalvar/ios-KRHebbian-Algorithm.git",
        "tag": "1.3.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "public_header_files": "KRHebbian/*.h",
    "source_files": "KRHebbian/*.{h,m}",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This