专栏名称: 大数据应用
数据应用学院被评为2016北美Top Data Camp, 是最专业一站式数据科学咨询服务机构,你的数据科学求职咨询专家!
目录
相关文章推荐
软件定义世界(SDX)  ·  数据是怎样创造价值的? ·  昨天  
数据派THU  ·  清华软件论坛|C. Mohan:Data ... ·  2 天前  
数据派THU  ·  数据派志愿者招募 | 寻找最志同道合的你! ·  1 周前  
现代财经  ·  《现代财经-早读早分享》2024年11月11 ... ·  6 天前  
现代财经  ·  《现代财经-早读早分享》2024年11月11 ... ·  6 天前  
51好读  ›  专栏  ›  大数据应用

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

大数据应用  · 公众号  · 大数据  · 2017-10-10 09:49

正文

从6月15日起,数据应用学院将与你一起温习数据科学(DS)和商业分析(BA)领域常见的面试问题。从10月4号起,每天再为大家分享一道Leetcode算法题。

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

Day 109

DS Interview Questions

What’s the assumption of linear regression?

BA Interview Questions

R Programing: What is the difference between dataframe and a matrix in R?

Leetcode Interview Questions

Description: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.

Input: [2, 7, 11, 15]

Output: [0, 1]

Assumptions:  each input would have exactly one solution.

欲知答案如何?请见下期分解!

Day 108 答案揭晓

DS Interview Questions

What is regularization? The differences between Lasso vs Ridge?

Regularization: A process of adding a tuning parameter to a model to induce smoothness of the weights (prevent the coefficients to fit so perfectly) in order to prevent overfitting. It is most often done by adding a constant multiple to an existing weight vector, the constant can be any norm (sometimes it will be Lasso or Ridge). Then the model predictions minimize the regularized loss function.

L2 (Ridge): the sum of the square of the weights, it has analytical solution, higher computational efficiency.


L1 (Lasso): the sum of the absolute value of the weights, it performs feature selection better in sparse cases


Reference:

http://www.chioka.in/differences-between-l1-and-l2-as-loss-function-and-regularization/


BA Interview Questions

What is Return on Investment (ROI) ? How to calculate ROI ?

Return on Investment (ROI) is the benefit to an investor resulting from an investment of some resource. A high ROI means the investment's gains compare favorably to its cost. As a performance measure, ROI is used to evaluate the efficiency of an investment or to compare the efficiencies of several different investments


return on investment = Net income / Investment

Where:

Net income = gross profit − expenses.

investment = stock + market outstanding + claims.


Reference:

https://en.wikipedia.org/wiki/Return_on_investment


Leetcode Questions

Description: Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.

Input: [2, 7, 11, 15]

Output: [0, 1]

Assumptions:  each input would have exactly one solution.


3Sum的变种, 保存一个与target的差值, 每次作比较,小于这个差值即更新答案。

注意点:三个int相加使用long防止溢出


时间复杂度:O(n ^ 2)

空间复杂度:O(1)








点击“阅读原文”查看数据应用学院核心课程