Comments (1)
Sorry for the delayed response.
In order to train a classification algorithm, one needs several samples. In our case, a sample is a time series. This set of training samples is often called the training set.
The expected format for the training set is similar to the one used in scikit-learn (if you are familiar with it):
X_train
is a 2D-array with shape(n_samples, n_timestamps)
: the first dimension corresponds to the samples (time series), while the second dimension corresponds to the time.y_train
is a 1D-array with shape(n_samples,)
: it contains the label associated with each sample (time series).
The format is identical for the test set.
Let's load a toy dataset to illustrate this:
>>> from pyts.datasets import load_gunpoint
>>> X_train, X_test, y_train, y_test = load_gunpoint(return_X_y=True)
>>> X_train.shape
(50, 150) # there are 50 time series, each with 150 values.
>>> y_train.shape
(50,) # there are 50 labels because there are 50 time series in the training set.
>>> y_train
array([2, 2, 1, 1, 2, ...]) # there are 2 labels (denoted as the integers 1 and 2).
>>> X_test.shape
(150, 150) # there are 150 time series, each with 150 values.
>>> y_test.shape
(150,) # there are 150 labels because there are 150 time series in the test set.
Now, one can perform classification using BOSSVS on this dataset:
>>> from pyts.classification import BOSSVS
>>> clf = BOSSVS()
>>> clf.fit(X_train, y_train)
BOSSVS()
>>> clf.score(X_test, y_test)
0.82 # accuracy score of 0.82 on the test set
Back to your example, I don't understand your data. It seems that you have 300 time series, but each time series has a single value. You cannot use BOSSVS with such data. You cannot do any time series analysis if the time series have a single value. It probably does not make sense to consider this kind of data as time series.
Hope this helps you a bit and I would be happy to give you more info if needed, but I'm not sure to understand your data.
from pyts.
Related Issues (20)
- Singular Spectrum Analysis decomposition method HOT 7
- Question about the 'strategy' parameter in SymbolicAggregateApproximation() HOT 4
- question about the diagonal line of RP plots HOT 2
- How do I import a local dataset that is neither UCR nor UEA HOT 2
- How can we reverse image to time-series HOT 1
- Error with Sklearn hyper parameter search with Multivariateclassifier HOT 1
- JointRecurrencePlot return zero HOT 1
- Shapelet Transform HOT 18
- Some datasets from the UEA & UCR Time Series Classification Archive do not contain arff files. HOT 2
- Question on the Interpretability of TSBF HOT 1
- Add license to readme HOT 1
- Difference between SAX and KBinsDiscretizer HOT 4
- Question about the input to compute SymbolicAggregateApproximation HOT 2
- what is about multivariate time series
- Request for Code or Guidance on Reversing Gramian Angular Fields Transformation HOT 3
- Porting WEASEL 2.0 to pyts HOT 3
- Learning Shapelets HOT 1
- [BUG] `ShapeletTransform` sporadically returns nested `numpy` arrays as `shapelets_` fitted parameter HOT 3
- [ENH] making `pyts` searchable via `sktime`, interfaces & collaboration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyts.