apriori-algorithm 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0678ee3955b30739e4a1a07bdfd2587e0a730fc0
4
- data.tar.gz: 5f5f1f904078c4e16d50d04d095cc9b4e6b93ed3
3
+ metadata.gz: b6bd91c25c4ecb55fb91063e0a472f2b712ed427
4
+ data.tar.gz: 77d13e2f652d05586204ac52abf35724c99a2ed9
5
5
  SHA512:
6
- metadata.gz: d4bf608b911079ffa2787bd25d4bfe5c52e64c2829b16a7b77f9eed24f90a5f71ba7db2f9548cf9a1d5b27939309f968c3d88c97ca1dc2a148a4d76efeee47dc
7
- data.tar.gz: 052a4f3c19db3be39352233e97ce021e508ff231a2ebd910094260732e4768844eb2616bba32e0a3f70b01963422376f24de102c19e7940f7501b05f9a85be22
6
+ metadata.gz: f5e9f32bba0446fe522c95ac26d1930086c83c7e7408fdfe24c2619453b25cd0dd7ba0b614b84fa8ca60afbb5eab816d8f7cf04f296453ce5739e98ce33ad56d
7
+ data.tar.gz: 0ab4e4c9020b60b3fa33071453621ce17c3a3eb7e9b3ae60b8a80f179ef5129d0522acd28b82cc85857bf34bee476c16a21e57a8f53512eeeb7856740064782a
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.2
6
+ script: bundle exec rspec spec
7
+
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- apriori-algorithm (0.1.0)
4
+ apriori-algorithm (1.0.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  ## Installation
6
6
 
7
+ [![Gem Version](https://badge.fury.io/rb/apriori-algorithm.svg)](http://badge.fury.io/rb/apriori-algorithm)
8
+
9
+ [![Build Status](https://travis-ci.org/seratch/apriori-algorithm.svg)](https://travis-ci.org/seratch/apriori-algorithm)
10
+
7
11
  Add this line to your application's Gemfile:
8
12
 
9
13
  ```ruby
@@ -4,13 +4,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'apriori'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
+
7
8
  spec.name = "apriori-algorithm"
8
9
  spec.version = Apriori::VERSION
9
10
  spec.authors = ["Kazuhiro Sera"]
10
11
  spec.email = ["seratch@gmail.com"]
11
12
  spec.summary = %q{Apriori Algorithm implementation in Ruby}
12
13
  spec.description = %q{Apriori Algorithm implementation in Ruby}
13
- spec.homepage = ""
14
+ spec.homepage = "https://github.com/seratch/apriori-algorithm"
14
15
  spec.license = "MIT"
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0")
@@ -22,4 +23,5 @@ Gem::Specification.new do |spec|
22
23
  spec.add_development_dependency "rake", "~> 10.0"
23
24
  spec.add_development_dependency 'rspec'
24
25
  spec.add_development_dependency 'guard-rspec'
26
+
25
27
  end
@@ -4,6 +4,6 @@
4
4
  #
5
5
  module Apriori
6
6
 
7
- VERSION = '1.0.0'
7
+ VERSION = '1.0.1'
8
8
 
9
9
  end
@@ -1,6 +1,7 @@
1
1
  require 'apriori/analysis_result'
2
2
  require 'apriori/association_rule'
3
3
  require 'apriori/frequent_item_set'
4
+ require 'set'
4
5
 
5
6
  #
6
7
  # Apriori Algorithm(http://en.wikipedia.org/wiki/Apriori_algorithm) implementation in Ruby.
@@ -121,7 +122,7 @@ module Apriori
121
122
  end
122
123
 
123
124
  def to_all_sub_sets(item_set)
124
- (1..(item_set.length)).flat_map { |n| item_set.to_a.combination(n) }.first
125
+ (1...(item_set.length)).flat_map { |n| item_set.to_a.combination(n) }.first
125
126
  end
126
127
 
127
128
  def calculate_support(item_set, frequencies, transactions)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apriori-algorithm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuhiro Sera
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - ".travis.yml"
77
78
  - Gemfile
78
79
  - Gemfile.lock
79
80
  - Guardfile
@@ -89,7 +90,7 @@ files:
89
90
  - spec/dataset.csv
90
91
  - spec/spec_helper.rb
91
92
  - spec/usage_spec.rb
92
- homepage: ''
93
+ homepage: https://github.com/seratch/apriori-algorithm
93
94
  licenses:
94
95
  - MIT
95
96
  metadata: {}