Update README.md
This commit is contained in:
parent
3295a743ef
commit
93be638d07
22
README.md
22
README.md
@ -4,12 +4,11 @@ This repository have two different exercises in erlang:
|
||||
|
||||
1. Decision tree that maximizes the optimal point and consequently provides decision support based on the assumptions provided.
|
||||
|
||||
* The probability of making a medication/treatment 1 and use is OK of 42%;
|
||||
* One possibility of making a medication/treatment 1 and of the user staying KO is 22.5%;
|
||||
* The probability of making a medication/treatment 1 and is not conclusive is 35.6%;
|
||||
|
||||
* The probability of making a medication/treatment 2 and staying OK is 62%;
|
||||
* The probability of making a medication/treatment 2 and getting KO is 38%.
|
||||
* The probability of making a medication/treatment 1 and use is OK of 42%;
|
||||
* One possibility of making a medication/treatment 1 and of the user staying KO is 22.5%;
|
||||
* The probability of making a medication/treatment 1 and is not conclusive is 35.6%;
|
||||
* The probability of making a medication/treatment 2 and staying OK is 62%;
|
||||
* The probability of making a medication/treatment 2 and getting KO is 38%.
|
||||
|
||||

|
||||
|
||||
@ -17,6 +16,7 @@ This repository have two different exercises in erlang:
|
||||
2. There are ways to get the probabilities knowing certain parameters (they do not indicate the optimal point, but calculate a probability of success depending on the existing resources) - using the baysian networks.
|
||||
|
||||
What is the probability of giving the patient M2 and is OK, knowing that:
|
||||
|
||||
* The probability of administering M1 and the patient is OK is 20%;
|
||||
* The probability of administering M2 knowing that I administered M1 and the patient being OK is 70%;
|
||||
* The probability of administering M2 knowing that I did not administer M1 and the patient is OK of 20%.
|
||||
@ -32,16 +32,19 @@ Basic knowledge of erlang, algorithm and statistics.
|
||||
|
||||
If you prefer install the erlang compiler, please search for the appropriate installation for your OS.
|
||||
If you prefer you can use Docker to test this solution.
|
||||
|
||||
Get a docker container like https://hub.docker.com/r/bitwalker/alpine-erlang and start the container:
|
||||
|
||||
* docker run --rm -it --user=root bitwalker/alpine-erlang
|
||||
`docker run --rm -it --user=root bitwalker/alpine-erlang`
|
||||
|
||||
### Run the solution
|
||||
|
||||
1. For the first exercise (Decision Tree):
|
||||
|
||||
```
|
||||
c(engine).
|
||||
engine:doAll().
|
||||
```
|
||||
|
||||
and the best solution is:
|
||||
|
||||
@ -50,12 +53,15 @@ and the best solution is:
|
||||
|
||||
2. For the second exercise (Baysian Networks):
|
||||
|
||||
```
|
||||
c(engine2).
|
||||
engine2:getp({m2, ok}).
|
||||
```
|
||||
|
||||
|
||||

|
||||
|
||||
There is a 16% chance that the patient will be OK administering the drug M2.
|
||||
**There is a 16% chance that the patient will be OK administering the drug M2.**
|
||||
|
||||
## Built With
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user