{ "cells": [ { "cell_type": "markdown", "source": [ "# Hidalgo segmentation" ], "metadata": { "collapsed": false } }, { "cell_type": "code", "execution_count": 1, "outputs": [ { "data": { "text/plain": "array([ 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1,\n 1, -1, -1, 1, 1, 1, 1, 1, 1, 0, 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,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n dtype=int64)" }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import numpy as np\n", "\n", "from aeon.segmentation import HidalgoSegmenter\n", "\n", "X = np.random.rand(100, 3)\n", "X[:60, 1:] += 10\n", "X[60:, 1:] = 0\n", "hidalgo = HidalgoSegmenter(K=2, burn_in=0.8, n_iter=1000, seed=10)\n", "\n", "hidalgo.fit_predict(X, axis=0)" ], "metadata": { "collapsed": false } } ], "metadata": { "kernelspec": { "display_name": "Python 3.9.13 ('aeon-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 }