Medicine Suggestion System

milisbir aec8b7889d definition 6 lat temu
config 38c7002dc8 ilk 6 lat temu
lib 38c7002dc8 ilk 6 lat temu
test 38c7002dc8 ilk 6 lat temu
.formatter.exs 38c7002dc8 ilk 6 lat temu
.gitignore 38c7002dc8 ilk 6 lat temu
README.md aec8b7889d definition 6 lat temu
git-guncelle 38c7002dc8 ilk 6 lat temu
mix.exs 38c7002dc8 ilk 6 lat temu
mix.lock 38c7002dc8 ilk 6 lat temu

README.md

Medicine Suggesting System (experimental)

Description

firstly we need to compile our code. We can do this with mix tool:

iex -S mix

Then mix opens the elixir shell enviroment and we types below command to train our data:

iex(1)> Train.data
{:ok, #PID<0.249.0>, nil}

if returns ok so our code run without problem. After the training system is ready to predict for symptoms or sentences by user/patient.

iex(2)> Medicine.suggest "i have some headache"
[
  duraflu: 0.06321353739426908,
  aspirin: 0.028337102969844756,
  ibuprofen: 0.017438217212212156,
  zebutal: 0.0,
  tyneol: 0.0,
  pamelor: 0.0,
  goto_doctor: 0.0,
  dvita: 0.0,
  benadryl: 0.0
]

iex(3)> Medicine.suggest "i have some cold"    
[
  duraflu: 0.050348060849802735,
  aspirin: 0.022569820380946053,
  benadryl: 0.011318418748648877,
  tyneol: 0.010652629410493062,
  zebutal: 0.0,
  pamelor: 0.0,
  ibuprofen: 0.0,
  goto_doctor: 0.0,
  dvita: 0.0
]

iex(4)> Medicine.suggest "i have some headache and cold"
[
  duraflu: 0.0981038810508801,
  aspirin: 0.043977601850394524,
  ibuprofen: 0.017438217212212156,
  benadryl: 0.011318418748648877,
  tyneol: 0.010652629410493062,
  zebutal: 0.0,
  pamelor: 0.0,
  goto_doctor: 0.0,
  dvita: 0.0 
]

iex(5)> Medicine.suggest "i am still ill"               
[
  goto_doctor: 0.011387142117414378,
  zebutal: 0.0,
  tyneol: 0.0,
  pamelor: 0.0,
  ibuprofen: 0.0,
  dvita: 0.0,
  duraflu: 0.0,
  benadryl: 0.0,
  aspirin: 0.0
]

As it can see, system produces diffrent results for different and combined symptoms. Also it can be set model of Bayes at train.exs and medicine.exs at option variable:

opts = [
	model:          :multinomial,
	storage:   :file_system,
	file_path: "lib/medicine_dataset.txt"
]

It can be use diffrent models in there, additionally can be use different dataset with other path variables. Finally it can play with more sentences

Not ready for usage