-
Notifications
You must be signed in to change notification settings - Fork 47
/
mix.exs
165 lines (156 loc) · 5.55 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
defmodule Scholar.MixProject do
use Mix.Project
@source_url "https://github.com/elixir-nx/scholar"
@version "0.3.1"
def project do
[
app: :scholar,
name: "Scholar",
version: @version,
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
docs: &docs/0,
package: package()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:ex_doc, "~> 0.34", only: :docs},
{:nx, "~> 0.7"},
{:nimble_options, "~> 0.5.2 or ~> 1.0"},
{:exla, ">= 0.0.0", only: :test},
{:polaris, "~> 0.1"},
{:benchee, "~> 1.0", only: :dev},
{:scidata, "~> 0.1.11", only: :test}
]
end
defp package do
[
maintainers: ["Mateusz Słuszniak", "Krsto Proroković"],
description: "Traditional machine learning on top of Nx",
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
defp docs do
[
main: "readme",
source_url: @source_url,
assets: %{"notebooks/files" => "files"},
logo: "images/scholar_simplified.png",
extra_section: "Guides",
extras: [
"README.md",
"notebooks/cv_gradient_boosting_tree.livemd",
# "notebooks/hierarchical_clustering.livemd",
"notebooks/k_means.livemd",
"notebooks/k_nearest_neighbors.livemd",
"notebooks/linear_regression.livemd",
"notebooks/manifold_learning.livemd",
"notebooks/mds.livemd",
"notebooks/nearest_neighbors.livemd"
],
groups_for_modules: [
Models: [
Scholar.Cluster.AffinityPropagation,
Scholar.Cluster.DBSCAN,
Scholar.Cluster.GaussianMixture,
Scholar.Cluster.Hierarchical,
Scholar.Cluster.KMeans,
Scholar.Decomposition.PCA,
Scholar.Integrate,
Scholar.Interpolation.BezierSpline,
Scholar.Interpolation.CubicSpline,
Scholar.Interpolation.Linear,
Scholar.Linear.BayesianRidgeRegression,
Scholar.Linear.IsotonicRegression,
Scholar.Linear.LinearRegression,
Scholar.Linear.LogisticRegression,
Scholar.Linear.PolynomialRegression,
Scholar.Linear.RidgeRegression,
Scholar.Linear.SVM,
Scholar.Manifold.MDS,
Scholar.Manifold.Trimap,
Scholar.Manifold.TSNE,
Scholar.NaiveBayes.Complement,
Scholar.NaiveBayes.Gaussian,
Scholar.NaiveBayes.Multinomial,
Scholar.Neighbors.BruteKNN,
Scholar.Neighbors.KDTree,
Scholar.Neighbors.KNNClassifier,
Scholar.Neighbors.KNNRegressor,
Scholar.Neighbors.LargeVis,
Scholar.Neighbors.NNDescent,
Scholar.Neighbors.RadiusNNClassifier,
Scholar.Neighbors.RadiusNNRegressor,
Scholar.Neighbors.RandomProjectionForest
],
Utilities: [
Scholar.Impute.SimpleImputer,
Scholar.Metrics.Classification,
Scholar.Metrics.Clustering,
Scholar.Metrics.Distance,
Scholar.Metrics.Neighbors,
Scholar.Metrics.Ranking,
Scholar.Metrics.Regression,
Scholar.Metrics.Similarity,
Scholar.ModelSelection,
Scholar.Preprocessing,
Scholar.Preprocessing.MaxAbsScaler,
Scholar.Preprocessing.MinMaxScaler,
Scholar.Preprocessing.Normalizer,
Scholar.Preprocessing.OneHotEncoder,
Scholar.Preprocessing.OrdinalEncoder,
Scholar.Preprocessing.StandardScaler,
Scholar.Stats
]
],
before_closing_body_tag: &before_closing_body_tag/1
]
end
defp before_closing_body_tag(:html) do
"""
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-t5CR+zwDAROtph0PXGte6ia8heboACF9R5l/DiY+WZ3P2lxNgvJkQk5n7GPvLMYw" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-FaFLTlohFghEIZkw6VGwmf9ISTubWAVYW8tG8+w2LAIftJEULZABrF9PPFv+tVkH" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-bHBqxz8fokvgoJ/sc17HODNxa42TlaEhB+w8ZJXTc2nZf1VgEaFZeZvT4Mznfz0v" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{ left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false },
]
});
});
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
for (const codeEl of document.querySelectorAll("pre code.vega-lite")) {
try {
const preEl = codeEl.parentElement;
const spec = JSON.parse(codeEl.textContent);
const plotEl = document.createElement("div");
preEl.insertAdjacentElement("afterend", plotEl);
vegaEmbed(plotEl, spec);
preEl.remove();
} catch (error) {
console.log("Failed to render Vega-Lite plot: " + error)
}
}
});
</script>
"""
end
defp before_closing_body_tag(_), do: ""
end