awacke1 commited on
Commit
aaf590b
·
verified ·
1 Parent(s): 4fefc43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -409
app.py CHANGED
@@ -15,438 +15,58 @@ st.write('''
15
  Dictionary learning aims to find a sparse representation of the data in the form of a dictionary and a sparse matrix.
16
  ''')
17
 
18
- # Text input
19
- text_input = st.text_area("Enter the text to analyze:", value='''
20
- # 🩺🔍 Search Results
21
- ### 11 Jul 2023 | [FairLay-ML: Intuitive Remedies for Unfairness in Data-Driven Social-Critical Algorithms](https://arxiv.org/abs/2307.05029) | [⬇️](https://arxiv.org/pdf/2307.05029)
22
- *Normen Yu, Gang Tan, Saeid Tizpaz-Niari*
23
-
24
- This thesis explores open-sourced machine learning (ML) model explanation
25
- tools to understand whether these tools can allow a layman to visualize,
26
- understand, and suggest intuitive remedies to unfairness in ML-based
27
- decision-support systems. Machine learning models trained on datasets biased
28
- against minority groups are increasingly used to guide life-altering social
29
- decisions, prompting the urgent need to study their logic for unfairness. Due
30
- to this problem's impact on vast populations of the general public, it is
31
- critical for the layperson -- not just subject matter experts in social justice
32
- or machine learning experts -- to understand the nature of unfairness within
33
- these algorithms and the potential trade-offs. Existing research on fairness in
34
- machine learning focuses mostly on the mathematical definitions and tools to
35
- understand and remedy unfair models, with some directly citing user-interactive
36
- tools as necessary for future work. This thesis presents FairLay-ML, a
37
- proof-of-concept GUI integrating some of the most promising tools to provide
38
- intuitive explanations for unfair logic in ML models by integrating existing
39
- research tools (e.g. Local Interpretable Model-Agnostic Explanations) with
40
- existing ML-focused GUI (e.g. Python Streamlit). We test FairLay-ML using
41
- models of various accuracy and fairness generated by an unfairness detector
42
- tool, Parfait-ML, and validate our results using Themis. Our study finds that
43
- the technology stack used for FairLay-ML makes it easy to install and provides
44
- real-time black-box explanations of pre-trained models to users. Furthermore,
45
- the explanations provided translate to actionable remedies.
46
-
47
- ---------------
48
-
49
- ### 29 Jan 2020 | [stream-learn -- open-source Python library for difficult data stream batch analysis](https://arxiv.org/abs/2001.11077) | [⬇️](https://arxiv.org/pdf/2001.11077)
50
- *Pawe{\l} Ksieniewicz, Pawe{\l} Zyblewski*
51
-
52
- stream-learn is a Python package compatible with scikit-learn and developed
53
- for the drifting and imbalanced data stream analysis. Its main component is a
54
- stream generator, which allows to produce a synthetic data stream that may
55
- incorporate each of the three main concept drift types (i.e. sudden, gradual
56
- and incremental drift) in their recurring or non-recurring versions. The
57
- package allows conducting experiments following established evaluation
58
- methodologies (i.e. Test-Then-Train and Prequential). In addition, estimators
59
- adapted for data stream classification have been implemented, including both
60
- simple classifiers and state-of-art chunk-based and online classifier
61
- ensembles. To improve computational efficiency, package utilises its own
62
- implementations of prediction metrics for imbalanced binary classification
63
- tasks.
64
-
65
- ---------------
66
-
67
- ### 16 Oct 2022 | [POTATO: exPlainable infOrmation exTrAcTion framewOrk](https://arxiv.org/abs/2201.13230) | [⬇️](https://arxiv.org/pdf/2201.13230)
68
- *\'Ad\'am Kov\'acs, Kinga G\'emes, Eszter Ikl\'odi, G\'abor Recski*
69
-
70
- We present POTATO, a task- and languageindependent framework for
71
- human-in-the-loop (HITL) learning of rule-based text classifiers using
72
- graph-based features. POTATO handles any type of directed graph and supports
73
- parsing text into Abstract Meaning Representations (AMR), Universal
74
- Dependencies (UD), and 4lang semantic graphs. A streamlit-based user interface
75
- allows users to build rule systems from graph patterns, provides real-time
76
- evaluation based on ground truth data, and suggests rules by ranking graph
77
- features using interpretable machine learning models. Users can also provide
78
- patterns over graphs using regular expressions, and POTATO can recommend
79
- refinements of such rules. POTATO is applied in projects across domains and
80
- languages, including classification tasks on German legal text and English
81
- social media data. All components of our system are written in Python, can be
82
- installed via pip, and are released under an MIT License on GitHub.
83
-
84
- ---------------
85
-
86
- ### 01 Aug 2019 | [ProSper -- A Python Library for Probabilistic Sparse Coding with Non-Standard Priors and Superpositions](https://arxiv.org/abs/1908.06843) | [⬇️](https://arxiv.org/pdf/1908.06843)
87
- *Georgios Exarchakis, J\"org Bornschein, Abdul-Saboor Sheikh, Zhenwen Dai, Marc Henniges, Jakob Drefs, J\"org L\"ucke*
88
-
89
- ProSper is a python library containing probabilistic algorithms to learn
90
- dictionaries. Given a set of data points, the implemented algorithms seek to
91
- learn the elementary components that have generated the data. The library
92
- widens the scope of dictionary learning approaches beyond implementations of
93
- standard approaches such as ICA, NMF or standard L1 sparse coding. The
94
- implemented algorithms are especially well-suited in cases when data consist of
95
- components that combine non-linearly and/or for data requiring flexible prior
96
- distributions. Furthermore, the implemented algorithms go beyond standard
97
- approaches by inferring prior and noise parameters of the data, and they
98
- provide rich a-posteriori approximations for inference. The library is designed
99
- to be extendable and it currently includes: Binary Sparse Coding (BSC), Ternary
100
- Sparse Coding (TSC), Discrete Sparse Coding (DSC), Maximal Causes Analysis
101
- (MCA), Maximum Magnitude Causes Analysis (MMCA), and Gaussian Sparse Coding
102
- (GSC, a recent spike-and-slab sparse coding approach). The algorithms are
103
- scalable due to a combination of variational approximations and
104
- parallelization. Implementations of all algorithms allow for parallel execution
105
- on multiple CPUs and multiple machines for medium to large-scale applications.
106
- Typical large-scale runs of the algorithms can use hundreds of CPUs to learn
107
- hundreds of dictionary elements from data with tens of millions of
108
- floating-point numbers such that models with several hundred thousand
109
- parameters can be optimized. The library is designed to have minimal
110
- dependencies and to be easy to use. It targets users of dictionary learning
111
- algorithms and Machine Learning researchers.
112
-
113
- ---------------
114
-
115
- ### 27 Jul 2020 | [metric-learn: Metric Learning Algorithms in Python](https://arxiv.org/abs/1908.04710) | [⬇️](https://arxiv.org/pdf/1908.04710)
116
- *William de Vazelhes and CJ Carey and Yuan Tang and Nathalie Vauquier and Aur\'elien Bellet*
117
-
118
- metric-learn is an open source Python package implementing supervised and
119
- weakly-supervised distance metric learning algorithms. As part of
120
- scikit-learn-contrib, it provides a unified interface compatible with
121
- scikit-learn which allows to easily perform cross-validation, model selection,
122
- and pipelining with other machine learning estimators. metric-learn is
123
- thoroughly tested and available on PyPi under the MIT licence.
124
-
125
- ---------------
126
-
127
- ### 10 Nov 2023 | [Deep Fast Vision: A Python Library for Accelerated Deep Transfer Learning Vision Prototyping](https://arxiv.org/abs/2311.06169) | [⬇️](https://arxiv.org/pdf/2311.06169)
128
- *Fabi Prezja*
129
-
130
- Deep learning-based vision is characterized by intricate frameworks that
131
- often necessitate a profound understanding, presenting a barrier to newcomers
132
- and limiting broad adoption. With many researchers grappling with the
133
- constraints of smaller datasets, there's a pronounced reliance on pre-trained
134
- neural networks, especially for tasks such as image classification. This
135
- reliance is further intensified in niche imaging areas where obtaining vast
136
- datasets is challenging. Despite the widespread use of transfer learning as a
137
- remedy to the small dataset dilemma, a conspicuous absence of tailored auto-ML
138
- solutions persists. Addressing these challenges is "Deep Fast Vision", a python
139
- library that streamlines the deep learning process. This tool offers a
140
- user-friendly experience, enabling results through a simple nested dictionary
141
- definition, helping to democratize deep learning for non-experts. Designed for
142
- simplicity and scalability, Deep Fast Vision appears as a bridge, connecting
143
- the complexities of existing deep learning frameworks with the needs of a
144
- diverse user base.
145
-
146
- ---------------
147
-
148
- ### 12 Jul 2021 | [Online Graph Dictionary Learning](https://arxiv.org/abs/2102.06555) | [⬇️](https://arxiv.org/pdf/2102.06555)
149
- *C\'edric Vincent-Cuaz, Titouan Vayer, R\'emi Flamary, Marco Corneli, Nicolas Courty*
150
-
151
- Dictionary learning is a key tool for representation learning, that explains
152
- the data as linear combination of few basic elements. Yet, this analysis is not
153
- amenable in the context of graph learning, as graphs usually belong to
154
- different metric spaces. We fill this gap by proposing a new online Graph
155
- Dictionary Learning approach, which uses the Gromov Wasserstein divergence for
156
- the data fitting term. In our work, graphs are encoded through their nodes'
157
- pairwise relations and modeled as convex combination of graph atoms, i.e.
158
- dictionary elements, estimated thanks to an online stochastic algorithm, which
159
- operates on a dataset of unregistered graphs with potentially different number
160
- of nodes. Our approach naturally extends to labeled graphs, and is completed by
161
- a novel upper bound that can be used as a fast approximation of Gromov
162
- Wasserstein in the embedding space. We provide numerical evidences showing the
163
- interest of our approach for unsupervised embedding of graph datasets and for
164
- online graph subspace estimation and tracking.
165
-
166
- ---------------
167
-
168
- ### 25 Nov 2021 | [Online Orthogonal Dictionary Learning Based on Frank-Wolfe Method](https://arxiv.org/abs/2103.01484) | [⬇️](https://arxiv.org/pdf/2103.01484)
169
- *Ye Xue and Vincent Lau*
170
-
171
- Dictionary learning is a widely used unsupervised learning method in signal
172
- processing and machine learning. Most existing works of dictionary learning are
173
- in an offline manner. There are mainly two offline ways for dictionary
174
- learning. One is to do an alternative optimization of both the dictionary and
175
- the sparse code; the other way is to optimize the dictionary by restricting it
176
- over the orthogonal group. The latter one is called orthogonal dictionary
177
- learning which has a lower complexity implementation, hence, it is more
178
- favorable for lowcost devices. However, existing schemes on orthogonal
179
- dictionary learning only work with batch data and can not be implemented
180
- online, which is not applicable for real-time applications. This paper proposes
181
- a novel online orthogonal dictionary scheme to dynamically learn the dictionary
182
- from streaming data without storing the historical data. The proposed scheme
183
- includes a novel problem formulation and an efficient online algorithm design
184
- with convergence analysis. In the problem formulation, we relax the orthogonal
185
- constraint to enable an efficient online algorithm. In the algorithm design, we
186
- propose a new Frank-Wolfe-based online algorithm with a convergence rate of
187
- O(ln t/t^(1/4)). The convergence rate in terms of key system parameters is also
188
- derived. Experiments with synthetic data and real-world sensor readings
189
- demonstrate the effectiveness and efficiency of the proposed online orthogonal
190
- dictionary learning scheme.
191
-
192
- ---------------
193
-
194
- ### 14 Jun 2022 | [Supervised Dictionary Learning with Auxiliary Covariates](https://arxiv.org/abs/2206.06774) | [⬇️](https://arxiv.org/pdf/2206.06774)
195
- *Joowon Lee, Hanbaek Lyu, Weixin Yao*
196
-
197
- Supervised dictionary learning (SDL) is a classical machine learning method
198
- that simultaneously seeks feature extraction and classification tasks, which
199
- are not necessarily a priori aligned objectives. The goal of SDL is to learn a
200
- class-discriminative dictionary, which is a set of latent feature vectors that
201
- can well-explain both the features as well as labels of observed data. In this
202
- paper, we provide a systematic study of SDL, including the theory, algorithm,
203
- and applications of SDL. First, we provide a novel framework that `lifts' SDL
204
- as a convex problem in a combined factor space and propose a low-rank projected
205
- gradient descent algorithm that converges exponentially to the global minimizer
206
- of the objective. We also formulate generative models of SDL and provide global
207
- estimation guarantees of the true parameters depending on the hyperparameter
208
- regime. Second, viewed as a nonconvex constrained optimization problem, we
209
- provided an efficient block coordinate descent algorithm for SDL that is
210
- guaranteed to find an $\varepsilon$-stationary point of the objective in
211
- $O(\varepsilon^{-1}(\log \varepsilon^{-1})^{2})$ iterations. For the
212
- corresponding generative model, we establish a novel non-asymptotic local
213
- consistency result for constrained and regularized maximum likelihood
214
- estimation problems, which may be of independent interest. Third, we apply SDL
215
- for imbalanced document classification by supervised topic modeling and also
216
- for pneumonia detection from chest X-ray images. We also provide simulation
217
- studies to demonstrate that SDL becomes more effective when there is a
218
- discrepancy between the best reconstructive and the best discriminative
219
- dictionaries.
220
-
221
- ---------------
222
-
223
- ### 07 Oct 2013 | [Online Unsupervised Feature Learning for Visual Tracking](https://arxiv.org/abs/1310.1690) | [⬇️](https://arxiv.org/pdf/1310.1690)
224
- *Fayao Liu, Chunhua Shen, Ian Reid, Anton van den Hengel*
225
-
226
- Feature encoding with respect to an over-complete dictionary learned by
227
- unsupervised methods, followed by spatial pyramid pooling, and linear
228
- classification, has exhibited powerful strength in various vision applications.
229
- Here we propose to use the feature learning pipeline for visual tracking.
230
- Tracking is implemented using tracking-by-detection and the resulted framework
231
- is very simple yet effective. First, online dictionary learning is used to
232
- build a dictionary, which captures the appearance changes of the tracking
233
- target as well as the background changes. Given a test image window, we extract
234
- local image patches from it and each local patch is encoded with respect to the
235
- dictionary. The encoded features are then pooled over a spatial pyramid to form
236
- an aggregated feature vector. Finally, a simple linear classifier is trained on
237
- these features.
238
- Our experiments show that the proposed powerful---albeit simple---tracker,
239
- outperforms all the state-of-the-art tracking methods that we have tested.
240
- Moreover, we evaluate the performance of different dictionary learning and
241
- feature encoding methods in the proposed tracking framework, and analyse the
242
- impact of each component in the tracking scenario. We also demonstrate the
243
- flexibility of feature learning by plugging it into Hare et al.'s tracking
244
- method. The outcome is, to our knowledge, the best tracker ever reported, which
245
- facilitates the advantages of both feature learning and structured output
246
- prediction.
247
-
248
- ---------------
249
-
250
- ### 04 Mar 2024 | [Automated Generation of Multiple-Choice Cloze Questions for Assessing English Vocabulary Using GPT-turbo 3.5](https://arxiv.org/abs/2403.02078) | [⬇️](https://arxiv.org/pdf/2403.02078)
251
- *Qiao Wang, Ralph Rose, Naho Orita, Ayaka Sugawara*
252
-
253
- A common way of assessing language learners' mastery of vocabulary is via
254
- multiple-choice cloze (i.e., fill-in-the-blank) questions. But the creation of
255
- test items can be laborious for individual teachers or in large-scale language
256
- programs. In this paper, we evaluate a new method for automatically generating
257
- these types of questions using large language models (LLM). The VocaTT
258
- (vocabulary teaching and training) engine is written in Python and comprises
259
- three basic steps: pre-processing target word lists, generating sentences and
260
- candidate word options using GPT, and finally selecting suitable word options.
261
- To test the efficiency of this system, 60 questions were generated targeting
262
- academic words. The generated items were reviewed by expert reviewers who
263
- judged the well-formedness of the sentences and word options, adding comments
264
- to items judged not well-formed. Results showed a 75% rate of well-formedness
265
- for sentences and 66.85% rate for suitableword options. This is a marked
266
- improvement over the generator used earlier in our research which did not take
267
- advantage of GPT's capabilities. Post-hoc qualitative analysis reveals several
268
- points for improvement in future work including cross-referencing
269
- part-of-speech tagging, better sentence validation, and improving GPT prompts.
270
-
271
- 13 Dec 2016 | TF.Learn: TensorFlow's High-level Module for Distributed Machine Learning | ⬇️
272
- Yuan Tang
273
- TF.Learn is a high-level Python module for distributed machine learning
274
- inside TensorFlow. It provides an easy-to-use Scikit-learn style interface to
275
- simplify the process of creating, configuring, training, evaluating, and
276
- experimenting a machine learning model. TF.Learn integrates a wide range of
277
- state-of-art machine learning algorithms built on top of TensorFlow's low level
278
- APIs for small to large-scale supervised and unsupervised problems. This module
279
- focuses on bringing machine learning to non-specialists using a general-purpose
280
- high-level language as well as researchers who want to implement, benchmark,
281
- and compare their new methods in a structured environment. Emphasis is put on
282
- ease of use, performance, documentation, and API consistency.
283
-
284
- 11 Dec 2019 | Majorization Minimization Technique for Optimally Solving Deep Dictionary Learning | ⬇️
285
- Vanika Singhal and Angshul Majumdar
286
- The concept of deep dictionary learning has been recently proposed. Unlike
287
- shallow dictionary learning which learns single level of dictionary to
288
- represent the data, it uses multiple layers of dictionaries. So far, the
289
- problem could only be solved in a greedy fashion; this was achieved by learning
290
- a single layer of dictionary in each stage where the coefficients from the
291
- previous layer acted as inputs to the subsequent layer (only the first layer
292
- used the training samples as inputs). This was not optimal; there was feedback
293
- from shallower to deeper layers but not the other way. This work proposes an
294
- optimal solution to deep dictionary learning whereby all the layers of
295
- dictionaries are solved simultaneously. We employ the Majorization Minimization
296
- approach. Experiments have been carried out on benchmark datasets; it shows
297
- that optimal learning indeed improves over greedy piecemeal learning.
298
- Comparison with other unsupervised deep learning tools (stacked denoising
299
- autoencoder, deep belief network, contractive autoencoder and K-sparse
300
- autoencoder) show that our method supersedes their performance both in accuracy
301
- and speed.
302
-
303
- 17 May 2022 | Applications of Deep Neural Networks with Keras | ⬇️
304
- Jeff Heaton
305
- Deep learning is a group of exciting new technologies for neural networks.
306
- Through a combination of advanced training techniques and neural network
307
- architectural components, it is now possible to create neural networks that can
308
- handle tabular data, images, text, and audio as both input and output. Deep
309
- learning allows a neural network to learn hierarchies of information in a way
310
- that is like the function of the human brain. This course will introduce the
311
- student to classic neural network structures, Convolution Neural Networks
312
- (CNN), Long Short-Term Memory (LSTM), Gated Recurrent Neural Networks (GRU),
313
- General Adversarial Networks (GAN), and reinforcement learning. Application of
314
- these architectures to computer vision, time series, security, natural language
315
- processing (NLP), and data generation will be covered. High-Performance
316
- Computing (HPC) aspects will demonstrate how deep learning can be leveraged
317
- both on graphical processing units (GPUs), as well as grids. Focus is primarily
318
- upon the application of deep learning to problems, with some introduction to
319
- mathematical foundations. Readers will use the Python programming language to
320
- implement deep learning using Google TensorFlow and Keras. It is not necessary
321
- to know Python prior to this book; however, familiarity with at least one
322
- programming language is assumed.
323
-
324
- 26 Feb 2015 | Learning computationally efficient dictionaries and their implementation as fast transforms | ⬇️
325
- Luc Le Magoarou (INRIA - IRISA), R'emi Gribonval (INRIA - IRISA)
326
- Dictionary learning is a branch of signal processing and machine learning
327
- that aims at finding a frame (called dictionary) in which some training data
328
- admits a sparse representation. The sparser the representation, the better the
329
- dictionary. The resulting dictionary is in general a dense matrix, and its
330
- manipulation can be computationally costly both at the learning stage and later
331
- in the usage of this dictionary, for tasks such as sparse coding. Dictionary
332
- learning is thus limited to relatively small-scale problems. In this paper,
333
- inspired by usual fast transforms, we consider a general dictionary structure
334
- that allows cheaper manipulation, and propose an algorithm to learn such
335
- dictionaries --and their fast implementation-- over training data. The approach
336
- is demonstrated experimentally with the factorization of the Hadamard matrix
337
- and with synthetic dictionary learning experiments.
338
-
339
- 03 Dec 2021 | SSDL: Self-Supervised Dictionary Learning | ⬇️
340
- Shuai Shao, Lei Xing, Wei Yu, Rui Xu, Yanjiang Wang, Baodi Liu
341
- The label-embedded dictionary learning (DL) algorithms generate influential
342
- dictionaries by introducing discriminative information. However, there exists a
343
- limitation: All the label-embedded DL methods rely on the labels due that this
344
- way merely achieves ideal performances in supervised learning. While in
345
- semi-supervised and unsupervised learning, it is no longer sufficient to be
346
- effective. Inspired by the concept of self-supervised learning (e.g., setting
347
- the pretext task to generate a universal model for the downstream task), we
348
- propose a Self-Supervised Dictionary Learning (SSDL) framework to address this
349
- challenge. Specifically, we first design a $p$-Laplacian Attention Hypergraph
350
- Learning (pAHL) block as the pretext task to generate pseudo soft labels for
351
- DL. Then, we adopt the pseudo labels to train a dictionary from a primary
352
- label-embedded DL method. We evaluate our SSDL on two human activity
353
- recognition datasets. The comparison results with other state-of-the-art
354
- methods have demonstrated the efficiency of SSDL.
355
-
356
- 05 Jun 2018 | Scikit-learn: Machine Learning in Python | ⬇️
357
- Fabian Pedregosa, Ga"el Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Andreas M"uller, Joel Nothman, Gilles Louppe, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, 'Edouard Duchesnay
358
- Scikit-learn is a Python module integrating a wide range of state-of-the-art
359
- machine learning algorithms for medium-scale supervised and unsupervised
360
- problems. This package focuses on bringing machine learning to non-specialists
361
- using a general-purpose high-level language. Emphasis is put on ease of use,
362
- performance, documentation, and API consistency. It has minimal dependencies
363
- and is distributed under the simplified BSD license, encouraging its use in
364
- both academic and commercial settings. Source code, binaries, and documentation
365
- can be downloaded from http://scikit-learn.org.
366
-
367
- 15 Jul 2020 | Complete Dictionary Learning via $\ell_p$-norm Maximization | ⬇️
368
- Yifei Shen, Ye Xue, Jun Zhang, Khaled B. Letaief, and Vincent Lau
369
- Dictionary learning is a classic representation learning method that has been
370
- widely applied in signal processing and data analytics. In this paper, we
371
- investigate a family of $\ell_p$-norm ($p>2,p \in \mathbb{N}$) maximization
372
- approaches for the complete dictionary learning problem from theoretical and
373
- algorithmic aspects. Specifically, we prove that the global maximizers of these
374
- formulations are very close to the true dictionary with high probability, even
375
- when Gaussian noise is present. Based on the generalized power method (GPM), an
376
- efficient algorithm is then developed for the $\ell_p$-based formulations. We
377
- further show the efficacy of the developed algorithm: for the population GPM
378
- algorithm over the sphere constraint, it first quickly enters the neighborhood
379
- of a global maximizer, and then converges linearly in this region. Extensive
380
- experiments will demonstrate that the $\ell_p$-based approaches enjoy a higher
381
- computational efficiency and better robustness than conventional approaches and
382
- $p=3$ performs the best.
383
-
384
- 27 Nov 2023 | Utilizing Explainability Techniques for Reinforcement Learning Model Assurance | ⬇️
385
- Alexander Tapley and Kyle Gatesman and Luis Robaina and Brett Bissey and Joseph Weissman
386
- Explainable Reinforcement Learning (XRL) can provide transparency into the
387
- decision-making process of a Deep Reinforcement Learning (DRL) model and
388
- increase user trust and adoption in real-world use cases. By utilizing XRL
389
- techniques, researchers can identify potential vulnerabilities within a trained
390
- DRL model prior to deployment, therefore limiting the potential for mission
391
- failure or mistakes by the system. This paper introduces the ARLIN (Assured RL
392
- Model Interrogation) Toolkit, an open-source Python library that identifies
393
- potential vulnerabilities and critical points within trained DRL models through
394
- detailed, human-interpretable explainability outputs. To illustrate ARLIN's
395
- effectiveness, we provide explainability visualizations and vulnerability
396
- analysis for a publicly available DRL model. The open-source code repository is
397
- available for download at https://github.com/mitre/arlin.
398
-
399
- 19 Sep 2019 | InterpretML: A Unified Framework for Machine Learning Interpretability | ⬇️
400
- Harsha Nori and Samuel Jenkins and Paul Koch and Rich Caruana
401
- InterpretML is an open-source Python package which exposes machine learning
402
- interpretability algorithms to practitioners and researchers. InterpretML
403
- exposes two types of interpretability - glassbox models, which are machine
404
- learning models designed for interpretability (ex: linear models, rule lists,
405
- generalized additive models), and blackbox explainability techniques for
406
- explaining existing systems (ex: Partial Dependence, LIME). The package enables
407
- practitioners to easily compare interpretability algorithms by exposing
408
- multiple methods under a unified API, and by having a built-in, extensible
409
- visualization platform. InterpretML also includes the first implementation of
410
- the Explainable Boosting Machine, a powerful, interpretable, glassbox model
411
- that can be as accurate as many blackbox models. The MIT licensed source code
412
- can be downloaded from github.com/microsoft/interpret.
413
-
414
- ''', height=200)
415
 
 
 
