Keen Learner and Exp... • 1m
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.


Keen Learner and Exp... • 23d
Day 6 of learning Data Science as a beginner. Topic: creating NumPy arrays NumPy arrays can be created using various ways one of them is using python list and converting it into a numpy array however this is a long way here you first create a pytho
See More

Keen Learner and Exp... • 21d
Day 7 of learning Data Science as a beginner. Topic: Indexing and Slicing NumPy arrays Since a past few days I have been learning about NumPy arrays I have learned about creating arrays from list and using other numpy functions today I learned abou
See More

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 More



Keen Learner and Exp... • 15d
Day 9 of learning Data Science as a beginner. Topic: Data Types & Broadcasting NumPy offers various data types for a variety of things for example if you want to store numerical data it will be stored in int32 or int64 (depending on your system's a
See More

Keen Learner and Exp... • 16d
Day 8 of learning Data Science as a beginner topic: multidimensional indexing and axis NumPy also allows you to perform indexing in multidimensional arrays i.e. in simple terms numpy allows you to access and manipulate elements even in arrays conta
See More

Download the medial app to read full posts, comements and news.