Latest 1.1
Homepage https://github.com/Kalvar/swift-KRHebbian-Algorithm
License MIT
Platforms ios 8.0, requires ARC
Authors

swift-KRHebbian-Algorithm

What is it ?

KRHebbian is a self-learning algorithm (adjust the weights) in neural network of Machine Learning (自分学習アルゴリズム).

Podfile

platform :ios, '8.0'
pod "Swift+KRHebbian", "~> 1.1"

How To Get Started

class ViewController: UIViewController {

    let krHebbian : KRHebbian = KRHebbian.sharedAlgorithm;

    override func viewDidLoad() {
        super.viewDidLoad()
        runHebbian();
        transposeMatrix();
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }

    func runHebbian()
    {
        let weights1 : [Float]     = [0.5, 0.0, -1.0, 1.0];
        var initialWeights : [Any] = [weights1];

        let x1 : [Float] = [0.0, 1.5, -2.0, 1.0];

        krHebbian.theta   = 1.0;
        krHebbian.weights = initialWeights;
        krHebbian.params  = x1;
        krHebbian.training();

        println("( Hebbian Retults ) Adjusts next Weights : (krHebbian.deltaWeights)");
    }

    //轉置矩陣
    func transposeMatrix()
    {
        let row1 = [1, 2, 3];
        let row2 = [4, 5, 6];
        let row3 = [7, 8, 9];
        var rows : [Any] = [row1, row2, row3];

        var _transposedMatrix = krHebbian.transposeMatrix( rows );
        println("_transposedMatrix : (_transposedMatrix)");
    }

}

Version

V1.1

Changelogs

V1.1 supported Swift 2.0.

LICENSE

MIT.

Latest podspec

{
    "name": "Swift+KRHebbian",
    "version": "1.1",
    "summary": "Self learning the adjust weight method on Machine Learning.",
    "description": "KRHebbian is a self-learning algorithm (adjust the weights) in neural network of Machine Learning (u81eau5206u5b66u7fd2u30a2u30ebu30b4u30eau30bau30e0).",
    "homepage": "https://github.com/Kalvar/swift-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/swift-KRHebbian-Algorithm.git",
        "tag": "1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "ML/*"
}

Pin It on Pinterest

Share This