Interview Question for Java Developers


Country: India




Comment hidden because of low score. Click to expand.
0
of 0 vote

1. per document: extract document text, remove all tags, format etc.
2. per document: perform a word stemming and remove filling words (like "a", "I", etc...)
3. create word-id's where each word is an id
4. per document: create a vector of words, where you have per word-id, the number of times
it occures in a document. e.g. {(1, 1), (8,10), (14,2)}
5. perform k-means, which is, find k partitions whereas k is the desired amount
of categories. per category, maybe take the top most used words to describe
it.
k-means works as follows:
1) pick k random categories and then check for each document where it has
the most similiarity to and assign it to this category
2) now for each category re-calculate it's center by adding up the vectors
3) check for each document to which category it's closest and re-asign
it to this category
4) stop if no re-asignment happend in 3) or continue with 2)
5) for similarity you can pick anythin, like the cosine-similarity or
other similarity functions

- Chris July 25, 2017 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More