View Network.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val network = | |
(InputLayer having bias having 2.layers) + | |
(ActivationSigmoid having bias having 3.layers) + | |
(ActivationSigmoid having 1.layers) |
View Process.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val procedure = input into network using (d => new ResilientPropagation(d.network, d.data)) until (_ < 0.01) giving ideal | |
val trainResult = procedure.get() |
View Xor.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object ClassicRunner { | |
def run() = { | |
val input = Array( | |
Array( 0.0, 0.0 ), | |
Array( 1.0, 0.0 ), | |
Array( 0.0, 1.0 ), | |
Array( 1.0, 1.0 ) | |
) | |
val ideal = Array( |
View matrix1.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val a = Array ( | |
Array(1,2,3), | |
Array(4,5), | |
Array(6) | |
) | |
//gives | |
// 1 2 3 | |
// 4 5 | |
// 6 |
View dsl.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run() = { | |
val input = | |
( 0.0 | 0.0 ) \\ | |
( 1.0 | 0.0 ) \\ | |
( 0.0 | 1.0 ) \\ | |
( 1.0 | 1.0 ) | |
val ideal = | |
Tuple1(0.0) \\ |
View matrix2.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val b = (1.0 | 2.0 | 3.0) \\ | |
(4.0 | 5.0 | 6.0) \\ | |
(7.0 | 8.0 | 9.0) | |
//gives | |
// 1.0 2.0 3.0 | |
// 4.0 5.0 6.0 | |
// 7.0 8.0 9.0 |
View Arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit class EncogArray1[T](val elem1: T) { | |
def |(v: T) = new EncogArray2[T](elem1, v) | |
} | |
case class EncogArray2[T](elem1: T, elem2: T) { | |
def |(v: T) = new EncogArray3[T](elem1, elem2, v) | |
} | |
case class EncogArray3[T](elem1: T, elem2: T, elem3: T) { | |
def |(v: T) = new EncogArray4[T](elem1, elem2, elem3, v) | |
} | |
case class EncogArray4[T](elem1: T, elem2: T, elem3: T, elem4: T) { |
View Arrays.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit class EncogArray1[T](val elem1: T) { | |
def |(v: T) = new EncogArray2[T](elem1, v) | |
} | |
case class EncogArray2[T](elem1: T, elem2: T) { | |
def |(v: T) = new EncogArray3[T](elem1, elem2, v) | |
} | |
case class EncogArray3[T](elem1: T, elem2: T, elem3: T) { | |
def |(v: T) = new EncogArray4[T](elem1, elem2, elem3, v) | |
} | |
case class EncogArray4[T](elem1: T, elem2: T, elem3: T, elem4: T) { |
View yo.bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yo skinny |
View Total.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Total { | |
case Eat(food) ⇒ | |
println(s"Tasty $food!") | |
Stopped | |
case Wait() ⇒ | |
Same | |
} |
OlderNewer