- Scala Machine Learning Projects
- Md. Rezaul Karim
- 276字
- 2021-06-30 19:05:41
Project structure
The wrapped up Scala web ML app has the following directory structure:

In the preceding structure, bitcoin_ml folder has all the backend and frontend codes. The models folder has all the trained models. An example-trained model is given in the gbt_22_binary_classes_32660767 folder. Finally, database files and traces are there in the DataBase.mv.db and DataBase.trace.db files respectively.
Then let us see the sub-folder structure of the bitcoin_ml folder that contains the actual codes:

In the preceding figure, the conf folder has the Scala web app configuration file, application.conf containing necessary configurations (as shown already). All the dependencies are defined in the build.sbt file shown as follows:
libraryDependencies ++= Seq(jdbc, evolutions,
"com.typesafe.play" %% "anorm" % "2.5.1",
cache, ws, specs2 % Test, ws)
unmanagedResourceDirectories in Test <+= baseDirectory(_ / "target/web/public/test")
resolvers += "scalaz-bintray" at "https://dl.bintray.com/scalaz/releases"
resolvers ++= Seq(
"apache-snapshots" at "http://repository.apache.org/snapshots/")
routesGenerator := InjectedRoutesGenerator
val sparkVersion = "2.2.0"
libraryDependencies += "org.apache.spark" %% "spark-mllib" % sparkVersion
libraryDependencies += "org.apache.hadoop" % "hadoop-mapreduce-client-core" % "2.7.2"
libraryDependencies += "org.apache.hadoop" % "hadoop-common" % "2.7.2"
libraryDependencies += "commons-io" % "commons-io" % "2.4"
libraryDependencies += "org.codehaus.janino" % "janino" % "3.0.7" //fixing "java.lang.ClassNotFoundException: de.unkrig.jdisasm.Disassembler" exception
libraryDependencies ++= Seq(
"com.typesafe.slick" %% "slick" % "3.1.1",
"org.slf4j" % "slf4j-nop" % "1.6.4"
)
To be frank, at the beginning of writing, I did not think of wrapping up this application as a Scala Play web app. Therefore, things went a bit unstructured. However, do not worry to know more about backend as well frontend, refer to the options trading application in Chapter 7, Options Trading Using Q-Learning and Scala Play Framework.
- Hands-On Graph Analytics with Neo4j
- Getting Started with Containerization
- 機器人創新實訓教程
- 可編程序控制器應用實訓(三菱機型)
- 信息物理系統(CPS)測試與評價技術
- Android游戲開發案例與關鍵技術
- 網絡化分布式系統預測控制
- Linux服務與安全管理
- Blender 3D Printing by Example
- 邊緣智能:關鍵技術與落地實踐
- INSTANT Heat Maps in R:How-to
- INSTANT Munin Plugin Starter
- Drupal高手建站技術手冊
- Instant Slic3r
- Hands-On Agile Software Development with JIRA