Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
37c88a9
actually change python version
MatthewMiddlehurst Mar 2, 2023
7c971df
dummy classifiers and sklearn lower bound change
MatthewMiddlehurst Mar 5, 2023
1afddd4
test fix
MatthewMiddlehurst Mar 5, 2023
45b3d7e
test fix
MatthewMiddlehurst Mar 5, 2023
bc2d064
dev
MatthewMiddlehurst Mar 12, 2023
c34b327
early sklearn version fixes
MatthewMiddlehurst Mar 27, 2023
b81496b
Merge branch 'main' of https://github.com/time-series-machine-learnin…
MatthewMiddlehurst Mar 27, 2023
e7133b3
all interval classifiers
MatthewMiddlehurst Apr 6, 2023
c7e0629
Merge branch 'main' of https://github.com/time-series-machine-learnin…
MatthewMiddlehurst Apr 6, 2023
0dabaad
dummy and conversion bugfix
MatthewMiddlehurst Apr 17, 2023
0d8ad9e
Merge branch 'main' of https://github.com/time-series-machine-learnin…
MatthewMiddlehurst Apr 17, 2023
d0c9207
version
MatthewMiddlehurst Apr 17, 2023
f4267d6
test
MatthewMiddlehurst Apr 17, 2023
b8926ac
testing update
MatthewMiddlehurst Apr 20, 2023
c13dac5
Merge branch 'main' of https://github.com/time-series-machine-learnin…
MatthewMiddlehurst Apr 20, 2023
e5bd06a
version
MatthewMiddlehurst Apr 20, 2023
c067e28
pandas
MatthewMiddlehurst Apr 20, 2023
aee072f
stop all workflows failing
MatthewMiddlehurst Apr 20, 2023
c5190b7
copy check
MatthewMiddlehurst Apr 20, 2023
aa90d8d
new estimators and data loading fix
MatthewMiddlehurst May 1, 2023
6ce278e
new ver
MatthewMiddlehurst May 1, 2023
daa0d5a
new ver
MatthewMiddlehurst May 1, 2023
8ac79b1
ci
MatthewMiddlehurst May 1, 2023
dd6474e
gcc
MatthewMiddlehurst May 1, 2023
5bdd78b
only macos
MatthewMiddlehurst May 1, 2023
8f40da6
codecov check
MatthewMiddlehurst May 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ jobs:

- if: matrix.os == 'windows-latest'
name: Windows install
run: python -m pip install "${env:WHEELNAME}[extras,dev]"
run: python -m pip install "${env:WHEELNAME}[dev,extras,unstable_extras]"
- if: matrix.os != 'windows-latest'
name: Unix install
run: python -m pip install "${{ env.WHEELNAME }}[extras,dev]"
run: python -m pip install "${{ env.WHEELNAME }}[dev,extras,unstable_extras]"

- name: Tests
run: python -m pytest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install
run: python -m pip install .[dev,extras]
run: python -m pip install .[dev,extras,unstable_extras]

- name: Tests
run: python -m pytest
Expand All @@ -63,7 +63,7 @@ jobs:
run: echo "NUMBA_DISABLE_JIT=1" >> $GITHUB_ENV

- name: Install
run: python -m pip install .[dev,extras]
run: python -m pip install .[dev,extras,unstable_extras]

- name: Tests
run: python -m pytest --cov=tsml --cov-report=xml
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "tsml"
version = "0.0.7"
version = "0.1.0"
description = "A toolkit for time series machine learning algorithms."
authors = [
{name = "Matthew Middlehurst", email = "m.middlehurst@uea.ac.uk"},
Expand Down Expand Up @@ -43,9 +43,13 @@ dependencies = [

[project.optional-dependencies]
extras = [
"pycatch22>=0.4.2",
"pyfftw>=0.12.0",
"statsmodels>=0.12.1",
"wildboar>=1.1.0",
]
unstable_extras = [
"mrsqm>=0.0.1 ; platform_system == 'Darwin'", # requires gcc and fftw to be installed for Windows and some other OS (see http://www.fftw.org/index.html)
"pycatch22>=0.4.2", # Known to fail installation on some setups
]
dev = [
"pre-commit",
Expand Down
2 changes: 1 addition & 1 deletion tsml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
"""tsml."""

__version__ = "0.0.7"
__version__ = "0.1.0"
28 changes: 16 additions & 12 deletions tsml/datasets/_data_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def load_from_ts_file(
data is unequal length, a list of 2D numpy arrays will be returned. If labels are
present, they will be returned as well as the data.

The only mandatory tags in the loaded file are @equallength and one of
@targetlabels or @classlabels. Other details can be inferred, though some error
checking will be done if they are present.
The only mandatory tags in the loaded file are one of @targetlabels or @classlabels.
Other details can be inferred, though some error checking will be done if they are
present.

Parameters
----------
Expand Down Expand Up @@ -304,11 +304,9 @@ def load_from_ts_file(
"required."
)

# Equal length tag is required.
# Assume equal length if no tag.
if not equallength_tag:
raise IOError(
"Unable to read .ts file. The @equallength tag is required."
)
equallength = True

n_instances = len(lines) - data_start_line
data_dims = len(first_line) - 1 if has_labels else len(first_line)
Expand Down Expand Up @@ -384,13 +382,19 @@ def load_from_ts_file(
)

dimensions = line[:data_dims]
if not equallength:
data_length = len(dimensions[0].strip().split(","))
split = dimensions[0].strip().split(",")
length = len(split)
if equallength and length != data_length:
raise IOError(
"Unable to read .ts file. Inconsistent number of channels."
f"Expected {data_dims} but read {read_dims} on line {data_idx}."
)

# Process the data for each channel
series = np.zeros((data_dims, data_length), dtype=X_dtype)
for i in range(data_dims):
series[i, :] = dimensions[i].strip().split(",")
series = np.zeros((data_dims, length), dtype=X_dtype)
series[0, :] = split
for n in range(1, data_dims):
series[n, :] = dimensions[n].strip().split(",")

X[data_idx] = series

Expand Down
2 changes: 2 additions & 0 deletions tsml/datasets/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
"""Testing for data loaders."""
Loading