https://databricks-prod-cloudfront.cloud.databrick…
Please create an report showing the outputs and run the program 5 times and the iteration error will be reduced. Screen recording of execution.
Steps on how to run the Scala project
•
•
•
Install Scala
o Scala is a programming language; you must install it on your computer to run
Scala files. You can download Scala from the official website and follow the
installation instructions for your operating system.
Create a Scala File
o Write your Scala code in a text editor or an Integrated Development
Environment (IDE) and save it with a .scala extension. This file contains the
Scala code you want to execute. Preferred editors include visual studio or
Eclipse.
Run the Scala File
o Open a terminal or command prompt on your computer. Navigate to the
directory where you saved your Scala file using the cd command. Once you
are in the correct directory, use the Scala command followed by the name of
your Scala file (without the .scala extension). This will execute the Scala code
in the file.
For example, if your Scala file is named MyScalaFile.scala, you can run it using the command:
Copy code
scala MyScalaFile.scala
If you have external dependencies in your Scala project, you may need to use build tools
like sbt or Maven to manage these dependencies and run more complex Scala projects.
Additionally, if you use an IDE with Scala support, you can run Scala files directly from
within the IDE, which often simplifies running and managing Scala projects.
Iteration 1:
Iteration 2:
Iteration 3:
Iteration 4:
Iteration 5:
The weights and training errors do improve as the number of iterations increases. This is because the
gradient descent algorithm is iteratively updating the weights to minimize the training error. As the
algorithm converges, the weights will eventually stop changing and the training errors will reach a
minimum value.