Skip to content

Commit

Permalink
fix deps in Project.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Paulito Palmes, PhD <ppalmes@gmail.com>
  • Loading branch information
ppalmes committed Apr 7, 2023
2 parents 8229595 + fe0206a commit 26d5cd1
Show file tree
Hide file tree
Showing 12 changed files with 589 additions and 590 deletions.
6 changes: 3 additions & 3 deletions Project.toml
@@ -1,20 +1,21 @@
name = "TSML"
uuid = "198dc43e-9e51-5cd7-9d40-d9794d335912"
authors = ["Paulito Palmes <ppalmes@gmail.com>"]
version = "2.7.4"
version = "2.7.5"

[deps]
AMLPipelineBase = "e3c3008a-8869-4d53-9f34-c96f99c8a2b6"
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
Impute = "f7bf1975-0170-51b9-8c5f-a992d46b9575"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MLDataUtils = "cc2ba9b6-d476-5e6d-8eaf-a92d5412d41d"
MultivariateStats = "6f286f6a-111f-5878-ab1e-185364afe411"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Expand All @@ -29,7 +30,6 @@ Impute = "0.5, 0.6"
MLDataUtils = "0.2, 0.3, 0.4, 0.5"
MultivariateStats = "0.5, 0.6, 0.7, 0.8, 0.9, 0.10"
Plots = "1.38"
RecipesBase = "1.1"
StatsBase = "0.29, 0.30, 0.31, 0.32, 0.33"
julia = "1"

Expand Down
25 changes: 16 additions & 9 deletions README.md
@@ -1,15 +1,22 @@
<div align="center"> <img
src="https://ibm.github.io/TSML.jl/tsmllogo/tsmllogo13.png"
alt="TSML Logo" width="250"></img> </div>
<div align="center">

