music_detector 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d4347bc2aa7368840aeacbfea0d5f8988198d96
4
- data.tar.gz: b91ba65982e25f962fe90da3714ce9a55f145c0b
3
+ metadata.gz: 3401a5f37951bc70e14a7f2c09f8b1166cefd8c7
4
+ data.tar.gz: f129f4889bd70baed3d2a2982e4055e5de9a39d7
5
5
  SHA512:
6
- metadata.gz: 62fa904711056d3c7a10d395f93ace2012f63cc4ad84cd4e527c01fab1b9e092b53160d39d0f9cedd834cc079a2fbd24c6ce9cb21babb708fd7a093edd0b32f3
7
- data.tar.gz: ada725ee7a06c66c9946101aa46ff02a28c105fd6c8ebaab7d822819d84a5a657dc8d23e1dfba529997f474024b6d64678695a2616ccea3ad07f664f01681edc
6
+ metadata.gz: 4cf93ae96552f60927f148fa187771b02b2cbff0717b66bbc94d58a69d84ce3aee0d23f1917e907bfd576a0721559641450103ebc491b3c534b867d4c2cc5c60
7
+ data.tar.gz: 20cff17b463ee4da7831614877394716447e4a71af0ed7104b80b12c4b33dc4653077f7bb27c04875539d80881a2535492e4567950d3256f0686084bcc56ab9d
@@ -63,6 +63,7 @@ module MusicDetector
63
63
  end
64
64
 
65
65
  # @param [NArray] fvs array of input feature vector(s)
66
+ # @return [Array<Boolean>] estimated result; if the n-th element is true, the n-th feature vector might contain music
66
67
  def estimate(fvs)
67
68
  raise ArgumentError('the form of the input is differ from trained model') if @b.total - 1 != fvs.shape[0]
68
69
 
@@ -78,7 +79,10 @@ module MusicDetector
78
79
  x[1..(fvs.shape[0]), i] = fvs[true, i].flatten
79
80
  end
80
81
  end
81
- x * @b
82
+ y = x * @b
83
+ y[y < 0] = false
84
+ y[y >= 0] = true
85
+ y.to_a
82
86
  end
83
87
 
84
88
  def export_to(file_path, config:)
@@ -1,3 +1,3 @@
1
1
  module MusicDetector
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: music_detector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sobataro