Keen Learner and Exp...ย โขย 2d
Day 12 of learning AI/ML as a beginner. Topic: TF-IDF practical. Yesterday I shared my theory notes and today I have done the practical of TF-IDF. For the practical I reused my spam classifier code and for TF-IDF I first imported it from the sklearn python library and then initialized it setting the max word to 100 then I converted it to an array. The I used numpy because array printing are configuration belongs to numpy library. I set edge item = 30 because I wanted to print the first and last 30 elements (usually numpy prints arrays as [1, 2, 3, ...., 98, 99,100] i.e. it hides the middle letters in ...). Then I set line width as 100000 so that the arrays are printed in a single line and is not wrapped (this also avoids confusion). Then in lambda function I used "%.3g" to make sure that there are normal numbers behind decimal (float) and it does not exceeds the three digits after that. I also got one step ahead and tried to use n grams in this and also printed a new array. Here's my code and its result.
Front-end Developerย โขย 1y
#Array in #javascript: Array in Javascript enables storing a collection of multiple items under a single variable name, and has members for performing common array operations. Arrays aren't primitives but are instead Array #objects with the followin
See MoreKeen Learner and Exp...ย โขย 3d
Day 11 of learning AI/ML as a beginner. Topic: TF-IDF (Term Frequency - Inverse Document Frequency). Yesterday I have talked about N-grams and how they are useful in Bag of Words (BOW) however it has some serious drawbacks and for that reason I am
See MoreCrafting Impactful A...ย โขย 2m
๐ง Programming Challenge of the Day Can you solve this? You're given an integer array (with both positive and negative values). Each element in the array represents the number of stars (*) to be printed vertically in its column: ๐น Positive values
See MoreDownload the medial app to read full posts, comements and news.