scorystal
Version, currently master branch1 version
- master branchlatestMay 14, 2017
github.com/asafschers/scorystal
Crystal Scoring API for PMML
3 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
scorystal:
github: asafschers/scorystal
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.22.0- License
- MIT
- Author
- asaf schers
Dependencies
Runtime Dependencies
- spec2~> 0.9github: waterlink/spec2.cr
- spec2-mocks~> 0.4github: waterlink/spec2-mocks.cr
README
Scorystal
Crystal scoring API for Predictive Model Markup Language (PMML).
Currently supports random forest and gradient boosted models.
Will be happy to implement new kinds of models by demand, or assist with any other issue.
Contact me here or at aschers@gmail.com.
Installation
Add this to your application's shard.yml:
dependencies:
scorystal:
github: asafschers/scorystal
Usage
require "scorystal"
# Parse PMML file
pmml_text = File.read("spec/pmmls/gbm.pmml")
parsed_pmml = XML.parse(pmml_text, XML::ParserOptions::NOBLANKS)
# Set features hash
json = %({"F1":null,"F2":21371,"F3":"AA"}")
features = Scorystal.features_hash(json)
# Gradient Boosted Model
gbm = Gbm.new(parsed_pmml)
puts gbm.score(features)
# Random Forest
rf = RandomForest.new(parsed_pmml)
puts rf.decisions_count(features)
Contributing
- Fork it ( https://github.com/asafschers/scorystal/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- [asafschers] asaf schers - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- May 14, 2017
- Crystal
0.22.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/asafschers/scorystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1