Skip to content

pashashiz/scanet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purely functional ML Framework for Scala

Right now it is just a basic concept. You are welcome to contribute to bring ML into the Scala ecosystem.

Examples

ANN

There is an example of training ANN on MNIST dataset:

"neural network" should "classify MNIST data set" in {
    val training = MNIST.loadTrainingSet(10000)
    val test = MNIST.loadTestSet(100)
    val (factor, input) = normalize(training.input)
    val model = Dense(50, Sigmoid(), kernelReg = L2(0.005)) |&| Dense(10, Sigmoid(), kernelReg = L2(0.005))
    val weights = Adam(rate = 0.01, batch = 100)
      .minimize(nnError(model), horzcat(input, training.labels))
      .through(epoch(10))
      .observe(logStdOut)
      .observe(plotToFile("MNIST.png"))
      .runSync.vars
    val classifier = nn(model)(weights)
    val prediction = classifier(normalize(test.input, factor))
    val accuracy = binaryAccuracy(test.labels, prediction)
    accuracy should be > 0.9
  }

Features:

  • Stochastic Gradient Decent (SGD)
  • SDG features (momentum, nesterow)
  • Advanced Gradient Decent optimizations (AdaGrad, AdaDelta, RMSProp, Adam, NAdam, Adamax)
  • Linear regression
  • Logistic regression
  • Artificial NN (Neural Network)
  • Performance
  • Documentation
  • Convolutional NN
  • Metrics
  • Preprocessors
  • Visualize NN learning process
    • REST service
    • UI
  • Recurrent NN
  • Tensor Flow as a backend

Releases

No releases published

Packages

No packages published

Languages