Skip to content

Instantly share code, notes, and snippets.

@kentaro
Last active March 20, 2016 16:23
Show Gist options
  • Save kentaro/a031d705b02beccfdfde to your computer and use it in GitHub Desktop.
Save kentaro/a031d705b02beccfdfde to your computer and use it in GitHub Desktop.
mruby-changefinderを試すよ
cf = ChangeFinder.new(5, 0.01, 10, 0.01, 5)
File.open('result.tsv', 'w') do |f|
File.open('go.tsv').each do |line|
date, trend = line.chomp.split("\t")
score = cf.score(trend.to_f)
f.puts("#{date}\t#{trend}\t#{score}")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment