Update README.md
This commit is contained in:
parent
55f3d7a80d
commit
295d244aaf
49
README.md
49
README.md
@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
This repository have two different exercises in erlang:
|
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.**
|
**1.Decision tree that maximizes the optimal point and consequently provides decision support based on the given assumptions.**
|
||||||
|
|
||||||
* The probability of making a medication/treatment 1 and use is OK of 42%;
|
* The probability of taking medication/treatment 1 and the user being OK is 42%;
|
||||||
* One possibility of making a medication/treatment 1 and of the user staying KO is 22.5%;
|
* The probability of taking medication/treatment 1 and the user becoming KO is 22.5%;
|
||||||
* The probability of making a medication/treatment 1 and is not conclusive is 35.6%;
|
* The probability of taking medication/treatment 1 and it not being conclusive is 35.6%;
|
||||||
* The probability of making a medication/treatment 2 and staying OK is 62%;
|
* The probability of taking medication/treatment 2 and being OK is 62%;
|
||||||
* The probability of making a medication/treatment 2 and getting KO is 38%.
|
* The probability of taking a medication/treatment 2 and getting KO is 38%.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ doAll() ->
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
**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.**
|
**2. There are ways of obtaining probabilities knowing certain parameters (they don't indicate the optimum point, but calculate a probability of success depending on the existing resources) - using Baysian networks.**
|
||||||
|
|
||||||
What is the probability of giving the patient M2 and is OK, knowing that:
|
What is the probability of giving the patient M2 and the patient being well, knowing that:
|
||||||
|
|
||||||
* The probability of administering M1 and the patient is OK is 20%;
|
* The probability of administering M1 and the patient being well is 20 per cent;
|
||||||
* 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 have administered M1 and the patient is well is 70%;
|
||||||
* The probability of administering M2 knowing that I did not administer M1 and the patient is OK of 20%.
|
* The probability of administering M2 knowing that I have not administered M1 and the patient is OK is 20 per cent.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
@ -69,12 +69,12 @@ Basic knowledge of erlang, algorithm and statistics.
|
|||||||
|
|
||||||
### Install or use Docker
|
### Install or use Docker
|
||||||
|
|
||||||
If you prefer install the erlang compiler, please search for the appropriate installation for your OS.
|
If you prefer to install the erlang compiler, please find the appropriate installation for your operating system.
|
||||||
|
|
||||||
If you prefer you can use Docker to test this solution.
|
If you prefer, you can use Docker to test this solution.
|
||||||
Get a [docker container](https://hub.docker.com/search?q=erlang&type=image) and start the container.
|
Get a [docker container](https://hub.docker.com/search?q=erlang&type=image) and start the container.
|
||||||
|
|
||||||
I suggest [this container](https://hub.docker.com/r/bitwalker/alpine-erlang) and run:
|
I suggest [this container](https://hub.docker.com/r/bitwalker/alpine-erlang) and run it:
|
||||||
|
|
||||||
```
|
```
|
||||||
docker pull bitwalker/alpine-erlang
|
docker pull bitwalker/alpine-erlang
|
||||||
@ -86,15 +86,15 @@ docker run --rm -it --user=root bitwalker/alpine-erlang
|
|||||||
1. For the first exercise (Decision Tree):
|
1. For the first exercise (Decision Tree):
|
||||||
|
|
||||||
```
|
```
|
||||||
c(engine).
|
c(motor).
|
||||||
engine:doAll().
|
motor:doAll().
|
||||||
```
|
```
|
||||||
|
|
||||||
and the best solution is:
|
and the best solution is:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
** You can do a medication 1 and medication 2 of 97.6% of success to be OK.**
|
** You can take medication 1 and medication 2 with a 97.6 per cent success rate to get well.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -103,16 +103,16 @@ and the best solution is:
|
|||||||
2. For the second exercise (Baysian Networks):
|
2. For the second exercise (Baysian Networks):
|
||||||
|
|
||||||
```
|
```
|
||||||
c(engine3).
|
c(motor3).
|
||||||
engine3:getp({m2, ok}).
|
motor3:getp({m2, ok}).
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**There is a 16% chance that the patient will be OK administering the drug M2.**
|
**There is a 16 per cent chance that the patient will be OK when administering drug M2.
|
||||||
|
|
||||||
## Built With
|
## Created with
|
||||||
|
|
||||||
* erlang - https://www.erlang.org;
|
* erlang - https://www.erlang.org;
|
||||||
|
|
||||||
@ -122,13 +122,12 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on my code of conduct
|
|||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://gitlab.andrealmeida.net/public_projects/erlang-decision-tree/tags).
|
I use [SemVer](http://semver.org/) for versioning. For available versions, see [tags on this repository](https://gitlab.andrealmeida.net/public_projects/erlang-decision-tree/tags).
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
[](https://andrealmeida.net)
|
[](https://andrealmeida.net)
|
||||||
|
|
||||||
## License
|
## Licence
|
||||||
|
|
||||||
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
|
|
||||||
|
|
||||||
|
This project is licensed under the MIT licence - see the file [LICENSE.md](LICENSE.md) for more details.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user