From: tkawata Date: Sat, 26 May 2012 13:57:07 +0000 (+0900) Subject: Added a sample implementation of Perceptron neural network by dennco engine. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=75bf53f0c45b55f383d53875e2f35747ec0375fd;p=dennco%2Fdennco.git Added a sample implementation of Perceptron neural network by dennco engine. --- diff --git a/Samples/Samples/Sample5_SimplePerceptron.ng/Container/2/2_a.xhtml b/Samples/Samples/Sample5_SimplePerceptron.ng/Container/2/2_a.xhtml new file mode 100644 index 0000000..d511b3a --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron.ng/Container/2/2_a.xhtml @@ -0,0 +1,89 @@ + + + +Dennco - test1 + + + + + + + + + + + +
 
+
+
+
+ + + \ No newline at end of file diff --git a/Samples/Samples/Sample5_SimplePerceptron/Container/1/1_a.xhtml b/Samples/Samples/Sample5_SimplePerceptron/Container/1/1_a.xhtml new file mode 100644 index 0000000..26e1e09 --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/Container/1/1_a.xhtml @@ -0,0 +1,35 @@ + + + +Input layer for perceptron cell + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Samples/Sample5_SimplePerceptron/Container/1/dstyle.css b/Samples/Samples/Sample5_SimplePerceptron/Container/1/dstyle.css new file mode 100644 index 0000000..5a10ecb --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/Container/1/dstyle.css @@ -0,0 +1,51 @@ + +a[define] { + border-top: 1px solid gray; + text-indent: 1em; + display: block; + margin-top: 32px; + margin-bottom: 8px; +} + +a[define="cellcode"]:before { + content: "Definition of CellCode : " attr(name) " (type:" attr(type) ")" ; + font-size: large; + font-weight: bold; + display: inline; + white-space: pre; +} + + +a[define="cell"]:before { + content: "Definition of Cell : " attr(name) ; + font-size: large; + font-weight: bold; + display: inline; + white-space: pre; +} + +a[parameter="cellcode"]:before { + content: "CellCode : " attr(href) attr(type); + display: inline; +} + +a[parameter="cellcode"] { + text-indent: 1em; + display: block; +} + +a[parameter="connection"]:before { + content: "-> " attr(href) "(" attr(receptor) ")"; + display: inline; +} + +a[parameter="connection"] { + text-indent: 2em; + display: block; +} + +[parameter="script"] { + border: 1px solid gray; + background-color: #f0f0cc; + margin-left: 2em; +} diff --git a/Samples/Samples/Sample5_SimplePerceptron/Container/2/2_a.xhtml b/Samples/Samples/Sample5_SimplePerceptron/Container/2/2_a.xhtml new file mode 100644 index 0000000..4c6d5d2 --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/Container/2/2_a.xhtml @@ -0,0 +1,92 @@ + + + +Perceptron + + + + + + + + +
 
+
+
+ + + +
 
+ " + this.v0correctedWight.toFixed(3));
+			this.v0wight = this.v0correctedWight;
+			for (var i = 0; i < this.inputReceptors.length; i++) {
+				print("    " + this.inputReceptors[i] + ": wight " + this.wights[i].toFixed(3) + " -> " + this.correctedWights[i].toFixed(3));
+				this.wights[i] = this.correctedWights[i];
+			}
+		}
+		this.corrected = false;
+		this.learned = false;
+	}
+}
+]]>
+
+
+ + + \ No newline at end of file diff --git a/Samples/Samples/Sample5_SimplePerceptron/Container/2/dstyle.css b/Samples/Samples/Sample5_SimplePerceptron/Container/2/dstyle.css new file mode 100644 index 0000000..5a10ecb --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/Container/2/dstyle.css @@ -0,0 +1,51 @@ + +a[define] { + border-top: 1px solid gray; + text-indent: 1em; + display: block; + margin-top: 32px; + margin-bottom: 8px; +} + +a[define="cellcode"]:before { + content: "Definition of CellCode : " attr(name) " (type:" attr(type) ")" ; + font-size: large; + font-weight: bold; + display: inline; + white-space: pre; +} + + +a[define="cell"]:before { + content: "Definition of Cell : " attr(name) ; + font-size: large; + font-weight: bold; + display: inline; + white-space: pre; +} + +a[parameter="cellcode"]:before { + content: "CellCode : " attr(href) attr(type); + display: inline; +} + +a[parameter="cellcode"] { + text-indent: 1em; + display: block; +} + +a[parameter="connection"]:before { + content: "-> " attr(href) "(" attr(receptor) ")"; + display: inline; +} + +a[parameter="connection"] { + text-indent: 2em; + display: block; +} + +[parameter="script"] { + border: 1px solid gray; + background-color: #f0f0cc; + margin-left: 2em; +} diff --git a/Samples/Samples/Sample5_SimplePerceptron/Container/3/3_a.xhtml b/Samples/Samples/Sample5_SimplePerceptron/Container/3/3_a.xhtml new file mode 100644 index 0000000..359a568 --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/Container/3/3_a.xhtml @@ -0,0 +1,14 @@ + + + +Output layer for perceptron cell + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Samples/Sample5_SimplePerceptron/Container/3/dstyle.css b/Samples/Samples/Sample5_SimplePerceptron/Container/3/dstyle.css new file mode 100644 index 0000000..5a10ecb --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/Container/3/dstyle.css @@ -0,0 +1,51 @@ + +a[define] { + border-top: 1px solid gray; + text-indent: 1em; + display: block; + margin-top: 32px; + margin-bottom: 8px; +} + +a[define="cellcode"]:before { + content: "Definition of CellCode : " attr(name) " (type:" attr(type) ")" ; + font-size: large; + font-weight: bold; + display: inline; + white-space: pre; +} + + +a[define="cell"]:before { + content: "Definition of Cell : " attr(name) ; + font-size: large; + font-weight: bold; + display: inline; + white-space: pre; +} + +a[parameter="cellcode"]:before { + content: "CellCode : " attr(href) attr(type); + display: inline; +} + +a[parameter="cellcode"] { + text-indent: 1em; + display: block; +} + +a[parameter="connection"]:before { + content: "-> " attr(href) "(" attr(receptor) ")"; + display: inline; +} + +a[parameter="connection"] { + text-indent: 2em; + display: block; +} + +[parameter="script"] { + border: 1px solid gray; + background-color: #f0f0cc; + margin-left: 2em; +} diff --git a/Samples/Samples/Sample5_SimplePerceptron/property.xml b/Samples/Samples/Sample5_SimplePerceptron/property.xml new file mode 100644 index 0000000..1ddd0c8 --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/property.xml @@ -0,0 +1,8 @@ + + +0.02 +/ui/index.html +no +no + + \ No newline at end of file diff --git a/Samples/Samples/Sample5_SimplePerceptron/ui/index.html b/Samples/Samples/Sample5_SimplePerceptron/ui/index.html new file mode 100644 index 0000000..905593b --- /dev/null +++ b/Samples/Samples/Sample5_SimplePerceptron/ui/index.html @@ -0,0 +1,614 @@ + + +Dennco Sample5 - SimplePerceptron + + + + + + + + + + + + + + + + +
+
+ + + + + + + + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
V1
V2
Desired
+Learning rate + + +

+ +
+ +
+ + + + + + + + + + + + + + +
V1
V2
Out
+ +
+
+ +
+

Sample implementation of Perceptron with dennco engine. See: http://en.wikipedia.org/wiki/Perceptron for the detail information about Perceptron.

+ +