416
 
417
- #Get user input for the number of dictionary components
418
  n_components = st.slider('Number of dictionary components', 1, 20, 10)
 
419
  if st.button('Analyze'):
420
  # Perform text preprocessing
421
  vectorizer = CountVectorizer(stop_words='english')
422
  X = vectorizer.fit_transform([text_input])
 
423
  # Convert sparse matrix to dense numpy array
424
  X_dense = X.toarray()
425
-
426
  # Perform dictionary learning
427
  dl = DictionaryLearning(n_components=n_components, transform_algorithm='lasso_lars', random_state=0)
428
  X_transformed = dl.fit_transform(X_dense)
429
  dictionary = dl.components_
430
-
431
  # Get the feature names (terms)
432
  feature_names = vectorizer.get_feature_names_out()
433
-
434
  # Create a DataFrame with dictionary components and their corresponding terms
435
  df_components = pd.DataFrame(dictionary, columns=feature_names)
436
  df_components['Component'] = ['Component ' + str(i+1) for i in range(n_components)]
437
  df_components = df_components.set_index('Component')
438
-
439
  # Display the DataFrame
440
  st.markdown("### Dictionary Components")
441
  st.dataframe(df_components)
442
-
 
 
 
 
 
 
 
 
 
 
443
  # Create a graph of terms and their connections
