Skip to content

Commit b27b19d

Browse files
committed
update
1 parent 84a7df6 commit b27b19d

File tree

7 files changed

+18
-28
lines changed

7 files changed

+18
-28
lines changed

docs/examples/plot_dataset_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
###############################################################################
6363
# In this case, if you want to use a deep learning model,
6464
# use ``load_datasets`` from ``libmultilabel.nn.data_utils`` and change the data to the dataframes we created.
65-
# Here is the modification of our `Bert model quickstart <https://www.csie.ntu.edu.tw/~cjlin/libmultilabel/auto_examples/plot_BERT_quickstart.html>`_.
65+
# Here is the modification of our `Bert model quickstart <../auto_examples/plot_bert_quickstart.html>`_.
6666

6767
from libmultilabel.nn.data_utils import load_datasets
6868

docs/examples/plot_linear_gridsearch_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# As for the estimator ``MultiLabelEstimator``, argument ``options`` is a LIBLINEAR option
3535
# (see *train Usage* in `liblinear <https://github.com/cjlin1/liblinear>`__ README), and
3636
# ``linear_technique`` is one of the linear techniques, including ``1vsrest``, ``thresholding``, ``cost_sensitive``,
37-
# ``cost_sensitive_micro``, and ``binary_and_mulitclass``.
37+
# ``cost_sensitive_micro``, and ``binary_and_multiclass``.
3838
#
3939
# We can specify the aliases of the components used by the pipeline.
4040
# For example, ``tfidf`` is the alias of ``TfidfVectorizer`` and ``clf`` is the alias of the estimator.

docs/examples/plot_linear_tree_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Handling Data with Many Labels using Linear Methods.
2+
Handling Data with Many Labels Using Linear Methods
33
====================================================
44
55
For the case that the amount of labels is very large,

docs/examples/plot_multi_label.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@
6969
# - Training time (sec)
7070
#
7171
# * - Linear method (one-vs-rest)
72-
# - 0.5171960144875225
73-
# - 4.327306747436523
72+
# - 0.52
73+
# - 4.33
7474
#
7575
# * - Deep learning method (BERT)
76-
# - 0.564618763137536
77-
# - 5412.955321788788
76+
# - 0.56
77+
# - 5412.96
7878
#
7979
# Step 2. Training:
8080
# -----------------
@@ -120,13 +120,13 @@
120120
# - Macro-F1
121121
#
122122
# * - One-vs-rest
123-
# - 0.5171960144875225
123+
# - 0.52
124124
#
125125
# * - Thresholding
126-
# - 0.5643407144065415
126+
# - 0.56
127127
#
128128
# * - Cost-sensitive
129-
# - 0.5704056980791481
129+
# - 0.57
130130
#
131131
# From the comparison, one can see that these techniques improves the naive method.
132132
#
@@ -139,7 +139,7 @@
139139
# Training models directly in this case may result in high runtime and space consumption.
140140
# A solution to reduce these costs is to utilize tree-based models.
141141
# Here we provide an example comparing a linear one-vs-rest model and a tree model on the EUR-Lex-57k dataset, which has a larger label space.
142-
# We start by training a tree model following another detailed `tutorial <../auto_examples/plot_linear_tree_tutorial.html>`__.
142+
# We start by training a tree model following the `linear tree tutorial <../auto_examples/plot_linear_tree_tutorial.html>`__.
143143

144144
datasets_eurlex = linear.load_dataset("txt", "data/eurlex57k/train.txt", "data/eurlex57k/test.txt")
145145
preprocessor_eurlex = linear.Preprocessor()
@@ -168,7 +168,7 @@
168168
#
169169
# It is clear that the tree model significantly improves efficiency.
170170
# As for deep learning, a similar improvement in efficiency can be observed.
171-
# Details for the tree-based deep learning model can be found in this `tutorial <../tutorials/AttentionXML.html>`__.
171+
# Details for the tree-based deep learning model can be found in the `deep learning tree tutorial <../tutorials/AttentionXML.html>`__.
172172
#
173173
# Step 3. Evaluation: Pick Suitable Metrics
174174
# -----------------------------------------
@@ -203,8 +203,7 @@
203203
# -----------------------------
204204
# Models with suboptimal hyperparameters may lead to poor performance :cite:p:`JJL21a`.
205205
# Users can incorporate hyperparameter tuning into the training process.
206-
# Because this functionality is more complex and cannot be adequately demonstrated within a code snippet, please refer to these two tutorials for more details about hyperparameter tuning (`linear <../auto_examples/plot_gridsearch_tutorial.html>`_
207-
# and `deep learning <../tutorials/Parameter_Selection_for_Neural_Networks.html>`_).
206+
# Because this functionality is more complex and cannot be adequately demonstrated within a code snippet, please refer to these two tutorials for more details about hyperparameter tuning (`linear <../auto_examples/plot_linear_gridsearch_tutorial.html>`_ and `deep learning <../tutorials/Parameter_Selection_for_Neural_Networks.html>`_).
208207
# Another thing to consider is that hyperparameter search can be time-consuming, especially in the case of deep learning.
209208
# Users need to conduct this step with consideration of the available resources and time.
210209
#
@@ -214,7 +213,7 @@
214213
# To use as much information as possible, for linear methods, after determining the best hyperparameters, all available data are generally trained under these optimal hyperparameters to obtain the final model.
215214
# We refer to this as the "retrain" strategy.
216215
#
217-
# For linear methods, the `tutorial <../auto_examples/plot_gridsearch_tutorial.html>`__ for hyperparameter search already handles retraining by default.
216+
# For linear methods, the `tutorial <../auto_examples/plot_linear_gridsearch_tutorial.html>`_ for hyperparameter search already handles retraining by default.
218217
# As for deep learning, since this additional step is not common in practice, we include it in the last section of this `tutorial <../tutorials/Parameter_Selection_for_Neural_Networks.html>`__.
219218
#
220219
# Step 6. Prediction

docs/neural_networks.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Tutorials
22
=========
33

44
.. toctree::
5-
:maxdepth: 2
5+
:maxdepth: 1
66
:titlesonly:
77

88
../auto_examples/plot_multi_label

docs/tutorials/AttentionXML.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Handling Data with Many Labels with AttentionXML
2-
================================================
1+
Handling Data with Many Labels Using Neural Networks
2+
====================================================
33
As time and space complexities grow linearly as the label size increases, it is inefficient to train models in its
44
original label space. We consider adopting AttentionXML :cite:p:`RY19a` to address the issue by training
55
models with a reduced space of labels.
@@ -38,7 +38,7 @@ There are 2 extra hyperparameters for AttentionXML that users need to know:
3838

3939
Performance
4040
-----------
41-
We compared the performance between BiLSTM and AttentionXML as they have similar architectures. The datasest,
41+
We compared the performance between BiLSTM and AttentionXML as they have similar architectures. The dataset,
4242
Wiki10-31K, has 30,938 classes, which makes it hard for models to train in a one-vs-all manner.
4343

4444
Both models were trained on an A100 Nvidia GPU. Their test results are shown below. Notice the difference

0 commit comments

Comments
 (0)