百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

Decider

> 编程语言
开源

Ruby 中的灵活可扩展的 机器学习

383 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Ruby 中的灵活可扩展的 机器学习

= Decider Yet Another Ruby Machine Learning Library

= Manifesto There are other ruby machine learning libraries out there:

  • http://github.com/cardmagic/classifier
  • http://github.com/pauldix/basset
  • More?

So why another one?

  • You can install it and try it in irb right away. You don't need to learn how a half-dozen classes work to get started: c = Decider.classifier(:spam, :ham) c.spam true

The default configuration is about 96% accurate as an email spam classifier.

  • You can control how it processes its input easily. Decider has built-in support for plain text and URIs, stemming words, stop word removal, and n-grams. All of these can easily be combined at your option (see "Getting Started" below for a quick example). Additional tokenization strategies or support for non-text document types can be added with a minimum of hassle.

  • Persist (Save) with Moneta[http://github.com/wycats/moneta]. Pretty much any storage mechanism that's available in ruby is supported. Save to a database and implement distributed classification if you like.

  • Clustering Analysis. Useful for recommendation algorithms. (In Progress)

= Getting Started

c = Decider.classifier(:spam, :ham) do |doc| doc.plain_text doc.ngrams(2..3) doc.stem end

c.spam true puts "term frequencies:" puts "spam: #{c.spam.term_frequency.inspect}" puts "ham: #{c.ham.term_frequency.inspect}" puts "" p c.scores("let's write code and drink some beers")

=> {:spam=>0.0, :ham=>1.0}

p c.classify("let's write code and drink some beers")

=> :ham

= Performance Decider has several benchmarks that also double as integration tests. These are run regularly and used to pinpoint CPU and RAM bottlenecks.

Decider does a lot of math and is fairly computationally intensive, so you want all the extra speed you can get. It is regularly tested with Ruby 1.9 and Jruby. I highly recommend using one of these Ruby implementations if at all possible if you plan on doing anything serious with Decider.

Also keep in mind that your dataset should reside entirely in memory or else you'll hit a brick wall.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言