Sha256: 7d1c9fbc183e9b56adec4facd3505b0945671317786df3dd0b095bd438f6a2e1
Contents?: true
Size: 452 Bytes
Versions: 17
Compression:
Stored size: 452 Bytes
Contents
require 'support/test_model' class DatasetHelper def self.normal_distribution(vector_size: 3, clusters: 8, datapoints: 80) dataset = [] sr = SimpleRandom.new (1..datapoints).each do |i| mean = -90 + (i % clusters) * (180.0 / clusters) standard_deviation = 5 vector = [] vector_size.times{ |k| vector << sr.normal(mean, standard_deviation) } dataset << TestModel.new(vector) end dataset end end
Version data entries
17 entries across 17 versions & 1 rubygems