Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add Hidalgo annotation #3158

Merged
merged 51 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6fde5d2
initial
KatieBuc Aug 1, 2022
a825c95
initial
KatieBuc Aug 1, 2022
997d84e
rename
KatieBuc Aug 2, 2022
e699bc1
unit tests found in discovery
KatieBuc Aug 2, 2022
6c78fbf
unit test for _fit and some refactoring
KatieBuc Aug 3, 2022
49b057e
wip:refactor into sample functions
KatieBuc Aug 3, 2022
063dfe3
wip:refactoring
KatieBuc Aug 3, 2022
98aea5a
refactored gibbs into functions
KatieBuc Aug 3, 2022
82dd5e5
works for deterministic, infinite loop for random?
KatieBuc Aug 3, 2022
9d36142
seed was zero, caused weirdness
KatieBuc Aug 3, 2022
47dd2ef
_get_neighbourhood_params writes to self
KatieBuc Aug 4, 2022
bcdf1ff
notebook
KatieBuc Aug 4, 2022
d17e6cb
wip
KatieBuc Aug 4, 2022
1334126
local param initialisation
KatieBuc Aug 5, 2022
0a5c17f
no for loops yay
KatieBuc Aug 5, 2022
ff1ed1f
docstrings and get_fitted_params
KatieBuc Aug 9, 2022
0636873
De-coupled unit tests from csv/c++ implementation
KatieBuc Aug 9, 2022
046294a
example in docstring, tidy notebook
KatieBuc Aug 9, 2022
115a5a1
BaseSeriesAnnotator inheritance
KatieBuc Aug 9, 2022
b2c9fd0
delete csv
KatieBuc Aug 9, 2022
055cef5
typo
KatieBuc Aug 9, 2022
4722dbd
docstring fix
KatieBuc Aug 9, 2022
b4b8152
deleting legacy code, pointing to deterministic random number file
KatieBuc Aug 9, 2022
88866fd
AttributeError: 'Hidalgo' object has no attribute 'labels'
KatieBuc Aug 9, 2022
5e3c3c0
TypeError: _fit() got an unexpected keyword argument 'Y'
KatieBuc Aug 10, 2022
fc9b34d
Update sktime/annotation/hidalgo.py
KatieBuc Aug 11, 2022
ff74070
Update sktime/annotation/hidalgo.py
KatieBuc Aug 11, 2022
a90aff8
comments from review
KatieBuc Aug 11, 2022
ce94a75
comments from review
KatieBuc Aug 11, 2022
1bd7cae
code review comments
KatieBuc Aug 11, 2022
a00cc3c
notebook example
KatieBuc Aug 11, 2022
c14c1bd
workaround
KatieBuc Aug 11, 2022
aa91f70
Hidalgo as transformer
KatieBuc Aug 16, 2022
225d0d5
notebook too
KatieBuc Aug 16, 2022
a2cb934
notebook too
KatieBuc Aug 16, 2022
99c440f
empty fit, tags
KatieBuc Aug 17, 2022
87923a0
incorrect length of f
KatieBuc Aug 17, 2022
89be68a
appropriate arguments
KatieBuc Aug 17, 2022
d417c1d
Update sktime/transformations/series/hidalgo.py
KatieBuc Aug 18, 2022
ee8bda1
Update sktime/transformations/series/hidalgo.py
KatieBuc Aug 18, 2022
c1f2359
docstrings
KatieBuc Aug 18, 2022
9f754cc
test fixes
KatieBuc Aug 23, 2022
dca8026
no _fit, fix notebook
KatieBuc Aug 23, 2022
4a9409f
classmethod decorator
KatieBuc Aug 23, 2022
4cbfda2
no predict in unit tests
KatieBuc Aug 23, 2022
d828b21
no write to self in predict
KatieBuc Aug 23, 2022
a6f101d
not writing to self in predict
KatieBuc Aug 23, 2022
5a73a13
fixing docstrings, and docstring example
KatieBuc Aug 23, 2022
da690de
all in fit
KatieBuc Aug 25, 2022
d5db489
review comments
KatieBuc Aug 25, 2022
a994fc8
docstring example
KatieBuc Aug 25, 2022
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
66 changes: 66 additions & 0 deletions examples/hidalgo_segmentation.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
" 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
" 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=int64)"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import numpy as np\n",
"\n",
"from sktime.transformations.series.hidalgo import Hidalgo\n",
"\n",
"np.random.seed(123)\n",
"X = np.random.rand(100, 3)\n",
"X[:60, 1:] += 10\n",
"X[60:, 1:] = 0\n",
"model = Hidalgo(K=2, burn_in=0.8, n_iter=1000, seed=10)\n",
"fitted_model = model.fit(X)\n",
"Z = fitted_model.transform(X)\n",
"Z"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.13 ('sktime-dev')",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "3672c9971f48dc8b5371767a83a5c009b8758f695819d57d51811323dc5c559e"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading