专栏名称: 大数据应用
数据应用学院被评为2016北美Top Data Camp, 是最专业一站式数据科学咨询服务机构,你的数据科学求职咨询专家!
目录
相关文章推荐
CDA数据分析师  ·  Deepseek教我自学Python,貌似3 ... ·  昨天  
人工智能与大数据技术  ·  因一条1分钟的视频,工程师被OpenAI封禁 ... ·  4 天前  
艺恩数据  ·  艺恩数据祝您开工大吉! ·  1 周前  
大数据D1net  ·  2025年数据治理趋势与成功策略全解析 ·  3 天前  
51好读  ›  专栏  ›  大数据应用

每日一练 | Data Scientist & Business Analyst & Leetcode 面试题 344

大数据应用  · 公众号  · 大数据  · 2018-04-28 09:55

正文

点击上方 蓝字 会变美




APR

27

Data Application Lab 自2017年6月15日起,每天和你分享讨论一道数据科学(DS)和商业分析(BA) 领域常见的面试问题。

自2017年10月4日起,每天再为大家分享一道Leetcode 算法题。


希望积极寻求相关领域工作的你每天关注我们的问题并且与我们一起思考,我们将会在第二天给出答案。

Day

244

DS Interview Question

Give me some examples about the applications of Naive Bayes Algorithms.

BA Interview Question

What is the difference between UNION and UNION ALL in SQL.

LeetCode Question

Subsets


Description:

Given a set of distinct integers, nums, return all possible subsets.


Input: [1,2,3]

Output: [[],[1],[1,2],[1,2,3],[1,3],[2],[2,3],[3]]


Assumptions:

The solution set must not contain duplicate subsets.


Day

243

答案揭晓

DS Interview Question & Answer

What are the Pros and Cons of Naive Bayes?

Answer:


Pros:

- It is easy and fast to predict class of test data set. It also perform well in multi class prediction.


- When assumption of independence holds, a Naive Bayes classifier performs better comparing to other models like logistic regression and you need less training data.


- It perform well in case of categorical input variables compared to numerical variable(s). For numerical variable, normal distribution is assumed (bell curve, which is a strong assumption).


Cons:

- If categorical variable has a category (in test data set), which was not observed in training data set, then model will assign a 0 (zero) probability and will be unable to make a prediction. This is often known as “Zero Frequency”. To solve this, we can use the smoothing technique. One of the simplest smoothing techniques is called Laplace estimation.


- On the other side naive Bayes is also known as a bad estimator, so the probability outputs from predict_proba are not to be taken too seriously.


- Another limitation of Naive Bayes is the assumption of independent predictors. In real life, it is almost impossible that we get a set of predictors which are completely independent.







请到「今天看啥」查看全文