Deep Learning Analysis Toolkits
Project description
DL Toolkits
Whenever I analyzed the results of the DL experiment, I had to re-implement the analysis function every time. So, I implement frequently used functions in this repository. New features continue to be implemented, and simple examples of function usages can be found in the examples
directory.
Installation
You can install the package with pip
command. Python>=3 are supported.
pip install dl-toolkits
You can check the version of the package using the following commands.
import toolkits
print(toolkits.__version__)
Modules
Visualization
viz.tsne
: t-SNE plot
Clustering quality
cluster.sse
: Sum of squared error(SSE) [^1]cluster.batch_sse
: Sum of squared error(SSE) for batch inputcluster.nsse
: SSE normalized by the squared distance to the nearest interfering centroid(nSSE) [^1]cluster.batch_nsse
: SSE normalized by the squared distance to the nearest interfering centroid(nSSE) for batch inputcluster.nearc
: Top N nearest interfering centroidcluster.rfc
: Feature space clustering quality(R_fc) [^2]
Linear algebra
linalg.get_singular_values
: Get singular values per classlinalg.get_sum_of_singular_values
: Get sum of singular values per classlinalg.get_average_sum_of_singular_values
: Get average of sum of singular values per class [^3]
Pretty print
pprint.pred_summary
: Simple print for predictions and true labels
Log parser
parse.between_lines
: Extract the log between the two input sentencesparse.between_lines_on_file
: Extract the log between the two input sentences on the target fileparse.between_lines_on_dir
: Extract the log between the two input sentences on the target directory
PyTorch helper function
torch_helper.freeze_selected_param
: Freeze the weights with the selected nametorch_helper.get_important_param_idx
: Get important parameters indices[^4]
References
[^1]: Yoon, Sung Whan, et al. "Xtarnet: Learning to extract task-adaptive representation for incremental few-shot learning." International Conference on Machine Learning. PMLR, 2020. [^2]: Goldblum, Micah, et al. "Unraveling meta-learning: Understanding feature representations for few-shot tasks." International Conference on Machine Learning. PMLR, 2020. [^3]: Verma, Vikas, et al. "Manifold mixup: Better representations by interpolating hidden states." International Conference on Machine Learning. PMLR, 2019. [^4]: Mazumder, Pratik, Pravendra Singh, and Piyush Rai. "Few-Shot Lifelong Learning." Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 35. No. 3. 2021.
Pedregosa, Fabian, et al. "Scikit-learn: Machine learning in Python." the Journal of machine Learning research 12 (2011): 2825-2830.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file dl_toolkits-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: dl_toolkits-1.1.3-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35de28f881c900577adf12f2cb48cafa33c1d6e725065bdca1d38d2345f19635 |
|
MD5 | ec0dabf8d711f544afcdb764d12793bf |
|
BLAKE2b-256 | 7b238fa8047f7b0e6cb57d3f042fe60a0939cc4533ba6baef8be9576bced1709 |