Programming Questions This is the first programming project for the course. The details can be found in the attached PDF file, and I have included addition

Programming Questions This is the first programming project for the course. The details can be found in the attached PDF file, and I have included additional files you will need. You are not required to use the two Python scripts I provided — feel free to write your own scripts from scratch. You will need the CSV data file, however, since it contains all the input data you will need to use. I’ve allotted 2 weeks for the assignment, but extensions are possible should you need one. Please do not hesitate to email me if you have any questions. class Perceptron(object):

# Create a new Perceptron
#
# Params: bias – arbitrarily chosen value that affects the overall output
# regardless of the inputs
#
# synaptic_weights – list of initial synaptic weights for this Perceptron
def __init__(self, bias, synaptic_weights):

Don't use plagiarized sources. Get Your Custom Essay on
Programming Questions This is the first programming project for the course. The details can be found in the attached PDF file, and I have included addition
Just from $13/Page
Order Essay

self.bias = bias
self.synaptic_weights = synaptic_weights

# Activation function
# Quantizes the induced local field
#
# Params: z – the value of the indiced local field
#
# Returns: an integer that corresponds to one of the two possible output values (usually 0 or 1)
def activation_function(self, z):

# Compute and return the weighted sum of all inputs (not including bias)
#
# Params: inputs – a single input vector (which may contain multiple individual inputs)
#
# Returns: a float value equal to the sum of each input multiplied by its
# corresponding synaptic weight
def weighted_sum_inputs(self, inputs):

# Compute the induced local field (the weighted sum of the inputs + the bias)
#
# Params: inputs – a single input vector (which may contain multiple individual inputs)
#
# Returns: the sum of the weighted inputs adjusted by the bias
def induced_local_field(self, inputs):

# Predict the output for the specified input vector
#
# Params: input_vector – a vector or row containing a collection of individual inputs
#
# Returns: an integer value representing the final output, which must be one of the two
# possible output values (usually 0 or 1)
def predict(self, input_vector):

# Train this Perceptron
#
# Params: training_set – a collection of input vectors that represents a subset of the entire dataset
# learning_rate_parameter – the amount by which to adjust the synaptic weights following an
# incorrect prediction
# number_of_epochs – the number of times the entire training set is processed by the perceptron
#
# Returns: no return value
def train(self, training_set, learning_rate_parameter, number_of_epochs):

# Test this Perceptron
# Params: test_set – the set of input vectors to be used to test the perceptron after it has been trained
#
# Returns: a collection or list containing the actual output (i.e., prediction) for each input vector
def test(self, test_set):

superadmin

Recent Posts

Consider the following information, and answer the question below. China and England are internation

Consider the following information, and answer the question below. China and England are international trade…

4 years ago

The CPA is involved in many aspects of accounting and business. Let’s discuss some other tasks, othe

The CPA is involved in many aspects of accounting and business. Let's discuss some other…

4 years ago

For your initial post, share your earliest memory of a laser. Compare and contrast your first percep

For your initial post, share your earliest memory of a laser. Compare and contrast your…

4 years ago

2. The Ajax Co. just decided to save $1,500 a month for the next five years as a safety net for rece

2. The Ajax Co. just decided to save $1,500 a month for the next five…

4 years ago

How to make an insertion sort to sort an array of c strings using the following algorithm: * beg, *

How to make an insertion sort to sort an array of c strings using the…

4 years ago

Assume the following Keynesian income-expenditure two-sector model:

Assume the following Keynesian income-expenditure two-sector model:                                                AD = Cp + Ip                                                Cp = Co…

4 years ago