Select Page
Latest 1.1 https://github.com/Kalvar/swift-KRHebbian-Algorithm MIT ios 8.0, requires ARC Kalvar Lin

# 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;

runHebbian();
transposeMatrix();
}

}

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)");
}

}``````

V1.1

## Changelogs

V1.1 supported Swift 2.0.

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",
"type": "MIT",
},
"authors": {
"Kalvar Lin": "[email protected]"
},
"source": {
"git": "https://github.com/Kalvar/swift-KRHebbian-Algorithm.git",
"tag": "1.1"
},
"platforms": {
"ios": "8.0"
},
"requires_arc": true,
"source_files": "ML/*"
}```