Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Changelog

All notable changes to this project are documented in this file.

## [0.2.0] - 2025-03-01

### Added
- **Missing Data Strategies**
- Introduced a `missing_strategy` parameter for **Rasch**, **TwoParameterModel**, and **ThreeParameterModel** to handle `nil` responses:
- `:ignore` (default) – skip missing responses in log-likelihood and gradients.
- `:treat_as_incorrect` – interpret `nil` as `0`.
- `:treat_as_correct` – interpret `nil` as `1`.
- Updated RSpec tests to cover each strategy and ensure graceful handling of missing responses.

- **Expanded Test Coverage**
- Added tests for repeated fits, deterministic seeding, larger random datasets, and new edge cases (all-correct/all-incorrect).
- Improved specs for parameter clamping (discriminations, guessing in 2PL/3PL).

- **Adaptive Learning Rate Enhancements**
- Enhanced convergence checks combining log-likelihood changes and average parameter updates.
- Clearer revert-and-decay logic if the likelihood decreases on a given step.

### Changed
- **Documentation / README**
- Updated the README to reflect new missing data strategies, advanced usage (adaptive learning rate, parameter clamping), and test instructions.
- Added examples showcasing how to set `missing_strategy` for each model.

### Notes
- This release remains **backward-compatible** with `0.1.x` in terms of existing usage; the default `:ignore` missing-data approach matches prior behavior.
- If upgrading, simply update your gem and enjoy the new features.
- For more details, see the updated [README](./README.md) and expanded test suites.

---

*(If you have older versions below `0.2.0`, you can keep them documented similarly, e.g., `## [0.1.x] ...`, under this new entry.)*
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

source "https://rubygems.org"

# Specify your gem's dependencies in irt_ruby.gemspec
gemspec

gem "rake", "~> 13.0"

gem "rspec", "~> 3.0"

gem "rubocop", "~> 1.21"

gem "matrix", "~> 0.4.2"
27 changes: 20 additions & 7 deletions irt_ruby.gemspec
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
# frozen_string_literal: true

require_relative "lib/irt_ruby/version"

Gem::Specification.new do |spec|
spec.name = "irt_ruby"
spec.version = "0.1.0"
spec.version = IrtRuby::VERSION
spec.authors = ["Alex Kholodniak"]
spec.email = ["alexandrkholodniak@gmail.com"]

spec.summary = "A Ruby gem that provides implementations of Rasch, Two-Parameter, and Three-Parameter models for Item Response Theory (IRT)."
spec.description = "IrtRuby is a Ruby gem that provides implementations of the Rasch model, Two-Parameter model, and Three-Parameter model for Item Response Theory (IRT). It allows you to estimate the abilities of individuals and the difficulties, discriminations, and guessing parameters of items based on their responses to a set of items."
spec.summary = "A Ruby gem that provides Rasch, 2PL, and 3PL models for Item Response Theory (IRT), with flexible missing data strategies."
spec.description = <<~DESC
IrtRuby provides implementations of the Rasch model, Two-Parameter model,
and Three-Parameter model for Item Response Theory (IRT).
It allows you to estimate the abilities of individuals and the difficulties,
discriminations, and guessing parameters of items based on their responses
to a set of items. This version adds support for multiple missing data
strategies (:ignore, :treat_as_incorrect, :treat_as_correct), expanded
test coverage, and improved adaptive optimization.
DESC

spec.homepage = "https://github.com/SyntaxSpirits/irt_ruby"
spec.license = "MIT"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/SyntaxSpirits/irt_ruby"
spec.metadata["changelog_uri"] = "https://github.com/SyntaxSpirits/irt_ruby/CHANGELOG.md"
spec.metadata["changelog_uri"] = "https://github.com/SyntaxSpirits/irt_ruby/blob/main/CHANGELOG.md"

spec.files = Dir["lib/**/*.rb"]
spec.required_ruby_version = ">= 2.6"

spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "matrix", "~> 0.4.2"

spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
Expand Down