From 56717e24ce30b5220d73ae1cce896083bc4a5f46 Mon Sep 17 00:00:00 2001 From: Alex Kholodniak Date: Sat, 1 Mar 2025 13:32:04 -0600 Subject: [PATCH] CHANGELOG.md added --- CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ Gemfile | 3 --- irt_ruby.gemspec | 27 ++++++++++++++++++++------- 3 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dd32a3e --- /dev/null +++ b/CHANGELOG.md @@ -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.)* diff --git a/Gemfile b/Gemfile index d08c4af..98217ad 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,6 @@ source "https://rubygems.org" -# Specify your gem's dependencies in irt_ruby.gemspec gemspec gem "rake", "~> 13.0" @@ -10,5 +9,3 @@ gem "rake", "~> 13.0" gem "rspec", "~> 3.0" gem "rubocop", "~> 1.21" - -gem "matrix", "~> 0.4.2" diff --git a/irt_ruby.gemspec b/irt_ruby.gemspec index 1a6253f..cff72d7 100644 --- a/irt_ruby.gemspec +++ b/irt_ruby.gemspec @@ -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"