Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Sanjana Shah

Sanjana Shah

Community Learner
Active in: Data Science Python
Share
10Questions
8Answers
20.2KViews on questions

How do I sort a dictionary by value?

Absolutely! Sorting a dictionary by its values in Python is a common task, especially when you need to organize data based on importance, frequency, or size. But since dictionaries themselves are unordered collections (prior to Python 3.7), you’ll need to use a little trick with sorted(). Here's a quick and…

Python

Answered Apr 16, 2025 · 1.0K Views Read answer →

Explain how to implement tfidf in python.To implement tf-idf in Python, we need to import necessary libraries. Let us discuss that with the help of a dataset?

Here, smsspamcollection is a dataset contains messages as spam and ham. We need to transform all the words into vectors. Text preprocessing, tokenizing and the ability to filter out stop words are all included in CountVectorizer, which builds a dictionary of features and transforms documents to feature vectors.

Data Science

Answered Dec 24, 2019 · 2.3K Views Read answer →

Explain how normalization of features is better while preprocessing a model?

Normalization refers to rescaling real valued numeric attributes into the range 0 and 1. It is useful to scale the input attributes for a model that depends on the magnitude of values, such as distance measures algorithm used in models like k-nearest neighbors or clustering and in the preparation of coefficients in…

Data Science

Answered Nov 30, 2019 · 1.6K Views Read answer →

Explain ROC curve.

ROC or Receiver Operating Characteristic curve is a graphical representation that gives an idea between True Positive rate against False Positive Rate at various threshold values. It gives an idea to set an optimum threshold value which will decide the probability assign a class. A low threshold value we will put most…

Data Science

Answered Nov 30, 2019 · 2.1K Views Read answer →

Explain how to implement decision in R

First we import the dataset # Importing the dataset com_sale dataset = read.csv(file.choose()) Now we encode the target feature as factor # Encoding the target feature as factor cut(dataset$TaxableIncome,2) cut(dataset$TaxableIncome,c(0,30000)) dataset$TaxableIncome=cut(dataset$TaxableIncome,2,labels=c("Risky","Good"))

Data Science

Answered Nov 4, 2019 · 1.5K Views Read answer →

More members from the Data Science community

Learners asking and answering questions on the same topics — follow their questions and join in.

Latest Data Science Blogs

Guides, tips and career advice on Data Science from JanBask experts.

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.