Skip to content

Python library for time series feature selection

License

Notifications You must be signed in to change notification settings

lprtk/pySelection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pySelection for time series feature selection

GitHub issues GitHub forks Github Stars GitHub license Code style: black

Table of contents

Overview

This is a small Python library for time series feature selection. The objective is to focus on building a "good" model. To define a "good" model, we rely on Theil's metrics (UM, US, UC, U1 or U) which allow us to conclude on the goodness of fit of the predictions made by a model. This library allows you to find the best model you need according to the criteria you want.

Content

For the moment, two class are available:

  • The Metrics class implements all the Theil metrics as they are coded in the SAS software;

  • The FeatureSelection class is the heart of the library. The fit function will allow you to estimate several combinations of sub-models and to calculate the scores (MAE, MSE, RMSE and Theil’s metrics). Then the other functions allow you to obtain the best model and its scores, all the models estimated during the iterations or to have a plot of the estimates in and out-of-sample.

Requirements

  • Python version 3.9.7
  • Install requirements.txt
$ pip install -r requirements.txt 
  • Librairies used
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from random import choice, randint
from sklearn.linear_model import LinearRegression 
from sklearn.utils.validation import check_is_fitted 

File details

  • requirements
  • This folder contains a .txt file with all the packages and versions needed to run the project.
  • pySelection
  • This folder contains a .py file with all class, functions and methods.
  • example
  • This folder contains an example notebook to better understand how to use the different class and functions, and their outputs.

Here is the project pattern:

- project 
    > pySelection
        > requirements 
            - requirements.txt
        > codefile 
            - pySelection.py
        > example 
            - pySelection.ipynb 

Features

My profilMy GitHub

Releases

No releases published

Packages

No packages published