bayesnet 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9501e7b169bda69caf717e26a63ba141fbfcb413607f8888cd62a66eaf3ab78c
4
+ data.tar.gz: 4ca8a547e3f71d4b5690a73ae4430700a7115f97bbee974974da094701e192b3
5
+ SHA512:
6
+ metadata.gz: 11c61de5da370ee1a5b75014c1d74644d8b38cb45a5daa81e2292efac233beaf35ee85059074b09296d7d3ce842e67353921fbcf54f92109c5ace3b09459159a
7
+ data.tar.gz: 9abb2ee0bcd8661546b6ca3e27f9a3d3f96a2679c5b6b60e06ea7e26b759542f043f39a8fa7dc1de8270032b9485fc531b23a0895ca2001119a357de13797216
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.0.3
data/.standard.yml ADDED
@@ -0,0 +1,2 @@
1
+ # For available configuration options, see:
2
+ # https://github.com/testdouble/standard
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2021-12-18
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at aleksandr.furmanov@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in bayesnet.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ group :development, :test do
11
+ gem "m", "~> 1.5.0"
12
+ gem "minitest", "~> 5.0"
13
+ gem "pry-byebug", "~> 3.9.0"
14
+ gem "standard", "~> 1.3"
15
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,63 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bayesnet (0.0.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ byebug (11.1.3)
11
+ coderay (1.1.3)
12
+ m (1.5.1)
13
+ method_source (>= 0.6.7)
14
+ rake (>= 0.9.2.2)
15
+ method_source (1.0.0)
16
+ minitest (5.15.0)
17
+ parallel (1.21.0)
18
+ parser (3.0.3.2)
19
+ ast (~> 2.4.1)
20
+ pry (0.13.1)
21
+ coderay (~> 1.1)
22
+ method_source (~> 1.0)
23
+ pry-byebug (3.9.0)
24
+ byebug (~> 11.0)
25
+ pry (~> 0.13.0)
26
+ rainbow (3.0.0)
27
+ rake (13.0.6)
28
+ regexp_parser (2.2.0)
29
+ rexml (3.2.5)
30
+ rubocop (1.23.0)
31
+ parallel (~> 1.10)
32
+ parser (>= 3.0.0.0)
33
+ rainbow (>= 2.2.2, < 4.0)
34
+ regexp_parser (>= 1.8, < 3.0)
35
+ rexml
36
+ rubocop-ast (>= 1.12.0, < 2.0)
37
+ ruby-progressbar (~> 1.7)
38
+ unicode-display_width (>= 1.4.0, < 3.0)
39
+ rubocop-ast (1.15.0)
40
+ parser (>= 3.0.1.1)
41
+ rubocop-performance (1.12.0)
42
+ rubocop (>= 1.7.0, < 2.0)
43
+ rubocop-ast (>= 0.4.0)
44
+ ruby-progressbar (1.11.0)
45
+ standard (1.5.0)
46
+ rubocop (= 1.23.0)
47
+ rubocop-performance (= 1.12.0)
48
+ unicode-display_width (2.1.0)
49
+
50
+ PLATFORMS
51
+ x86_64-darwin-19
52
+ x86_64-linux
53
+
54
+ DEPENDENCIES
55
+ bayesnet!
56
+ m (~> 1.5.0)
57
+ minitest (~> 5.0)
58
+ pry-byebug (~> 3.9.0)
59
+ rake (~> 13.0)
60
+ standard (~> 1.3)
61
+
62
+ BUNDLED WITH
63
+ 2.2.32
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Aleksandr Furmanov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Bayesnet
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/bayesnet`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'bayesnet'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install bayesnet
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bayesnet. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/bayesnet/blob/master/CODE_OF_CONDUCT.md).
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Bayesnet project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/bayesnet/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/*_test.rb"]
10
+ end
11
+
12
+ require "standard/rake"
13
+
14
+ task default: %i[test standard]
data/bayesnet.gemspec ADDED
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/bayesnet/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "bayesnet"
7
+ spec.version = Bayesnet::VERSION
8
+ spec.authors = ["Aleksandr Furmanov"]
9
+ spec.email = ["aleksandr.furmanov@gmail.com"]
10
+
11
+ spec.summary = "Byesian network DSL + inference API"
12
+ spec.homepage = "https://github.com/afurmanov/bayesnet"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = spec.homepage
18
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+
34
+ spec.add_development_dependency "m", "~> 1.5.0"
35
+ spec.add_development_dependency "minitest", "~> 5.0"
36
+ spec.add_development_dependency "pry-byebug", "~> 3.9.0"
37
+ spec.add_development_dependency "standard", "~> 1.3"
38
+
39
+ # For more information and examples about making a new gem, checkout our
40
+ # guide at: https://bundler.io/guides/creating_gem.html
41
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "bayesnet"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,11 @@
1
+ require "bayesnet/graph"
2
+
3
+ module Bayesnet
4
+ module DSL
5
+ def define(&block)
6
+ graph = Graph.new
7
+ graph.instance_eval(&block) if block
8
+ graph
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,4 @@
1
+ module Bayesnet
2
+ class Error < StandardError
3
+ end
4
+ end
@@ -0,0 +1,88 @@
1
+ module Bayesnet
2
+ # Factor if a function of sevaral variables (A, B, ...) each defined on values from finite set
3
+ class Factor
4
+ def self.build(&block)
5
+ factor = new
6
+ factor.instance_eval(&block)
7
+ factor
8
+ end
9
+
10
+ # Specifies variable name together with its values
11
+ def var(var_name_to_values)
12
+ @vars.merge!(var_name_to_values)
13
+ end
14
+
15
+ # Specifies function values for args. Latest args is an function value, all previous are argument values
16
+ def val(*args)
17
+ args = args[0] if args.size == 1 && args[0].is_a?(Array)
18
+ @vals[args[..-2]] = args[-1]
19
+ end
20
+
21
+ def var_names
22
+ @vars.keys
23
+ end
24
+
25
+ def [](*args)
26
+ key = if args.size == 1 && args[0].is_a?(Hash)
27
+ args[0].slice(*var_names).values
28
+ else
29
+ args
30
+ end
31
+ @vals[key]
32
+ end
33
+
34
+ def self.from_distribution(var_distribution)
35
+ self.class.new(var_distribution.keys, var_distribution.values.map(&:to_a))
36
+ end
37
+
38
+ def args(*var_names)
39
+ return [] if var_names.empty?
40
+ @vars[var_names[0]].product(*var_names[1..].map { |var_name| @vars[var_name] })
41
+ end
42
+
43
+ def values
44
+ @vals.values
45
+ end
46
+
47
+ def normalize
48
+ vals = @vals.clone
49
+ norm_factor = vals.map(&:last).sum * 1.0
50
+ vals.each { |k, v| vals[k] /= norm_factor }
51
+ self.class.new(@vars.clone, vals)
52
+ end
53
+
54
+ def limit_by(evidence)
55
+ vars = @vars.except(*evidence.keys)
56
+
57
+ evidence_vals = evidence.values
58
+ indices = evidence.keys.map { |k| index_by_var_name[k] }
59
+ vals = @vals.select { |k, v| indices.map { |i| k[i] } == evidence_vals }
60
+ vals.transform_keys! { |k| k - evidence_vals }
61
+
62
+ self.class.new(vars, vals)
63
+ end
64
+
65
+ def reduce(over_vars)
66
+ vars = @vars.slice(*over_vars)
67
+ indices = vars.keys.map { |k| index_by_var_name[k] }
68
+ vals = @vals.group_by { |args, val| indices.map { |i| args[i] } }
69
+ vals.transform_values! { |v| v.map(&:last).sum }
70
+ reduced = self.class.new(vars, vals)
71
+ reduced.normalize
72
+ end
73
+
74
+ private
75
+
76
+ def initialize(vars = {}, vals = {})
77
+ @vars = vars
78
+ @vals = vals
79
+ end
80
+
81
+ def index_by_var_name
82
+ return @index_by_var_name if @index_by_var_name
83
+ @index_by_var_name = {}
84
+ @vars.each_with_index { |(k, v), i| @index_by_var_name[k] = i }
85
+ @index_by_var_name
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,63 @@
1
+ require "bayesnet/node"
2
+
3
+ module Bayesnet
4
+ class Graph
5
+ attr_reader :nodes
6
+
7
+ def initialize
8
+ @nodes = {}
9
+ end
10
+
11
+ def var_names
12
+ nodes.keys
13
+ end
14
+
15
+ def node(name, parents: [], &block)
16
+ raise Error, "DSL error, #node requires a &block" unless block
17
+ node = Node.new(name, @nodes.slice(*parents))
18
+ node.instance_eval(&block)
19
+ @nodes[name] = node
20
+ end
21
+
22
+ def distribution(over: [], evidence: {})
23
+ limited = joint_distribution.limit_by(evidence)
24
+ limited.reduce(over)
25
+ end
26
+
27
+ # This is MAP query, i.e. Maximum a Posteriory
28
+ def most_likely_value(var_name, evidence:)
29
+ posterior_distribution = distribution(over: [var_name], evidence: evidence)
30
+ mode = posterior_distribution.args(var_name).zip(posterior_distribution.values).max_by(&:last)
31
+ mode.first.first
32
+ end
33
+
34
+ def chances(assignment, evidence:)
35
+ over_vars = assignment.slice(*var_names) # maintains order of vars
36
+ posterior_distribution = distribution(over: over_vars.keys, evidence: evidence)
37
+ posterior_distribution[*over_vars.values]
38
+ end
39
+
40
+ def joint_distribution
41
+ return @joint_distribution if @joint_distribution
42
+
43
+ if @nodes.empty?
44
+ @joint_distribution = Factor.new
45
+ return @joint_distribution
46
+ end
47
+
48
+ factor = Factor.new
49
+ @nodes.each do |node_name, node|
50
+ factor.var node_name => node.values
51
+ end
52
+
53
+ factor.args(*var_names).each do |args|
54
+ val_by_name = var_names.zip(args).to_h
55
+ val = nodes.values.reduce(1.0) do |prob, node|
56
+ prob * node.factor[val_by_name]
57
+ end
58
+ factor.val args + [val]
59
+ end
60
+ @joint_distribution = factor.normalize
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,48 @@
1
+ module Bayesnet
2
+ class Node
3
+ attr_reader :name, :parent_nodes, :factor
4
+
5
+ def initialize(name, parent_nodes)
6
+ @name = name
7
+ @parent_nodes = parent_nodes
8
+ @values = []
9
+ end
10
+
11
+ def values(hash_or_array = nil, &block)
12
+ case hash_or_array
13
+ when NilClass
14
+ @values
15
+ when Hash
16
+ @values = hash_or_array.keys
17
+ node = self
18
+ @factor = Factor.build do
19
+ var node.name => node.values
20
+ hash_or_array.each do |value, probability|
21
+ val [value, probability]
22
+ end
23
+ end
24
+ when Array
25
+ raise Error, "DSL error, #values requires a &block when first argument is an Array" unless block
26
+ @values = hash_or_array
27
+ node = self
28
+ @factor = Factor.build do
29
+ var node.name => node.values
30
+ node.parent_nodes.each do |parent_node_name, parent_node|
31
+ var parent_node_name => parent_node.values
32
+ end
33
+ end
34
+ instance_eval(&block)
35
+ end
36
+ end
37
+
38
+ def distributions(&block)
39
+ instance_eval(&block)
40
+ end
41
+
42
+ def as(distribution, given:)
43
+ @values.zip(distribution).each do |value, probability|
44
+ @factor.val [value] + given + [probability]
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bayesnet
4
+ VERSION = "0.0.1"
5
+ end
data/lib/bayesnet.rb ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "set"
4
+
5
+ require_relative "bayesnet/dsl"
6
+ require_relative "bayesnet/error"
7
+ require_relative "bayesnet/factor"
8
+ require_relative "bayesnet/version"
9
+
10
+ module Bayesnet
11
+ extend Bayesnet::DSL
12
+ end
metadata ADDED
@@ -0,0 +1,121 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bayesnet
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Aleksandr Furmanov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-12-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: m
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.0
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.5.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '5.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry-byebug
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.9.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 3.9.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: standard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.3'
69
+ description:
70
+ email:
71
+ - aleksandr.furmanov@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".ruby-version"
77
+ - ".standard.yml"
78
+ - CHANGELOG.md
79
+ - CODE_OF_CONDUCT.md
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE.txt
83
+ - README.md
84
+ - Rakefile
85
+ - bayesnet.gemspec
86
+ - bin/console
87
+ - bin/setup
88
+ - lib/bayesnet.rb
89
+ - lib/bayesnet/dsl.rb
90
+ - lib/bayesnet/error.rb
91
+ - lib/bayesnet/factor.rb
92
+ - lib/bayesnet/graph.rb
93
+ - lib/bayesnet/node.rb
94
+ - lib/bayesnet/version.rb
95
+ homepage: https://github.com/afurmanov/bayesnet
96
+ licenses:
97
+ - MIT
98
+ metadata:
99
+ homepage_uri: https://github.com/afurmanov/bayesnet
100
+ source_code_uri: https://github.com/afurmanov/bayesnet
101
+ changelog_uri: https://github.com/afurmanov/bayesnet/blob/main/CHANGELOG.md
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 2.6.0
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubygems_version: 3.2.32
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: Byesian network DSL + inference API
121
+ test_files: []