Skip to content

rices/teaching-innovation-project

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 1 commit ahead, 1 commit behind uSMART:master.

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
September 1, 2022 14:36

teaching-innovation-project

In the folder Demo, each sub-folder contains all the dependent files for each demo.

.py file is the main execution code that connects students' inputs with the machine learning model and provides feedbacks.

.pkl file is the machine learning model. It was trained under sklearn framework.

.txt file is the problem description of each problem.

.csv file is the training dataset for the maching learning model. The model will also read the historical wrong answers in the dataset to decide wheter students' inputs are a common mistake or not.

To test the demo

2E

Let's say we missed the salvage value in the calculation.

The final answer is calculated as (-250,000 * 1.7908) + (40,000 * 13.1808) + 0 = -447,700 + 527,232 + 0 = 79,532

where, -447,700 is the step answer for initial investment, 527,232 is the step answer for annual cost&revenue, and 0 is the answer for salvage value (it's missed), and 79,532 is the final answer

The model will firstly ask what is the final answer (so you might want to enter 79,532), and then (probably) ask what is the annual cost&revenue.

After interacting with the model by entering the required above values, the model is supposed to report that you have made a mistake in the salvage value.

6H

Note that in this problem, there are three variational problem descriptions, so the final answers are calculated in the same way but with different built-in values. The variation of each problem is marked at the begining of the description as 2017, 2018 and 2019.

Let's say we used the incorrect price index.

For 2017 version, the final answer is calculated as 495,000 * (189/100) * (1.63/1) ^ 0.65 + 63,000 = 935,550 * (1.63/1) ^ 0.65 + 63,000 = 1,285,254 + 63,000 = 1,348,254

where, 935,550 is the value of the first step, 1,285,254 is the value of the second step, 63,000 is the additional cost, 1,348,254 is the final answer

For 2018 version, the final answer is calculated as 495,000 * (175/100) * (1.68/1) ^ 0.78 + 78,000 = 866,250 * (1.68/1) ^ 0.78 + 78,000 = 1,298,328 + 78,000 = 1,376,328

where, 866,250 is the value of the first step, 1,298,328 is the value of the second step, 78,000 is the additional cost, 1,376,328 is the final answer

For 2019 version, the final answer is calculated as 32,000 * (205/100) * (7500/3000) ^ 0.8 + 45,000 = 65,600 * (7500/3000) ^ 0.8 + 45,000 = 136,539 + 45,000 181,539

where, 65,600 is the value of the first step, 136,539 is the value of the second step, 45,000 is the additional cost, 181,539 is the final answer

9H

Instead of inspecting the calcuation as previous demos, this problem checks each decision-making step.

Below are the answers to interactions and you may enter any alternative value/letter as the wrong answer.

What project do you plan to eliminate (A, B, or C)?: A

What is your current base project (A, B, or C)?: C

What is the next MEA(mutually exclusive alternative)?: B

What is your calculated IRR (write as percentage)?: 8.34%

What is the best project?: C

Changes For Website

Since the website can't call the script and wait for user input, the .py scripts were modified to instead accept the input as passed in arguments.

$ python3 2E.py --answer=1234 --initial_investment=5678

To prompt for an input, script output is prefixed with the variable being asked for followed by two colons (as a delimiter):

print('initial_investment:: What is the value of your initial investment?')
exit()

The variable name must match the script argument name. This portion is stripped from the output before being presented to the user on the website. If the script output does not contain a variable prefix, it is assumed to be the end of the script (i.e., no further prompts for input).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published