Skip to content

[RFC]: Update Bartlett test #11

@Planeshifter

Description

@Planeshifter

This RFC proposes refactoring the Bartlett test to align with improvements made to the chi-square test in commit 2a2186604e317e461b18afc23e41e9fa5e394c10.

Proposed Changes

Return class instance Instead of a plain object

  • Replace the current plain object results with a proper Results class
  • Implement accessors for all properties (alpha, statistic, pValue, df, etc.)
  • Add proper TypeScript types for the Results class

API Changes

  • Rename print method to toString for consistency
  • Add toJSON method for serialization
  • Keep the flexible argument handling

Performance Improvements

  • Use stdlib's BLAS-like functions for summations and array operations
  • Use typed arrays for numeric computations
  • Optimize group data handling

Time estimate without AI: 2h.
Time estimate with AI: 1h.

Metadata

Metadata

Assignees

Labels

RefactorTask to refactor existing code.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.estimate: 2-4hrsTask which should take between 2 to 4 hours.❌ No AINot allowed to use AI.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions