Metadata-Version: 2.1
Name: m5-wrmsse
Version: 1.0.0
Summary: WRMSSE score for the M5 dataset
Home-page: https://github.com/pmrgn/m5-wrmsse
Author: Paul Morgan
Author-email: 
License: Copyright (c) 2022, Paul Morgan
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# M5 WRMSSE

Calculate the WRMSSE of a 28-day forecast for the M5 competition hosted by Kaggle. Instead of uploading submission files to Kaggle for an accuracy score, install the m5-wrmsse package and calculate it locally.

For more information on the derivation, visit

<a href="https://www.pmorgan.com.au/tutorials/wrmsse-for-the-m5-dataset/">https://www.pmorgan.com.au/tutorials/wrmsse-for-the-m5-dataset/</a>

## Installation

Clone the repo

	git clone git@github.com:pmrgn/m5-wrmsse.git

Or download and install the package using `pip`

	pip install m5-wrmsse

## Usage

The `wrmsse` function returns the WRMSSE of a 28-day forecast, equivalent to what Kaggle calculates for it's public leaderboard. First, import the function

	from m5_wrmsse import wrmsse

Pass your forecast as a numpy array to the function, which must be of shape (30490, 28).
	
	my_forecast = np.ones((30490,28))     # Forecast example containing all ones
	score = wrmsse(my_forecast)
