GridGenerator
To automatically generate grids to tune models with.
get_grids()
- src.scalecast.GridGenerator.get_grids(grid='example', out_name='Grids.py', overwrite=False)
Saves a grids file to the working directory. See all available grids files here: https://github.com/mikekeith52/scalecast/tree/main/src/scalecast/grids. Make your own grids file and open a pull request on GitHub to add it to the library.
- Parameters:
grid (str) – Default ‘example’. The name of the grids file within scalecast. Do not add the ‘.py’ extension.
out_name (str) – Default ‘Grids.py’. The name of the grids file that will be saved to the user’s working directory.
overwrite (bool) – Default False. Whether to overwrite a file (with the out_name name) if one is already in the working directory.
- Returns:
None
>>> from scalecast import GridGenerator
>>> GridGenerator.get_grids() # writes a Grids.py file with all available models that can be tuned and example dictionaries
get_empty_grids()
- src.scalecast.GridGenerator.get_empty_grids(out_name='Grids.py', overwrite=False)
Saves empty grids to working directory as Grids.py (does not overwrite by default).
- Parameters:
out_name (str) – Default ‘Grids.py’. The name of the file to write the grids to.
overwrite (bool) – Default False. Whether to overwrite a file (with the out_name name) if one is already in the working directory.
- Returns:
None
>>> from scalecast import GridGenerator
>>> GridGenerator.get_empty_grids() # writes a Grids.py file with all available models that can be tuned and empty dictionaries
get_example_grids()
- src.scalecast.GridGenerator.get_example_grids(out_name='Grids.py', overwrite=False)
Saves example grids to working directory as Grids.py (does not overwrite by default).
- Parameters:
out_name (str) – Default ‘Grids.py’. The name of the file to write the grids to.
overwrite (bool) – Default False. Whether to overwrite a file (with the out_name name) if one is already in the working directory.
- Returns:
None
>>> from scalecast import GridGenerator
>>> GridGenerator.get_example_grids() # writes a Grids.py file with all available models that can be tuned and example dictionaries
get_mv_grids()
- src.scalecast.GridGenerator.get_mv_grids(out_name='MVGrids.py', overwrite=False)
Saves example grids to working directory as MVGrids.py (does not overwrite by default).
- Parameters:
out_name (str) – Default ‘MVGrids.py’. The name of the file to write the grids to.
overwrite (bool) – Default False. Whether to overwrite a file (with the out_name name) if one is already in the working directory.
- Returns:
None
>>> from scalecast import GridGenerator
>>> GridGenerator.get_mv_grids() # writes a Grids.py file with models available for multivariate forecasting and some extra args for such models