1. Homepage
  2. Coding
  3. CS112 Lab 09: Neural Networks

CS112 Lab 09: Neural Networks

Order Now
USFCACS112Introduction to CS IIMachine LearningJavaNeural Networks

CS112 - Fall 2024 Assignment Writing Service

Later this semester, you will create a working neural network in Java, using only your own code. In later classes, you will probably use neural network libraries developed by others to learn about many facets of Machine Learning. But in this class, you will learn that there is no magic in making a neural network— it is something you can build yourself...though the fact that neural networks perform so well does seem like magic. Assignment Writing Service

What is a neuron? Assignment Writing Service

A neuron is a nerve cell or brain cell. They are found in any animal with a brain or some approximation of a brain. (This is almost every type of multicellular animal: people, insects, fish, even jellyfish...but not sea sponges!) Assignment Writing Service

Nerve cells have multiple inputs and a single output. The inputs come from other nerve cells or from "sensors" such as the eye's retina or the ear, and the outputs go to other nerve cells or to "actuators" such as muscles or organs. Assignment Writing Service

Ok, What is a Neuron in a Computer? Assignment Writing Service

Researchers were intrigued by the ability of large networks of animal neurons – that is, "brains" – to store information, make decisions, and learn. They began experimenting with simple computer functions that mimicked the understood bioelectrical operation of neurons, and they got surprisingly good results on a variety of different tasks. Assignment Writing Service

A popular computer function, the "perceptron", was introduced by Frank Rosenblatt in 1957. The basic operation of a perceptron is: Assignment Writing Service

channel has a spatial resolution of pixels wide by pixels high, and some encoded bit-rate of megabits per second, how many computer servers are needed to process the videos without overloading?"The solution was a neural network that took in the resolutions and bit-rates as inputs and returned a number of servers. This solution saved Paul's employer over $1M per year in cloud computing costs.
Assignment Writing Service

And of course, Large Language Models such as ChatGPT use Neural Networks to answer questions.
Assignment Writing Service

What is "Training"? Assignment Writing Service

The output of a neuron of course depends on the values of the weights and bias (and the activation function). The output of a neural networka network of neuronsdepends on the weights and biases of all of the neurons in a network. Assignment Writing Service

"Training" is a computational process that takes a large set of inputs, and corresponding known outputs, and adjusts every neuron's weights and bias, so that the output of the neural network gets closer and closer to the known output for every input. When training is complete, a new input can be fed to the neural network, even if the input was not in the set used for training, and it should produce a correct output. Assignment Writing Service

How exactly does training work? It's complicatedthere are whole classes on it! Assignment Writing Service

Why do neural networks work? This is not really understood--just like we don't understand how brains work, at any large scale. There are plenty of alternative computational models for making decisions, but this model seems to work quite well. Assignment Writing Service

This Week's Lab Assignment Writing Service

For this week, you will build and test a Neuron. In a file RELUNeuron.java please write a class RELUNeuron. For the activation function, use the "RELU function": 2 Assignment Writing Service

double activation(double x) {
     x /= 20.0;
     return x > 0 ? x : 0.0;
}

For class RELUNeuron:
Assignment Writing Service

  • -  The constructor takes in the number of inputs for the Neuron, and initializes all weights and bias values to a random value between -1.0 and +1.0. Assignment Writing Service

  • -  an output() method takes in a double[] array of inputs and calculates the proper output value Assignment Writing Service

  • -  a write() method to write the neuron's weights and bias to a DataOutputStream (see DataOutputStream's writeDouble() method) Assignment Writing Service

  • -  a read() method to read the neuron's weights and bias from a DataInputStream (see readDouble() method). Assignment Writing Service

    You'll need several class variables, of course. Weights, bias, and maybe more. Assignment Writing Service

    To train your Neuron, I will give you a bunch of training data files, each of which contains 501 double values each. These values are not saved as textthey are saved as raw binary double values (I used a DataOutputStream). For each file: Assignment Writing Service

  • the first 500 values are inputs to your Neuron, Assignment Writing Service

  • the last value is the expected output from your Neuron. Assignment Writing Service

    In class, we will discuss the details of how to train your Neuron. Can you improve this basic training recipe? To reach a smaller error faster? Assignment Writing Service

    After you train your Neuron on the provided training data, please save your resulting weights and bias (using your write() method) to a file called weights.dbl . Assignment Writing Service

    A critical part of this week's lab is for you to design, execute, and document a set of tests for your Neuron. For this week, please write another Java file TestNeuron.java. This class of course tests your Neuron. You should think about how to do this! Assignment Writing Service

Conclusion Assignment Writing Service

In this project you learned how to build and test a computer "neuron" using nothing but ordinary arithmetic and Boolean logic. In a few weeks we will build, train, and test a real Neural Network. Assignment Writing Service

Rubric Assignment Writing Service

▪ 0-20 points for code quality and proper operation and training of RELUNeuron.java ▪ 10 points if you weights.dbl gives a reasonable error with test files
▪ 0-20 points for your TestNeuron.java
▪ 0-20 points on your test writeup Assignment Writing Service

Further Reading Assignment Writing Service

"How LLM's work." LINK Assignment Writing Service

联系辅导老师!
私密保护
WeChat 微信
USFCA代写,CS112代写,Introduction to CS II代写,Machine Learning代写,Java代写,Neural Networks代写,USFCA代编,CS112代编,Introduction to CS II代编,Machine Learning代编,Java代编,Neural Networks代编,USFCA代考,CS112代考,Introduction to CS II代考,Machine Learning代考,Java代考,Neural Networks代考,USFCA代做,CS112代做,Introduction to CS II代做,Machine Learning代做,Java代做,Neural Networks代做,USFCAhelp,CS112help,Introduction to CS IIhelp,Machine Learninghelp,Javahelp,Neural Networkshelp,USFCA作业代写,CS112作业代写,Introduction to CS II作业代写,Machine Learning作业代写,Java作业代写,Neural Networks作业代写,USFCA编程代写,CS112编程代写,Introduction to CS II编程代写,Machine Learning编程代写,Java编程代写,Neural Networks编程代写,USFCA作业答案,CS112作业答案,Introduction to CS II作业答案,Machine Learning作业答案,Java作业答案,Neural Networks作业答案,