444
  G = nx.Graph()
445
-
446
  # Add nodes to the graph
447
  for term in feature_names:
448
  G.add_node(term)
449
-
450
  # Add edges to the graph based on co-occurrence in dictionary components
451
  for i in range(n_components):
452
  terms = df_components.columns[df_components.iloc[i] > 0]
@@ -454,7 +74,7 @@ if st.button('Analyze'):
454
  for term2 in terms:
455
  if term1 != term2:
456
  G.add_edge(term1, term2)
457
-
458
  # Plot the graph
459
  fig, ax = plt.subplots(figsize=(8, 8))
460
  pos = nx.spring_layout(G, k=0.3)
@@ -462,6 +82,4 @@ if st.button('Analyze'):
462
  nx.draw_networkx_edges(G, pos, edge_color='gray', alpha=0.5)
463
  nx.draw_networkx_labels(G, pos, font_size=8)
464
  ax.axis('off')
465
- st.pyplot(fig)
466
-
467
-
 
15
  Dictionary learning aims to find a sparse representation of the data in the form of a dictionary and a sparse matrix.
16
  ''')
17
 
18
+ # Load text from file
19
+ with open("text_file.txt", "r", encoding="utf-8") as file:
20
+ text_input = file.read()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
+ # Text input
23
+ st.text_area("Analyzed Text:", value=text_input, height=200)
24
 
25
+ # Get user input for the number of dictionary components
26
  n_components = st.slider('Number of dictionary components', 1, 20, 10)
27
+
28
  if st.button('Analyze'):
29
  # Perform text preprocessing
30
  vectorizer = CountVectorizer(stop_words='english')
31
  X = vectorizer.fit_transform([text_input])
32
+
33
  # Convert sparse matrix to dense numpy array
34
  X_dense = X.toarray()
35
+
36
  # Perform dictionary learning
37
  dl = DictionaryLearning(n_components=n_components, transform_algorithm='lasso_lars', random_state=0)
38
  X_transformed = dl.fit_transform(X_dense)
39
  dictionary = dl.components_
40
+
41
  # Get the feature names (terms)
42
  feature_names = vectorizer.get_feature_names_out()
43
+
44
  # Create a DataFrame with dictionary components and their corresponding terms
45
  df_components = pd.DataFrame(dictionary, columns=feature_names)
46
  df_components['Component'] = ['Component ' + str(i+1) for i in range(n_components)]
47
  df_components = df_components.set_index('Component')
48
+
49
  # Display the DataFrame
50
  st.markdown("### Dictionary Components")
51
  st.dataframe(df_components)
52
+
53
+ # Plot the high-use words and terms
54
+ fig, ax = plt.subplots(figsize=(10, 6))
55
+ word_counts = df_components.sum(axis=0).sort_values(ascending=False)[:20]
56
+ ax.bar(word_counts.index, word_counts.values)
57
+ ax.set_xticklabels(word_counts.index, rotation=45, ha='right')
58
+ ax.set_xlabel('Words/Terms')
59
+ ax.set_ylabel('Count')
60
+ ax.set_title('High-Use Words and Terms')
61
+ st.pyplot(fig)
62
+
63
  # Create a graph of terms and their connections
64
  G = nx.Graph()
65
+
66
  # Add nodes to the graph
67
  for term in feature_names:
68
  G.add_node(term)
69
+
70
  # Add edges to the graph based on co-occurrence in dictionary components
71
  for i in range(n_components):
72
  terms = df_components.columns[df_components.iloc[i] > 0]
 
74
  for term2 in terms:
75
  if term1 != term2:
76
  G.add_edge(term1, term2)
77
+
78
  # Plot the graph
79
  fig, ax = plt.subplots(figsize=(8, 8))
80
  pos = nx.spring_layout(G, k=0.3)
 
82
  nx.draw_networkx_edges(G, pos, edge_color='gray', alpha=0.5)
83
  nx.draw_networkx_labels(G, pos, font_size=8)
84
  ax.axis('off')
85
+ st.pyplot(fig)