vector_attribute_sampling/network_analysis/ensemble/ensemble_averaging/ensemble_averaging.rb
# take logarithmic binning against data
# if is_histo is true, normalized the frequency of every bin by its bin size
# return binned data
take logarithmic binning against data
if is_histo is true, normalized the frequency of every bin by its bin size
return binned data
take logarithmic binning against data if is_histo is true normalized the frequency of every bin by its bin size return binned data
def log_binning( bin_base, is_histo )
    val_to_binidx = lambda {|v|
      if v <= 0.0
        nil
      else
        ( Math.log(v)/Math.log(bin_base) ).floor
      end
    }
    binidx_to_val = lambda {|idx|
      bin_base ** idx
    }
    binidx_to_binsize = lambda {|idx|
      bin_base ** idx
    }
    binning( val_to_binidx, binidx_to_val, binidx_to_binsize, is_histo )
  end
def log_binning ( bin_base , is_histo ) val_to_binidx = lambda { | v | if v <= 0.0 nil else ( Math . log ( v ) / Math . log ( bin_base ) ) . floor end } binidx_to_val = lambda { | idx | bin_base ** idx } binidx_to_binsize = lambda { | idx | bin_base ** idx } binning ( val_to_binidx , binidx_to_val , binidx_to_binsize , is_histo ) end
take logarithmic binning against data
if is_histo is true, normalized the frequency of every bin by its bin size
return binned data
take logarithmic binning against data if is_histo is true normalized the frequency of every bin by its bin size return binned data
bin_base
<not_specific>
is_histo
<not_specific>