Lesson Unsupervised Learning - Artificial Intelligence - ثالث ثانوي

Lesson 2 Unsupervised Learning

Unsupervised Learning to Understand Text

Lesson 2 Unsupervised Learning

Cluster

Lesson 2 Unsupervised Learning

Document Clustering

Table 3.2: Factors that determine the quality of the results

Selecting the Number of Clusters

Lesson 2 Unsupervised Learning

Hierarchical Clustering

Text Vectorization

Lesson 2 Unsupervised Learning

The following code uses the TSENVisualizer tool from the yellowbrick library to project and visualize the vectorized documents within a 2-dimensional space:

Table 3.3: Dimensionality reduction techniques

Lesson 2 Unsupervised Learning

One of the key features of t-SNE is that it tries to preserve the local structure of the data as much as possible,

Lesson 2 Unsupervised Learning

Agglomerative Clustering (AC)

Linkage() Function

Lesson 2 Unsupervised Learning

Ward Distance

Lesson 2 Unsupervised Learning

The following code uses the ground-truth labels and three

Lesson 2 Unsupervised Learning

Word Vectorization with Neural Networks

Word2Vec

Lesson 2 Unsupervised Learning

The first 10 dimensions of the numeric "fox" embedding are displayed below:

Lesson 2 Unsupervised Learning

The following function is then used to select a sample of representative

Lesson 2 Unsupervised Learning

Finally, you can use a method with t-SNE to reduce the 300-dimensional embeddings of the words in

Lesson 2 Unsupervised Learning

Sentence Vectorization with Deep Learning

Bidirectional Encoder Representations from Transformers (BERT)

SBERT

Sentence_transformers Library

Lesson 2 Unsupervised Learning

The same TSNEVisualizer tool that was used earlier in this unit to visualize the vectorized documents produced by the TF-IDF vectorizer can now be used for the embeddings produced by SBERT:

Lesson 2 Unsupervised Learning

The dendrogram tool suggests the use of 4 clusters, each marked with a different color in the figure 3.24.

Lesson 2 Unsupervised Learning

Read the sentences and tick True or False.

Show examples of applications for which Dimensionality Reduction can be used. Describe the techniques that are used in Dimensionality Reduction.

Describe the functionality of TF-IDF vectorization.

Lesson 2 Unsupervised Learning

You are given a numPy array 'Docs' that includes one text document in each row.

Complete the following code so that it uses Word2Vec to replace every word in a given sentence with its most similar one.