![Overall Stats](https://github-readme-stats.vercel.app/api?username=ppalmes&count_private=true&show_icons=true&hide=contribs)
![Visitor](https://visitor-badge.laobi.icu/badge?page_id=ppalmes.TSML.jl)

<img
src="https://ibm.github.io/TSML.jl/tsmllogo/tsmllogo13.png"
alt="TSML Logo" width="250">
</img>

[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7094/badge)](https://bestpractices.coreinfrastructure.org/projects/7094)

![Overall Stats](https://github-readme-stats.vercel.app/api?username=ppalmes&count_private=true&show_icons=true&hide=contribs)

| **Documentation** | **Build Status** | **Help** |
|:---:|:---:|:---:|
| [![][docs-dev-img]][docs-dev-url] [![][docs-stable-img]][docs-stable-url] | [![][travis-img]][travis-url] | [![][slack-img]][slack-url] [![][gitter-img]][gitter-url] |

</div>

#### Stargazers over time
[![Stargazers over time](https://starchart.cc/IBM/TSML.jl.svg)](https://starchart.cc/IBM/TSML.jl)

Expand Down Expand Up @@ -141,7 +148,7 @@ chkoutlier = Outliernicer(Dict(:dateinterval => Dates.Hour(1))) # normalize ou

- ##### Pipeline to load csv data
```julia
pipexpr = @pipeline csvread
pipexpr = csvread
data = fit_transform!(pipexpr)
first(data,5)

Expand All @@ -158,7 +165,7 @@ first(data,5)

- ##### Pipeline to aggregate and check statistics
```julia
pipexpr = @pipeline csvread |> aggregate |> chkstats
pipexpr = csvread |> aggregate |> chkstats
stats = fit_transform!(pipexpr)

1×26 DataFrame. Omitted printing of 19 columns
Expand All @@ -171,7 +178,7 @@ Note: `fit_transform!` is equivalent to calling in sequence `fit!` and `transfor

- ##### Pipeline to aggregate, impute, and check stats
```julia
pipexpr = @pipeline csvread |> aggregate |> impute |> chkstats
pipexpr = csvread |> aggregate |> impute |> chkstats
stats2 = fit_transform!(pipexpr)

1×26 DataFrame. Omitted printing of 19 columns
Expand All @@ -183,7 +190,7 @@ stats2 = fit_transform!(pipexpr)

- ##### Pipeline to aggregate, impute, and normalize monotonic data
```julia
pipexpr = @pipeline csvread |> aggregate |> impute |> normtonic
pipexpr = csvread |> aggregate |> impute |> normtonic
fit_transform!(pipexpr)

8761×2 DataFrame
Expand Down Expand Up @@ -224,7 +231,7 @@ ts = DataFrame(Date=datets,Value=valuets)
args = Dict(:ahead => 24,:size => 24,:stride => 5)
datemtr = Dateifier(args)
valuemtr = Matrifier(args)
ppl = @pipeline datemtr + valuemtr
ppl = datemtr + valuemtr
dateval = fit_transform!(ppl,ts)
first(dateval,5)

Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/JuliaCon2019.jl.ipynb
Expand Up @@ -304,7 +304,7 @@
}
],
"source": [
"pltr=Plotter(Dict(:interactive => true))\n",
"pltr=Plotter(Dict(:pdfoutput => true))\n",
"\n",
"mypipeline = pltr\n",
"\n",
Expand Down
964 changes: 464 additions & 500 deletions docs/notebooks/StaticPlotting.jl.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/src/man/dateproc.md
Expand Up @@ -79,7 +79,7 @@ Another way is to use the symbolic pipeline to
describe the transformation and concatenation in
just one line of expression.
```@example dateifier
ppl = @pipeline dtr + mtr
ppl = dtr + mtr
features = fit_transform!(ppl,X)
nothing #hide
```
Expand Down
54 changes: 32 additions & 22 deletions docs/src/tutorial/monotonic_plotting.md
Expand Up @@ -17,11 +17,12 @@ We can use the `Plotter` filter to visualize the generated data.
using TSML
Random.seed!(123)
pltr = Plotter(Dict(:interactive => false,:pdfoutput => false))
pltr = Plotter(Dict(:pdfoutput => false))
mdates = DateTime(2017,12,1,1):Dates.Hour(1):DateTime(2017,12,31,10) |> collect
mvals = rand(length(mdates)) |> cumsum
df = DataFrame(Date=mdates ,Value = mvals)
fit_transform!(pltr,df)
fit_transform!(pltr,df);
nothing #hide
```

Now that we have a monotonic data, let's use the `Monotonicer` to normalize and plot the result:
Expand All @@ -31,9 +32,10 @@ using TSML
mono = Monotonicer(Dict())
pipeline = @pipeline mono |> pltr
pipeline = mono |> pltr
res=fit_transform!(pipeline,df)
res=fit_transform!(pipeline,df);
nothing #hide
```

## Real Data Example
Expand Down Expand Up @@ -61,10 +63,10 @@ monofilecsv = CSVDateValReader(Dict(:filename=>monofile,:dateformat=>"dd/mm/yyyy
dailymonofilecsv = CSVDateValReader(Dict(:filename=>dailymonofile,:dateformat=>"dd/mm/yyyy HH:MM"))
valgator = DateValgator(Dict(:dateinterval=>Dates.Hour(1)))
valnner = DateValNNer(Dict(:dateinterval=>Dates.Hour(1)))
valnner = DateValLinearImputer(Dict(:dateinterval=>Dates.Hour(1)))
stfier = Statifier(Dict(:processmissing=>true))
mono = Monotonicer(Dict())
pltr = Plotter(Dict(:interactive => false))
pltr = Plotter(Dict(:pdfoutput => false))
nothing #hide
```

Expand All @@ -75,16 +77,18 @@ Let's test by feeding the regular time series type to the pipeline. We expect th

- Pipeline with `Monotonicer`: regular time series
```@example mono
pipeline = @pipeline regularfilecsv |> valgator |> valnner |> mono |> pltr
pipeline = regularfilecsv |> valgator |> valnner |> mono |> pltr
fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

- Pipeline without `Monotonicer`: regular time series
```@example mono
pipeline = @pipeline regularfilecsv |> valgator |> valnner |> pltr
pipeline = regularfilecsv |> valgator |> valnner |> pltr
fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

Notice that the plots are the same with or without the `Monotonicer` instance.
Expand All @@ -94,16 +98,18 @@ Let's now feed the same pipeline with a monotonic csv data.

- Pipeline without `Monotonicer`: monotonic time series
```@example mono
pipeline = @pipeline monofilecsv |> valgator |> valnner |> pltr
pipeline = monofilecsv |> valgator |> valnner |> pltr
fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

- Pipeline with `Monotonicer`: monotonic time series
```@example mono
pipeline = @pipeline monofilecsv |> valgator |> valnner |> mono |> pltr
pipeline = monofilecsv |> valgator |> valnner |> mono |> pltr
fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

Notice that without the `Monotonicer` instance, the data is monotonic. Applying
Expand All @@ -118,17 +124,19 @@ We can use the `Outliernicer` filter to remove outliers. Let's apply this filter
using TSML: Outliernicer
outliernicer = Outliernicer(Dict(:dateinterval=>Dates.Hour(1)));
pipeline = @pipeline monofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline)
pipeline = monofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline);
nothing #hide
```

## Daily Monotonic TS Processing
Lastly, let's feed the daily monotonic data using similar pipeline and examine its plot.

- Pipeline without `Monotonicer`: daily monotonic time series
```@example mono
pipeline = @pipeline dailymonofilecsv |> valgator |> valnner |> pltr
fit_transform!(pipeline)
pipeline = dailymonofilecsv |> valgator |> valnner |> pltr
fit_transform!(pipeline);
nothing #hide
```

This plot is characterized by monotonically increasing trend but resets to certain baseline value
Expand All @@ -138,8 +146,9 @@ the correct normalization.

- Pipeline with `Monotonicer`: daily monotonic time series
```@example mono
pipeline = @pipeline dailymonofilecsv |> valgator |> valnner |> mono |> pltr
fit_transform!(pipeline)
pipeline = dailymonofilecsv |> valgator |> valnner |> mono |> pltr
fit_transform!(pipeline);
nothing #hide
```

While the `Monotonicer` filter is able to transform the data into a regular time series,
Expand All @@ -149,8 +158,9 @@ Let's remove the outliers by applying the `Outliernicer` filter and examine the

- Pipeline with `Monotonicer` and `Outliernicer`: daily monotonic time series
```@example mono
pipeline = @pipeline dailymonofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline)
pipeline = dailymonofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline);
nothing #hide
```

The `Outliernicer` filter effectively removed the outliers as shown in the plot.
Expand Up @@ -17,11 +17,12 @@ We can use the `Plotter` filter to visualize the generated data.
using TSML

Random.seed!(123)
pltr = Plotter(Dict(:interactive => false,:pdfoutput => true))
pltr = Plotter(Dict(:pdfoutput => true))
mdates = DateTime(2017,12,1,1):Dates.Hour(1):DateTime(2017,12,31,10) |> collect
mvals = rand(length(mdates)) |> cumsum
df = DataFrame(Date=mdates ,Value = mvals)
fit_transform!(pltr,df)
fit_transform!(pltr,df);
nothing #hide
```

Now that we have a monotonic data, let's use the `Monotonicer` to normalize and plot the result:
Expand All @@ -31,9 +32,10 @@ using TSML

mono = Monotonicer(Dict())

pipeline = @pipeline mono |> pltr
pipeline = mono |> pltr

res=fit_transform!(pipeline,df)
nothing #hide
```

## Real Data Example
Expand Down Expand Up @@ -61,10 +63,10 @@ monofilecsv = CSVDateValReader(Dict(:filename=>monofile,:dateformat=>"dd/mm/yyyy
dailymonofilecsv = CSVDateValReader(Dict(:filename=>dailymonofile,:dateformat=>"dd/mm/yyyy HH:MM"))

valgator = DateValgator(Dict(:dateinterval=>Dates.Hour(1)))
valnner = DateValNNer(Dict(:dateinterval=>Dates.Hour(1)))
valnner = DateValLinearImputer(Dict(:dateinterval=>Dates.Hour(1)))
stfier = Statifier(Dict(:processmissing=>true))
mono = Monotonicer(Dict())
pltr = Plotter(Dict(:interactive => false))
pltr = Plotter(Dict(:pdfoutput => true))
nothing #hide
```

Expand All @@ -75,16 +77,18 @@ Let's test by feeding the regular time series type to the pipeline. We expect th

- Pipeline with `Monotonicer`: regular time series
```@example mono
pipeline = @pipeline regularfilecsv |> valgator |> valnner |> mono |> pltr
pipeline = regularfilecsv |> valgator |> valnner |> mono |> pltr

fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

- Pipeline without `Monotonicer`: regular time series
```@example mono
pipeline = @pipeline regularfilecsv |> valgator |> valnner |> pltr
pipeline = regularfilecsv |> valgator |> valnner |> pltr

fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

Notice that the plots are the same with or without the `Monotonicer` instance.
Expand All @@ -94,16 +98,18 @@ Let's now feed the same pipeline with a monotonic csv data.

- Pipeline without `Monotonicer`: monotonic time series
```@example mono
pipeline = @pipeline monofilecsv |> valgator |> valnner |> pltr
pipeline = monofilecsv |> valgator |> valnner |> pltr

fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

- Pipeline with `Monotonicer`: monotonic time series
```@example mono
pipeline = @pipeline monofilecsv |> valgator |> valnner |> mono |> pltr
pipeline = monofilecsv |> valgator |> valnner |> mono |> pltr

fit_transform!(pipeline)
fit_transform!(pipeline);
nothing #hide
```

Notice that without the `Monotonicer` instance, the data is monotonic. Applying
Expand All @@ -118,17 +124,19 @@ We can use the `Outliernicer` filter to remove outliers. Let's apply this filter
using TSML: Outliernicer
outliernicer = Outliernicer(Dict(:dateinterval=>Dates.Hour(1)));

pipeline = @pipeline monofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline)
pipeline = monofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline);
nothing #hide
```

## Daily Monotonic TS Processing
Lastly, let's feed the daily monotonic data using similar pipeline and examine its plot.

- Pipeline without `Monotonicer`: daily monotonic time series
```@example mono
pipeline = @pipeline dailymonofilecsv |> valgator |> valnner |> pltr
fit_transform!(pipeline)
pipeline = dailymonofilecsv |> valgator |> valnner |> pltr
fit_transform!(pipeline);
nothing #hide
```

This plot is characterized by monotonically increasing trend but resets to certain baseline value
Expand All @@ -138,8 +146,9 @@ the correct normalization.

- Pipeline with `Monotonicer`: daily monotonic time series
```@example mono
pipeline = @pipeline dailymonofilecsv |> valgator |> valnner |> mono |> pltr
fit_transform!(pipeline)
pipeline = dailymonofilecsv |> valgator |> valnner |> mono |> pltr
fit_transform!(pipeline);
nothing #hide
```

While the `Monotonicer` filter is able to transform the data into a regular time series,
Expand All @@ -149,8 +158,9 @@ Let's remove the outliers by applying the `Outliernicer` filter and examine the

- Pipeline with `Monotonicer` and `Outliernicer`: daily monotonic time series
```@example mono
pipeline = @pipeline dailymonofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline)
pipeline = dailymonofilecsv |> valgator |> valnner |> mono |> outliernicer |> pltr
fit_transform!(pipeline);
nothing #hide
```

The `Outliernicer` filter effectively removed the outliers as shown in the plot.

2 comments on commit 26d5cd1

@ppalmes
Copy link
Collaborator Author

@ppalmes ppalmes commented on 26d5cd1 Apr 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/81209

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.7.5 -m "<description of version>" 26d5cd1b049ed47157ffe30ebbd77d2ddbc57357
git push origin v2.7.5

Please sign in to comment.