Skip to content

Commit c155853

Browse files
committed
ProductModel application is now specialized whenever possible
1 parent f131f6a commit c155853

File tree

17 files changed

+752
-568
lines changed

17 files changed

+752
-568
lines changed

docs/Manifest.toml

Lines changed: 375 additions & 267 deletions
Large diffs are not rendered by default.

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[deps]
22
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
3+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
34
Compose = "a81c6b42-2e10-5240-aca2-a61377ecd94b"
45
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
56
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"

docs/make.jl

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,36 @@ makedocs(
2323
modules = [Mill],
2424
pages = [
2525
"Home" => "index.md",
26-
"Motivation" => "motivation.md",
27-
"Manual" => [
28-
"Nodes" => "manual/nodes.md",
29-
"More on nodes" => "manual/more_on_nodes.md",
30-
"Model reflection" => "manual/reflectin.md",
31-
"Bag aggregation" => "manual/aggregation.md",
32-
"Data in leaves" => "manual/leaf_data.md",
33-
"Missing data" => "manual/missing.md",
34-
"Custom nodes" => "manual/custom.md"
35-
],
36-
"Examples" => [
37-
"Musk" => "examples/musk/musk.md",
38-
"GNNs in 16 lines" => "examples/graphs.md",
39-
"DAGs" => "examples/dag.md",
40-
"Processing JSONs" => "examples/jsons.md"
41-
],
42-
"External tools" => [
43-
"HierarchicalUtils.jl" => "tools/hierarchical.md"
44-
],
45-
"Public API" => [
46-
"Aggregation" => "api/aggregation.md",
47-
"Bags" => "api/bags.md",
48-
"Data nodes" => "api/data_nodes.md",
49-
"Model nodes" => "api/model_nodes.md",
50-
"Special Arrays" => "api/special_arrays.md",
51-
"Switches" => "api/switches.md",
52-
"Utilities" => "api/utilities.md"
53-
],
54-
"References" => "references.md",
55-
"Citation" => "citation.md"
26+
# "Motivation" => "motivation.md",
27+
# "Manual" => [
28+
# "Nodes" => "manual/nodes.md",
29+
# "More on nodes" => "manual/more_on_nodes.md",
30+
# "Model reflection" => "manual/reflectin.md",
31+
# "Bag aggregation" => "manual/aggregation.md",
32+
# "Data in leaves" => "manual/leaf_data.md",
33+
# "Missing data" => "manual/missing.md",
34+
# "Custom nodes" => "manual/custom.md"
35+
# ],
36+
# "Examples" => [
37+
# "Musk" => "examples/musk/musk.md",
38+
# "GNNs in 16 lines" => "examples/graphs.md",
39+
# "DAGs" => "examples/dag.md",
40+
# "Processing JSONs" => "examples/jsons.md"
41+
# ],
42+
# "External tools" => [
43+
# "HierarchicalUtils.jl" => "tools/hierarchical.md"
44+
# ],
45+
# "Public API" => [
46+
# "Aggregation" => "api/aggregation.md",
47+
# "Bags" => "api/bags.md",
48+
# "Data nodes" => "api/data_nodes.md",
49+
# "Model nodes" => "api/model_nodes.md",
50+
# "Special Arrays" => "api/special_arrays.md",
51+
# "Switches" => "api/switches.md",
52+
# "Utilities" => "api/utilities.md"
53+
# ],
54+
# "References" => "references.md",
55+
# "Citation" => "citation.md"
5656
],
5757

5858
)

docs/references.bib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ @article{Zaheer2018
8787
bibsource = {dblp computer science bibliography, https://dblp.org}
8888
}
8989

90-
@masterthesis{Mandlik2020,
90+
@mastersthesis{Mandlik2020,
9191
author = {Šimon Mandlík and Tomáš Pevný},
9292
school = "Czech Technical University",
9393
title = "Mapping the Internet: Modelling Entity Interactions in Complex Heterogeneous Networks",

docs/src/api/aggregation.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,17 @@ Pages = ["aggregation.md"]
77

88
## API
99
```@docs
10-
AggregationOperator
11-
Aggregation
10+
AbstractAggregation
11+
AggregationStack
1212
1313
SegmentedSum
1414
SegmentedMax
1515
SegmentedMean
1616
SegmentedPNorm
1717
SegmentedLSE
1818
19-
sum_aggregation
20-
max_aggregation
21-
mean_aggregation
22-
pnorm_aggregation
23-
lse_aggregation
19+
SegmentedMeanMax
20+
SegmentedPNormLSE
2421
25-
meanmax_aggregation
26-
pnormlse_aggregation
22+
BagCount
2723
```

docs/src/api/model_nodes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ identity_model
1414
IdentityModel
1515
1616
BagModel
17-
BagModel(::AbstractMillModel, ::Aggregation, ::ArrayModel)
17+
BagModel(::AbstractMillModel, ::Union{AbstractAggregation, BagCount}, ::ArrayModel)
1818
1919
ProductModel
2020
ProductModel(::Tuple{AbstractMillModel}, ::ArrayModel)

docs/src/api/special_arrays.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ MaybeHotVector
1111
maybehot
1212
MaybeHotMatrix
1313
maybehotbatch
14+
maybecold
1415
1516
NGramIterator
1617
NGramIterator(::AbstractString, ::Any, ::Any, ::Any)

docs/src/api/switches.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ Pages = ["general.md"]
1010
Mill.emptyismissing
1111
Mill.emptyismissing!
1212
13-
Mill.bagcount
14-
Mill.bagcount!
15-
1613
Mill.string_start_code
1714
Mill.string_start_code!
1815

docs/src/examples/graphs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Y = mp(BagNode(U, b))
5858
and it is differentiable, which can be verified by executing:
5959

6060
```@repl gnn
61-
gradient(() -> sum(sin.(mp(BagNode(U, b)) |> Mill.data)), params(mp))
61+
gradient(() -> sum(sin.(mp(BagNode(U, b)) |> Mill.data)), Flux.params(mp))
6262
```
6363

6464
If we put everything together, the GNN implementation is implemented in the following 16 lines:
@@ -101,7 +101,7 @@ nothing # hide
101101

102102
```@repl gnn
103103
gnn(g, X, 5)
104-
gradient(() -> gnn(g, X, 5) |> sum, params(gnn))
104+
gradient(() -> gnn(g, X, 5) |> sum, Flux.params(gnn))
105105
```
106106

107107
The above implementation is surprisingly general, as it supports an arbitrarily rich description of vertices. For simplicity, we used only vectors in `X`, however, any [`Mill.jl`](https://github.com/CTUAvastLab/Mill.jl) hierarchy is applicable.

0 commit comments

Comments
 (0)