Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Single Layer Neural Network The goal of this assignment is to implement a single layer neural network model

Single Layer Neural Network The goal of this assignment is to implement a single layer neural network model

Computer Science

Single Layer Neural Network

The goal of this assignment is to implement a single layer neural network model.

To begin this assignment download the Kamangar_01.zip  and unzip it in your computer.

Implementing Model and Training

In this assignment you will implement a single layer neural network model.

The neural network model in this assignment is a single layer of neurons with multiple nodes.

The activation (transfer) function of each node is assumed to be a hard-limit function.

Your model weights should include the bias(es).

Your code should be vectorized using numpy.

There are two files in the unzipped directory. The "single_layer_nn.py" file is where you implement the neural network model and all necessary helper functions. The "test_single_layer_nn.py" file includes the unit test modules.

You DO NOT need to rename these two files according the submission guidelines. Just modify the first four lines of these files according to the assignment submission guidelines.

The "SingleLayerNN" class is 'stubbed out' and your task is to implement the unimplemented functionality within the given structure.

DO NOT alter the structure that is given. You may introduce additional methods (helper methods), but do not alter function names or argument structures.

The API structure of the given file is inspired by (but not an exact copy of) modules such as scikit-learn and keras that are very commonly used in practice.

The comments and docstrings provide additional information that should help with your implementation. 

The test_single_layer_nn.py file includes a very minimal set of unit tests for the single_layer_nn.py part of the assignment. The assignment grade will be based on your code passing these tests (and other additional tests).

You may modify the "test_single_layer_nn.py" to include more tests. You may add additional tests to help you during development of your code. The changes that may make to the "test_single_layer_nn.py" file will not be graded.

You may run these tests using the command:      py.test --verbose test_single_layer_nn.py

 

The following is roughly what your output should look like if all tests pass

 

test_single_layer_nn.py::test_set_and_get_weights PASSED       [ 25%]

test_single_layer_nn.py::test_weight_initialization PASSED         [ 50%]

test_single_layer_nn.py::test_predict PASSED                            [ 75%]

test_single_layer_nn.py::test_train_and_error_calculation PASSED      [100%]

 

======================== 4 passed in 0.04 seconds ==========================================

 

 Grading Criteria

Passing Unit Tests - 80 points Note: Not all tests are given.

Qualitative Evaluation - 20 points (Grader may examine your code and subjectively award as many as 20 points.)

 

Submission Guidelines

Modify the first four lines of the two Python files according to the assignment submission guidelines.

# Your name (last name, first name)

# Your student ID (100x_xxx_xxx)

# Date of submission (yyyy_mm_dd)

# Assignment_nn_kk

 

You DO NOT need to rename the two Python files. The name of the two Python files should remain as "single_layer_nn.py" and "test_single_layer_nn.py" .  

Create a directory and name it according to the submission guidelines and include your files in that directory.

Zip the directory and upload it  to Canvas according to the submission guidelines.

Option 1

Low Cost Option
Download this past answer in few clicks

26.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE