{"action":"opened","issue":{"url":"https://api.github.com/repos/ashleyw/naive_bayes/issues/1","repository_url":"https://api.github.com/repos/ashleyw/naive_bayes","labels_url":"https://api.github.com/repos/ashleyw/naive_bayes/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ashleyw/naive_bayes/issues/1/comments","events_url":"https://api.github.com/repos/ashleyw/naive_bayes/issues/1/events","html_url":"https://github.com/ashleyw/naive_bayes/issues/1","id":378980996,"node_id":"MDU6SXNzdWUzNzg5ODA5OTY=","number":1,"title":"mix test fails on elixir 1.7","user":{"login":"gstamp","id":93839,"node_id":"MDQ6VXNlcjkzODM5","avatar_url":"https://avatars2.githubusercontent.com/u/93839?v=4","gravatar_id":"","url":"https://api.github.com/users/gstamp","html_url":"https://github.com/gstamp","followers_url":"https://api.github.com/users/gstamp/followers","following_url":"https://api.github.com/users/gstamp/following{/other_user}","gists_url":"https://api.github.com/users/gstamp/gists{/gist_id}","starred_url":"https://api.github.com/users/gstamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gstamp/subscriptions","organizations_url":"https://api.github.com/users/gstamp/orgs","repos_url":"https://api.github.com/users/gstamp/repos","events_url":"https://api.github.com/users/gstamp/events{/privacy}","received_events_url":"https://api.github.com/users/gstamp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T00:59:59Z","updated_at":"2018-11-09T00:59:59Z","closed_at":null,"author_association":"NONE","body":"Tests pass on 1.6 but 1.7 produces the errors shown below.\r\n\r\n(sorry for the rather long output)\r\n\r\n```\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.090155 ===\r\n** Generic server <0.163.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.162.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test allows smoothing constant k to be set to any value',\r\n                             1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,103}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.094197 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.163.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.162.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.162.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 6772\r\n    stack_size: 27\r\n    reductions: 95083\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.162.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.163.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 26\r\n      reductions: 196\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test allows smoothing constant k to be set to any value',\r\n                      1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,103}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.097753 ===\r\n** Generic server <0.165.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.164.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test should use smoothing by default to eliminate errors w/division by zero',\r\n                             1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,54}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.098980 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.165.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.164.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.164.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 4185\r\n    stack_size: 27\r\n    reductions: 95357\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.164.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.165.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 25\r\n      reductions: 195\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should use smoothing by default to eliminate errors w/division by zero',\r\n                      1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,54}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n  1) test allows smoothing constant k to be set to any value (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:101\r\n     ** (EXIT from #PID<0.162.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n\r\n\r\n  2) test should use smoothing by default to eliminate errors w/division by zero (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:51\r\n     ** (EXIT from #PID<0.164.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.100717 ===\r\n** Generic server <0.167.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.166.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test train/3 should return {:ok}',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,180}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.101962 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.167.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.166.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.166.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 4185\r\n    stack_size: 27\r\n    reductions: 92880\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.166.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.167.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 24\r\n      reductions: 196\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test train/3 should return {:ok}',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,180}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  3) test train/3 should return {:ok} (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:178\r\n     ** (EXIT from #PID<0.166.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.103636 ===\r\n** Generic server <0.169.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.168.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test should optionally allow class distribution to be assumed uniform',\r\n                             1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,144}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.104909 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.169.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.168.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.168.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 4185\r\n    stack_size: 27\r\n    reductions: 95176\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.168.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.169.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 26\r\n      reductions: 195\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should optionally allow class distribution to be assumed uniform',\r\n                      1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,144}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  4) test should optionally allow class distribution to be assumed uniform (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:141\r\n     ** (EXIT from #PID<0.168.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n.=ERROR REPORT==== 9-Nov-2018::11:58:26.106484 ===\r\n** Generic server <0.173.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.172.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test should assign equal probability to each class',\r\n                             1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,13}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.107759 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.173.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.172.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.172.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 4185\r\n    stack_size: 27\r\n    reductions: 94515\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.172.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.173.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 25\r\n      reductions: 196\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should assign equal probability to each class',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,13}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  5) test should assign equal probability to each class (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:10\r\n     ** (EXIT from #PID<0.172.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n.=ERROR REPORT==== 9-Nov-2018::11:58:26.109441 ===\r\n** Generic server <0.177.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.176.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','-test should optionally purge low frequency data/1-fun-0-',\r\n                             2,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,80}]},\r\n    {'Elixir.Enum','-each/2-lists^foreach/1-0-',2,\r\n                   [{file,\"lib/enum.ex\"},{line,765}]},\r\n    {'Elixir.Enum',each,2,[{file,\"lib/enum.ex\"},{line,765}]},\r\n    {'Elixir.NaiveBayesTest','test should optionally purge low frequency data',\r\n                             1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,79}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.110818 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.177.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.176.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.176.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 2586\r\n    stack_size: 27\r\n    reductions: 109127\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.176.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.177.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 610\r\n      stack_size: 32\r\n      reductions: 544\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      '-test should optionally purge low frequency data/1-fun-0-',\r\n                      2,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,80}]},\r\n                  {'Elixir.Enum','-each/2-lists^foreach/1-0-',2,\r\n                      [{file,\"lib/enum.ex\"},{line,765}]},\r\n                  {'Elixir.Enum',each,2,[{file,\"lib/enum.ex\"},{line,765}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should optionally purge low frequency data',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,79}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  6) test should optionally purge low frequency data (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:76\r\n     ** (EXIT from #PID<0.176.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.112273 ===\r\n** Generic server <0.179.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.178.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test should handle more than 2 classes',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,39}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.113395 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.179.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.178.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.178.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 4185\r\n    stack_size: 27\r\n    reductions: 93044\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.178.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.179.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 25\r\n      reductions: 196\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should handle more than 2 classes',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,39}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  7) test should handle more than 2 classes (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:36\r\n     ** (EXIT from #PID<0.178.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.114765 ===\r\n** Generic server <0.181.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.180.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','-test should allow binarized mode/1-fun-0-',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,122}]},\r\n    {'Elixir.NaiveBayesTest','test should allow binarized mode',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,128}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.115987 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.181.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.180.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.180.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 6772\r\n    stack_size: 27\r\n    reductions: 98558\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.180.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.181.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 28\r\n      reductions: 197\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      '-test should allow binarized mode/1-fun-0-',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,122}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should allow binarized mode',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,128}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  8) test should allow binarized mode (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:118\r\n     ** (EXIT from #PID<0.180.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.117346 ===\r\n** Generic server <0.183.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.182.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test works on all tokens - not just strings',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,67}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.118466 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.183.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.182.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.182.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 4185\r\n    stack_size: 27\r\n    reductions: 93209\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.182.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.183.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 26\r\n      reductions: 195\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test works on all tokens - not just strings',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,67}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n  9) test works on all tokens - not just strings (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:64\r\n     ** (EXIT from #PID<0.182.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.119709 ===\r\n** Generic server <0.185.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.184.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test should allow multiple categories',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,26}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.120835 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.185.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.184.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.184.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 6772\r\n    stack_size: 27\r\n    reductions: 93218\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.184.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.185.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 26\r\n      reductions: 207\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest',\r\n                      'test should allow multiple categories',1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,26}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n 10) test should allow multiple categories (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:23\r\n     ** (EXIT from #PID<0.184.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n=ERROR REPORT==== 9-Nov-2018::11:58:26.128028 ===\r\n** Generic server <0.187.0> terminating \r\n** Last message in was {get_and_update,#Fun<Elixir.NaiveBayes.10.6254612>}\r\n** When Server state == #{'__struct__' => 'Elixir.NaiveBayes',\r\n                          assume_uniform => false,binarized => false,\r\n                          data =>\r\n                              #{'__struct__' => 'Elixir.Data',\r\n                                categories => #{}},\r\n                          smoothing => 1,\r\n                          vocab =>\r\n                              #{'__struct__' => 'Elixir.Vocab',tokens => #{}}}\r\n** Reason for termination == \r\n** {#{'__exception__' => true,'__struct__' => 'Elixir.ArgumentError',\r\n      message => <<\"could not put/update key :examples on a nil value\">>},\r\n    [{'Elixir.Access',get_and_update,3,[{file,\"lib/access.ex\"},{line,389}]},\r\n     {'Elixir.Map',get_and_update,3,[{file,\"lib/map.ex\"},{line,791}]},\r\n     {'Elixir.Map','get_and_update!',3,[{file,\"lib/map.ex\"},{line,832}]},\r\n     {'Elixir.Data',increment_examples,2,\r\n                    [{file,\"lib/naive_bayes/data.ex\"},{line,10}]},\r\n     {'Elixir.Map','update!',3,[{file,\"lib/map.ex\"},{line,752}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-4-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,52}]},\r\n     {'Elixir.Enum','-reduce/3-lists^foldl/2-0-',3,\r\n                    [{file,\"lib/enum.ex\"},{line,1925}]},\r\n     {'Elixir.NaiveBayes','-train/3-fun-5-',3,\r\n                          [{file,\"lib/naive_bayes.ex\"},{line,51}]},\r\n     {'Elixir.Agent.Server',handle_call,3,\r\n                            [{file,\"lib/agent/server.ex\"},{line,16}]},\r\n     {gen_server,try_handle_call,4,[{file,\"gen_server.erl\"},{line,661}]},\r\n     {gen_server,handle_msg,6,[{file,\"gen_server.erl\"},{line,690}]},\r\n     {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}\r\n** Client <0.186.0> stacktrace\r\n** [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n    {'Elixir.GenServer',call,3,[{file,\"lib/gen_server.ex\"},{line,921}]},\r\n    {'Elixir.NaiveBayes',train,3,[{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n    {'Elixir.NaiveBayesTest','test should pass README example',1,\r\n                             [{file,\"test/naive_bayes_test.exs\"},{line,167}]},\r\n    {'Elixir.ExUnit.Runner',exec_test,1,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n    {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n    {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                            [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n=CRASH REPORT==== 9-Nov-2018::11:58:26.129158 ===\r\n  crasher:\r\n    initial call: Elixir.NaiveBayes:'-new/1-fun-0-'/0\r\n    pid: <0.187.0>\r\n    registered_name: []\r\n    exception error: #{'__exception__' => true,\r\n                       '__struct__' => 'Elixir.ArgumentError',\r\n                       message =>\r\n                           <<\"could not put/update key :examples on a nil value\">>}\r\n      in function  'Elixir.Access':get_and_update/3 (lib/access.ex, line 389)\r\n      in call from 'Elixir.Map':get_and_update/3 (lib/map.ex, line 791)\r\n      in call from 'Elixir.Map':'get_and_update!'/3 (lib/map.ex, line 832)\r\n      in call from 'Elixir.Data':increment_examples/2 (lib/naive_bayes/data.ex, line 10)\r\n      in call from 'Elixir.Map':'update!'/3 (lib/map.ex, line 752)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-4-'/3 (lib/naive_bayes.ex, line 52)\r\n      in call from 'Elixir.Enum':'-reduce/3-lists^foldl/2-0-'/3 (lib/enum.ex, line 1925)\r\n      in call from 'Elixir.NaiveBayes':'-train/3-fun-5-'/3 (lib/naive_bayes.ex, line 51)\r\n      in call from 'Elixir.Agent.Server':handle_call/3 (lib/agent/server.ex, line 16)\r\n      in call from gen_server:try_handle_call/4 (gen_server.erl, line 661)\r\n      in call from gen_server:handle_msg/6 (gen_server.erl, line 690)\r\n    ancestors: [<0.186.0>]\r\n    message_queue_len: 0\r\n    messages: []\r\n    links: [<0.186.0>]\r\n    dictionary: []\r\n    trap_exit: false\r\n    status: running\r\n    heap_size: 6772\r\n    stack_size: 27\r\n    reductions: 93058\r\n  neighbours:\r\n    neighbour:\r\n      pid: <0.186.0>\r\n      registered_name: []\r\n      initial_call: {erlang,apply,2}\r\n      current_function: {gen,do_call,4}\r\n      ancestors: []\r\n      message_queue_len: 0\r\n      links: [<0.187.0>]\r\n      trap_exit: false\r\n      status: waiting\r\n      heap_size: 233\r\n      stack_size: 26\r\n      reductions: 406\r\n      current_stacktrace: [{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},\r\n                  {'Elixir.GenServer',call,3,\r\n                      [{file,\"lib/gen_server.ex\"},{line,921}]},\r\n                  {'Elixir.NaiveBayes',train,3,\r\n                      [{file,\"lib/naive_bayes.ex\"},{line,47}]},\r\n                  {'Elixir.NaiveBayesTest','test should pass README example',\r\n                      1,\r\n                      [{file,\"test/naive_bayes_test.exs\"},{line,167}]},\r\n                  {'Elixir.ExUnit.Runner',exec_test,1,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,312}]},\r\n                  {timer,tc,1,[{file,\"timer.erl\"},{line,166}]},\r\n                  {'Elixir.ExUnit.Runner','-spawn_test/3-fun-1-',4,\r\n                      [{file,\"lib/ex_unit/runner.ex\"},{line,251}]}]\r\n\r\n\r\n\r\n 11) test should pass README example (NaiveBayesTest)\r\n     test/naive_bayes_test.exs:159\r\n     ** (EXIT from #PID<0.186.0>) an exception was raised:\r\n         ** (ArgumentError) could not put/update key :examples on a nil value\r\n             (elixir) lib/access.ex:389: Access.get_and_update/3\r\n             (elixir) lib/map.ex:791: Map.get_and_update/3\r\n             (elixir) lib/map.ex:832: Map.get_and_update!/3\r\n             (naive_bayes) lib/naive_bayes/data.ex:10: Data.increment_examples/2\r\n             (elixir) lib/map.ex:752: Map.update!/3\r\n             (naive_bayes) lib/naive_bayes.ex:52: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/enum.ex:1925: Enum.\"-reduce/3-lists^foldl/2-0-\"/3\r\n             (naive_bayes) lib/naive_bayes.ex:51: anonymous fn/3 in NaiveBayes.train/3\r\n             (elixir) lib/agent/server.ex:16: Agent.Server.handle_call/3\r\n             (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4\r\n             (stdlib) gen_server.erl:690: :gen_server.handle_msg/6\r\n             (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3\r\n\r\n\r\n\r\nFinished in 0.1 seconds\r\n13 tests, 11 failures\r\n\r\nRandomized with seed 976569\r\n```"}}
{"actor":{"display_login":"gstamp"}}