Posts

Showing posts with the label clustering

SQL Joins

Image
Joins are used to combine rows from two or more tables based on related columns between them. Joins allow you to retrieve data from multiple tables simultaneously, enabling you to create complex queries that fetch data from different sources. There are different types of joins in SQL, including: INNER JOIN Returns only the rows that have matching values in both tables based on the specified join condition. It discards non-matching rows from both tables. Example:           create table t1(x int); insert into t1 values(1); insert into t1 values(1); insert into t1 values(0); create table t2(y int); insert into t2 values(0); insert into t2 values(1); insert into t2 values(1);           select * from t1 inner join t2 on t1.x = t2.y Output: 2. LEFT JOIN (or) LEFT OUTER JOIN Returns all the rows from the left (or first) table and the matching rows from the rig...

Clustering and Similarity: Retrieving Documents Quiz Answers

1) Top word count words for Elton John (the, john, singer) (england, awards, musician) ( the, in, and) (his, the, since) (rock, artists, best) 2) Top TF-IDF words for Elton John (furnish,elton,billboard) (john,elton,fivedecade) (the,of,has) (awards,rock,john) (elton,john,singer) 3) The cosine distance between 'Elton John's and 'Victoria Beckham's articles (represented with TF-IDF) falls within which range? 0.1 to 0.29 0.3 to 0.49 0.5 to 0.69 0.7 to 0.89 0.9 to 1.0 4) The cosine distance between 'Elton John's and 'Paul McCartney's articles (represented with TF-IDF) falls within which range? 0.1 to 0.29 0.3 to 0.49 0.5 to 0.69 0.7 to 0.89 0.9 to 1 5) Who is closer to 'Elton John', 'Victoria Beckham' or 'Paul McCartney'? Victoria Beckham Paul McCartney 6) Who is the nearest neighbor to 'Elton John' using raw word counts? Billy Joel Cliff Richard Roger Daltrey George Bush 7) Who is ...