Package: sktime
Welcome to sktimeA unified interface for machine learning with time series:rocket:Version 0.27.0 out now!Check out the release notes here.sktime is a library for time series analysis in Python. It provides a unified interface for multiple time series learning tasks. Currently, this includes time series classification, regression, clustering, annotation, and forecasting. It comes withtime series algorithmsandscikit-learncompatible tools to build, tune and validate time series models.OverviewOpen SourceTutorialsCommunityCI/CDCodeDownloadsCitation:books: DocumentationDocumentation:star:TutorialsNew to sktime? Here's everything you need to know!:clipboard:Binder NotebooksExample notebooks to play with in your browser.:woman_technologist:User GuidesHow to use sktime and its features.:scissors:Extension TemplatesHow to build your own estimator using sktime's API.:control_knobs:API ReferenceThe detailed reference for sktime's API.:tv:Video TutorialOur video tutorial from 2021 PyData Global.:hammer_and_wrench:ChangelogChanges and version history.:deciduous_tree:Roadmapsktime's software and community development plan.:pencil:Related SoftwareA list of related software.:speech_balloon: Where to ask questionsQuestions and feedback are extremely welcome! We strongly believe in the value of sharing help publicly, as it allows a wider audience to benefit from it.TypePlatforms:bug:Bug ReportsGitHub Issue Tracker:sparkles:Feature Requests & IdeasGitHub Issue Tracker:woman_technologist:Usage QuestionsGitHub Discussions·Stack Overflow:speech_balloon:General DiscussionGitHub Discussions:factory:Contribution & Developmentdev-chatchannel ·Discord:globe_with_meridians:Community collaboration sessionDiscord- Fridays 3 pm UTC, dev/meet-ups channel:dizzy: FeaturesOur objective is to enhance the interoperability and usability of the time series analysis ecosystem in its entirety. sktime provides aunified interface for distinct but related time series learning tasks. It featuresdedicated time series algorithmsandtools for composite model buildingsuch as pipelining, ensembling, tuning, and reduction, empowering users to apply an algorithm designed for one task to another.sktime also providesinterfaces to related libraries, for examplescikit-learn,statsmodels,tsfresh,PyOD, andfbprophet, among others.ModuleStatusLinksForecastingstableTutorial·API Reference·Extension TemplateTime Series ClassificationstableTutorial·API Reference·Extension TemplateTime Series RegressionstableAPI ReferenceTransformationsstableTutorial·API Reference·Extension TemplateParameter fittingmaturingAPI Reference·Extension TemplateTime Series ClusteringmaturingAPI Reference·Extension TemplateTime Series Distances/KernelsmaturingTutorial·API Reference·Extension TemplateTime Series AlignmentexperimentalAPI Reference·Extension TemplateAnnotationexperimentalExtension TemplateTime Series SplittersmaturingExtension TemplateDistributions and simulationexperimental:hourglass_flowing_sand: Install sktimeFor troubleshooting and detailed installation instructions, see thedocumentation.Operating system: macOS X · Linux · Windows 8.1 or higherPython version: Python 3.8, 3.9, 3.10, 3.11, and 3.12 (only 64-bit)Package managers:pip·conda(viaconda-forge)pipUsing pip, sktime releases are available as source packages and binary wheels.
Available wheels are listedhere.pipinstallsktimeor, with maximum dependencies,pipinstallsktime[all_extras]For curated sets of soft dependencies for specific learning tasks:pipinstallsktime[forecasting]# for selected forecasting dependenciespipinstallsktime[forecasting,transformations]# forecasters and transformersor similar. Valid sets are:forecastingtransformationsclassificationregressionclusteringparam_estnetworksannotationalignmentCave: in general, not all soft dependencies for a learning task are installed,
only a curated selection.condaYou can also install sktime fromcondavia theconda-forgechannel.
The feedstock including the build recipe and configuration is maintained
inthis conda-forge repository.condainstall-cconda-forgesktimeor, with maximum dependencies,condainstall-cconda-forgesktime-all-extras(ascondadoes not support dependency sets,
flexible choice of soft dependencies is unavailable viaconda):zap: QuickstartForecastingfromsktime.datasetsimportload_airlinefromsktime.forecasting.baseimportForecastingHorizonfromsktime.forecasting.thetaimportThetaForecasterfromsktime.splitimporttemporal_train_test_splitfromsktime.performance_metrics.forecastingimportmean_absolute_percentage_errory=load_airline()y_train,y_test=temporal_train_test_split(y)fh=ForecastingHorizon(y_test.index,is_relative=False)forecaster=ThetaForecaster(sp=12)# monthly seasonal periodicityforecaster.fit(y_train)y_pred=forecaster.predict(fh)mean_absolute_percentage_error(y_test,y_pred)>>>0.08661467738190656Time Series Classificationfromsktime.classification.interval_basedimportTimeSeriesForestClassifierfromsktime.datasetsimportload_arrow_headfromsklearn.model_selectionimporttrain_test_splitfromsklearn.metricsimportaccuracy_scoreX,y=load_arrow_head()X_train,X_test,y_train,y_test=train_test_split(X,y)classifier=TimeSeriesForestClassifier()classifier.fit(X_train,y_train)y_pred=classifier.predict(X_test)accuracy_score(y_test,y_pred)>>>0.8679245283018868:wave: How to get involvedThere are many ways to join the sktime community. We follow theall-contributorsspecification: all kinds of contributions are welcome - not just code.Documentation:gift_heart:ContributeHow to contribute to sktime.:school_satchel:MentoringNew to open source? Apply to our mentoring program!:date:MeetingsJoin our discussions, tutorials, workshops, and sprints!:woman_mechanic:Developer GuidesHow to further develop sktime's code base.:construction:Enhancement ProposalsDesign a new feature for sktime.:medal_sports:ContributorsA list of all contributors.:raising_hand:RolesAn overview of our core community roles.:money_with_wings:DonateFund sktime maintenance and development.:classical_building:GovernanceHow and by whom decisions are made in sktime's community.:bulb: Project visionBy the community, for the community-- developed by a friendly and collaborative community.Theright tool for the right task-- helping users to diagnose their learning problem and suitable scientific model types.Embedded in state-of-art ecosystemsandprovider of interoperable interfaces-- interoperable withscikit-learn,statsmodels,tsfresh, and other community favorites.Rich model composition and reduction functionality-- build tuning and feature extraction pipelines, solve forecasting tasks withscikit-learnregressors.Clean, descriptive specification syntax-- based on modern object-oriented design principles for data science.Fair model assessment and benchmarking-- build your models, inspect your models, check your models, and avoid pitfalls.Easily extensible-- easy extension templates to add your own algorithms compatible with sktime's API.