INNER CODE UNIT · Ruby

y

yoshoku/rumale · rumale-core/lib/rumale/dataset.rb:163

          y = y.concatenate(Numo::Int32.zeros(sz_cluster[n]) + n)
        end
        # shuffle data.
        if shuffle
          rand_ids = Array(0...n_samples).shuffle(random: rng.dup)
          x = x[rand_ids, true].dup
          y = y[rand_ids].dup
        end
        [x, y]
      end

      private

      def parse_libsvm_line(line, zero_based)
        label = parse_label(line.shift)
        adj_idx = zero_based == false ? 1 : 0
        max_idx = -1
        ftvec = []

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…