vector_attribute_sampling/network_analysis/ensemble/ensemble_averaging/ensemble_averaging.rb
# take linear binning against data
# if is_histo is true, normalize the frequency of every bin by its bin size
# return binned data
take linear binning against data
if is_histo is true, normalize the frequency of every bin by its bin size
return binned data
take linear binning against data if is_histo is true normalize the frequency of every bin by its bin size return binned data
def linear_binning( bin_size, is_histo )
    val_to_binidx = lambda {|v|
      (v.to_f / bin_size).floor
    }
    binidx_to_val = lambda {|idx|
      idx * bin_size
    }
    binidx_to_binsize = lambda {|idx|
      bin_size
    }
    binning( val_to_binidx, binidx_to_val, binidx_to_binsize, is_histo )
  end
def linear_binning ( bin_size , is_histo ) val_to_binidx = lambda { | v | ( v . to_f / bin_size ) . floor } binidx_to_val = lambda { | idx | idx * bin_size } binidx_to_binsize = lambda { | idx | bin_size } binning ( val_to_binidx , binidx_to_val , binidx_to_binsize , is_histo ) end
take linear binning against data
if is_histo is true, normalize the frequency of every bin by its bin size
return binned data
take linear binning against data if is_histo is true normalize the frequency of every bin by its bin size return binned data
bin_size
<not_specific>
is_histo
<not_specific>