Package: fasttsfeatures
FastTSFeaturesTime-series feature extraction as a service. FastTSFeatures is an SDK to compute static, temporal and calendar variables as a service.The package serves as a wrapper fortsfresh,tsfeaturesandholidays. Since we take care of the whole infrastructure, feature extraction becomes as easy as running a line in your python nootebooks or calling an API.Why?We build FastTSFeatures because we wanted an easy and fast way to extract Time Series Features without having to think about infrastructure and deployment. Now we want to see if other Data Scientists find it useful too.Table of contentsFastTSFeaturesInstallHow to useData Format1. Request free trial2. Runfasttsfeatureson a private S3 Bucket2.1 Upload to S3 from python2.2 Run the features extraction process2.3 Download your results from s3Available Features (More than 600)40+ Features:https://github.com/Nixtla/tsfeatures600+ Temporal Features:https://github.com/blue-yonder/tsfresh/10 Temporal Features (lags, mean lags, std_lags) [Currently just supported for daily data]
Calendar Features (distance in minutes to holidays)Calendar features for 83 Countrieshttps://github.com/dr-prodigy/python-holidaysInstallpip install fasttsfeaturesHow to useYou can use FastTSFeatures by either using a completely public S3 bucket or by uploading a file to your own S3 bucket provided by us.Data FormatCurrently we only support.csvfiles. These files must include at least 3 columns, with a unique_id (identifier of each time-series) a date stamp and a value.1. Request free trialRequest a free trial sending an email to:fede.garza.ramirez@gmail.comand get yourBUCKET_NAME,API_IDandAPI_KEY,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY.2. Runfasttsfeatureson a private S3 BucketIf you don´t want other people to potentially have access to your data you can runfasttsfeatureson a private S3 Bucket. For that you have to upload your data to a private S3 Bucket that we will provide for you; you can do this inside of python.2.1 Upload to S3 from pythonYou will need theAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYthat we provided.Import and InstantiateTSFeaturesintroducing yourBUCKET_NAME,API_IDandAPI_KEY,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY.fromfasttsfeatures.coreimportTSFeaturestsfeatures=TSFeatures(bucket_name='<BUCKET_NAME>',api_id='<API_ID>',api_key='<API_KEY>',aws_access_key_id='<AWS_ACCESS_KEY_ID>',aws_secret_access_key='<AWS_SECRET_ACCESS_KEY>')Upload your local file introducing its name.s3_uri=tsfeatures.upload_to_s3(file='<YOUR FILE NAME>')Run the features extraction processYou can run temporal, static or calendar features on the data you uploaded.
To run the process specify:s3_uri: S3 uri provided after callingtsfeatures.upload_to_s3().freq: Integer where{'Hourly':24, 'Daily': 7, 'Monthly': 12, 'Quarterly': 4, 'Weekly':52, 'Yearly': 1}.-ds_column: Name of the unique id column.y_column: Name of the target column.In the case of calendar variable you have to specify the country using theISOcode.#Run Temporal Featuresresponse_tmp_ft=tsfeatures.calculate_temporal_features_from_s3_uri(s3_uri="<PRIVATE S3 URI HERE>",freq=7,# For the moment only works for Daily data.unique_id_column="<NAME OF ID COLUMN>",ds_column="<NAME OF DATESTAMP COLUMN>",y_column="<NAME OF TARGET COLUMN>")#Run Static Featuresresponse_static_ft=tsfeatures.calculate_static_features_from_s3_uri(s3_uri=s3_uri,freq=7,unique_id_column="<NAME OF ID COLUMN>",ds_column="<NAME OF DATESTAMP COLUMN>",y_column="<NAME OF TARGET COLUMN>")#Run Calendar Featuresresponse_cal_ft=tsfeatures.calculate_calendar_features_from_s3_uri(s3_uri=s3_uri,country="<ISO>",unique_id_column="<NAME OF ID COLUMN>",ds_column="<NAME OF DATESTAMP COLUMN>",y_column="<NAME OF TARGET COLUMN>")response_tmp_ftstatusbodyid_jobmessage0200"s3://nixtla-user-test/features/features.csv"f7bdb6dc-dcdb-4d87-87e8-b5428e4c98dbCheck job status at GET /tsfeatures/jobs/{job_id}Monitor the process with the following code. Once it's done, access to your bucket to download the generated features.job_id=response_tmp_ft['id_job'].item()tsfeatures.get_status(job_id)statusprocessing_time_seconds0InProgress32.2 Download your results from s3Once the process is done you can download the results from s3.s3_uri_results=response_tmp_ft['dest_url'].item()tsfeatures.download_from_s3(s3_url=s3_uri_results)ToDosOptimizing writing and reading speed with Parquet filesMaking temporal features available for different granularitiesFill zeros (For Data where 0 values are not reported, e.g. Retail Data)Empirical benchmarking of model improvementNan HandlingCheck data integrity before UploadInformative error messagesInformative StatusOptional parameter y in calendar