注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
去年年底IE毕业仍然在找data相关的工作,想要GHC的时候再拼一拼,每日打卡鞭策一下自己!. ----
有想要去GHC的盆友,一起抢票一起准备呀!. 1point 3 acres
Day1:
SQL:
Data question: dialog log (userid int appid int type char, a flag either "imp" or "click" ds timestamp ) How would you access the quality of the app? How to compute the click-through rate (in MySQL)?
Assuming CRT is defined as total number of clicks / total number of impressions :. check 1point3acres for more.
.--
select appid, total_click_ct / total_imp_ct as CTR
from (
select
appid,
count(distinct case when flag = 'imp' then 1 else 0 end) as total_imp_ct,
count(distinct case when flag = 'click' then 1 else 0 end) as total_click_ct,
from table
where time=..
group by appid) table2
order by CTR desc;
Assessing the quality of an app, some ideas: (From GLassdoor)
if it's your company's app, you can look at numbers of downloads and server traffic. You can survey your users, measure profitability, and track how often your users refer others to get the app.
if it's not your app, you can look at ratings in the app store, cost, read reviews, and look at how well it does against your competitors' cost and ratings..1point3acres
you can look at specific features: does it do what's needed? does it look good? does it have a bunch of unnecessary features that nobody uses or wants? Does it clutter up your storage or run very slowly, i.e. is it optimized?. ----
you can look at the company's reputation, if you don't know anything about them, look at their website, does it look professional? does it have demos? can you test the app with a free trial before you buy?
Leetcode: 203. Remove Linked List Elements. 1point3acres.com
class Solution(object):
def removeElements(self, head, val):
"""
:type head: ListNode
:type val: int
:rtype: ListNode
""". From 1point 3acres bbs
while head.val==val and head != None:
new_node=head.next
return new_node
curr=head
while (curr!=None):
if curr.next!=None and curr.next.val==val:
curr.next=curr.next.next
else:
.. curr=curr.next
return head
ML: decision tree <-bagging tree <- random forest <-boosted trees
decision tree: 1. feature prioritization + 2. feature splitting.
At each iteration, we split the feature which can give us the largest entropy gain. The same procedure is performed on each split until RSS can no longer be decreased or meet the stopping criteria(leaf size, depth)
high variance, low bias
bagging tree: 为了保证抽取的数据是同一个分布,有放回的抽样,create B decision trees trained on B bootstrapped training sets. The predicted value is the avg value of all B trees.
moderate variance, low bias.. check 1point3acres for more.
when bootstrap, we can only select 2/3 of the data.
random forest: bootstrapped training sets+ multiple trees + random choice of features.
uses: feature importance, first cut model
. 1point 3acres
AdaBoost: fit a sequence of weak learners on repeatedly modified versions of the data
The predictions from all of them are then combined through a weighted majority vote to produce the final prediction.
Gradient Boosting: fit a decision tree using the current residuals rather than the outcome Y as the response.
|