ps2_answers
.py
keyboard_arrow_up
School
Youngstown State University *
*We aren’t endorsed by this school
Course
CS7638
Subject
Mathematics
Date
Apr 3, 2024
Type
py
Pages
9
Uploaded by MinisterThunderRam25
######################################################################
# This file copyright the Georgia Institute of Technology
#
# Permission is given to students to use or modify this file (only)
# to work on their assignments.
#
# You may NOT publish this file or make it available to others not in
# the course.
#
######################################################################
######################################################################
# How to use:
#
# For fill-in questions, change the value of each answer variable.
#
# For programming questions, change the implementation of the
# function provided.
#
# Run the file from the command line to check:
#
# python ps2_answers.py
#
######################################################################
# STUDENT ID
# Please specify your GT login ID in the whoami variable (ex: jsmith123).
whoami = ''
n = float('nan')
# Question 1: MEASUREMENT UPDATE
#
# How does the variance of the new Gaussian compare to the individual Guassians?
#
possible_answers = ( 'smaller',
'larger',
'the same' )
update = ''
# Question 2: NEW VARIANCE
#
# What is the value for Nu squared as a multiple of Sigma squared?
# Replace n with your answer
#
variance = n
# Question 3: HEAVYTAIL GAUSSIAN
#
# Is it possible to represent this function as a Gaussian?
#
possible_answers = ( 'YES',
'NO' )
heavytail = ''
# QUESTION 4: HOW MANY DIMENSIONS
#
# How many dimensions of the state vector for 2-dimensional space?
# Replace n with your answer
#
dimensions = n
# QUESTION 5: STATE TRANSITION MATRIX
#
# What is the new F matrix for a Kalman filter in 2 dimensions?
# Replace the n's with your answers
#
F = ([[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n]])
# QUESTION 6: PROGRAMMING EXERCISE
# Fill in the matrices P, F, H, R and I at the bottom
#
# This question requires NO CODING, just fill in the # matrices by replacing n with your values.
# # Please do not delete or modify # any provided code OR comments. Good luck!
#
Matrices_P = ([[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n]]) Matrices_F = ([[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n]]) Matrices_H = ([[n, n, n, n], \
[n, n, n, n]]) Matrices_R = ([[n, n], \
[n, n]]) Matrices_I = ([[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n], \
[n, n, n, n]])
######################################################################
# Grading methods
#
# Do not modify code below this point.
#
######################################################################
import hashlib
import checkutil
float_to_str = lambda x: "%.04f" % x
do_nothing = lambda x: x
FILL_IN_TEST_CASES = ( {'variable_name': 'update',
'str_func': do_nothing,
'answer_hash': '43dd639229e914a5327206408c1287c0',
'points_avail': 1 },
{'variable_name': 'variance',
'str_func': float_to_str,
'answer_hash': '2ea3bd7cc5760c8622dfc868bd505c4c',
'points_avail': 1 },
{'variable_name': 'heavytail',
'str_func': do_nothing,
'answer_hash': 'ef544ea31f6ea82b72384a7d9ef3dccf',
'points_avail': 1 },
{'variable_name': 'dimensions',
'str_func': float_to_str,
'answer_hash': 'efb95511d768395bb81769b61a33e0b8',
'points_avail': 1 },
{'variable_name': 'F',
'variable_idxs': (0,0),
'str_func': float_to_str,
'answer_hash': '7b681f62cc828c6d7568ef7f3a350428',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (0,1),
'str_func': float_to_str,
'answer_hash': 'ff917d13cdf6acdd0e17a176a570963e',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (0,2),
'str_func': float_to_str,
'answer_hash': 'd950e2cbd82caf777485907cf003584f',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (0,3),
'str_func': float_to_str,
'answer_hash': '02c733f0fdc78a155bafe8d953cb95d7',
'points_avail': 1./16. }, {'variable_name': 'F',
'variable_idxs': (1,0),
'str_func': float_to_str,
'answer_hash': '9af9af4c7374f0b14fafa874d5bd003f',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (1,1),
'str_func': float_to_str,
'answer_hash': 'b3642522f0ba3e96b095f1b16f4c4eca',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (1,2),
'str_func': float_to_str,
'answer_hash': 'dd0580ff997a6c0ff5b0c5c026844ab0',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (1,3),
'str_func': float_to_str,
'answer_hash': '044e197410340e5ff6f33350b73d1e89',
'points_avail': 1./16. }, {'variable_name': 'F',
'variable_idxs': (2,0),
'str_func': float_to_str,
'answer_hash': 'c23fe4bb535bac9d90c828dc3717e93b',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (2,1),
'str_func': float_to_str,
'answer_hash': 'ac45c1a4dc7225534e911394e1370aea',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (2,2),
'str_func': float_to_str,
'answer_hash': '28d810834d62455e7520b5e6e2990437',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (2,3),
'str_func': float_to_str,
'answer_hash': '216542c4e092b5267c050babc85adf9d',
'points_avail': 1./16. }, {'variable_name': 'F',
'variable_idxs': (3,0),
'str_func': float_to_str,
'answer_hash': '1b1241ecfc9d00dd5c3bcb35ea370abf',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (3,1),
'str_func': float_to_str,
'answer_hash': '34a21d761f1b187400b73aabeb42c5bc',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (3,2),
'str_func': float_to_str,
'answer_hash': 'b17f75679965dfecbb9f4d4f6b898309',
'points_avail': 1./16. },
{'variable_name': 'F',
'variable_idxs': (3,3),
'str_func': float_to_str,
'answer_hash': '3b2a80974732efdab96fbb189d681695',
'points_avail': 1./16. }, {'variable_name': 'Matrices_P',
'variable_idxs': (0,0),
'str_func': float_to_str,
'answer_hash': '3a7a6580a2f5bb09161b4057bf8c2ec1',
'points_avail': 1./16. },
{'variable_name': 'Matrices_P',
'variable_idxs': (0,1),
'str_func': float_to_str,
'answer_hash': '1ee7efb648f980167d5b426e506c5e5b',
'points_avail': 1./16. },
{'variable_name': 'Matrices_P',
'variable_idxs': (0,2),
'str_func': float_to_str,
'answer_hash': 'cf22d8b0a0d84c7e7b938207426c5e9c',
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help