<commit_before>using AverageShiftedHistograms
using Distributions
using Base.Test

##### Testing probably needs to be redone

#generate data
srand(12345)
y = rand(Gamma(5,2), 1000)

# Get bins
bin = Bin1(y, ab=[0, maximum(y) + 1], nbin=100)
bin = Bin1(y, nbin=100)

@test bin.n == 1000
@test bin.nout == 0

@test bin.ab == [0, maximum(y) + 1]
@test bin.nbin == 100


# Get ash estimate with Gaussian Kernel
ash = Ash1(bin, m=5, kernel=:gaussian)

@test ash.m == 5
@test ash.b == bin
@test ash.non0 == true
@test length(ash.x) == length(ash.y)
@test ash.kernel == :gaussian


<commit_msg>test: update<commit_after>using AverageShiftedHistograms
using Distributions
using Base.Test


#generate data
srand(12345)
y = rand(Gamma(5,2), 1000)

# Get bins
bin = Bin1(y, ab=[0, maximum(y) + 1], nbin=100)

@test bin.n == 1000
@test bin.nout == 0

@test bin.ab == [0, maximum(y) + 1]
@test bin.nbin == 100


# Get ash estimate with Gaussian Kernel
ash = Ash1(bin, m=5, kernel=:gaussian)

@test ash.m == 5
@test ash.b == bin
@test ash.non0 == true
@test length(ash.x) == length(ash.y)
@test ash.kernel == :gaussian



{'fraction_non_alphanumeric': 0.16350496838301717, 'fraction_numerical': 0.05962059620596206, 'mean_word_length': 4.404878048780488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '720191', 'n_tokens_mistral': 487, 'n_tokens_neox': 430, 'n_words': 128}