由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 非典型面试题
相关主题
算法面试题贡献一道面试题
发Facebook intern面经欢迎大家积极讨论一个ms简单的算法面试题
赛车问题请教一道面试题
一道列举所有和相等的pairs的面试题.问个google面试题(3)
DP interview question请教一道google面试题 meeting point for N people
再问个amazon面试题Walmart Lab onsite求指导
问个google面试题G家面试题请教
问一个G的面试题求教一个dropbox面试题
相关话题的讨论汇总
话题: rmin话题: linear话题: optimal话题: example
进入JobHunting版参与讨论
1 (共1页)
l****i
发帖数: 230
1
one step in classification using decision tree: find an optimal split for a
set of one-dimensional example-label pairs such that the misclassifications
are minimized
findOptimalSplit(double* example, bool *label, int num)
I answered with a linear search solution, but the interviewer was not happy
with it. Should it be DP?
l*********8
发帖数: 4642
2
不是每个人都熟悉decision tree classification, 给个例子吧。

a
misclassifications
happy

【在 l****i 的大作中提到】
: one step in classification using decision tree: find an optimal split for a
: set of one-dimensional example-label pairs such that the misclassifications
: are minimized
: findOptimalSplit(double* example, bool *label, int num)
: I answered with a linear search solution, but the interviewer was not happy
: with it. Should it be DP?

l*********8
发帖数: 4642
3
What is your linear algorithm?
If example is already sorted, I think we still need O(N) time to find
optimal split, which is linear.
g*********e
发帖数: 14401
4
llyod max algo
l*********8
发帖数: 4642
5
what is the time complexity?

【在 g*********e 的大作中提到】
: llyod max algo
g*********e
发帖数: 14401
6

polynomial, should be fine.

【在 l*********8 的大作中提到】
: what is the time complexity?
l****i
发帖数: 230
7
Yes, assume the examples are already sorted. We can search through the set
to find the optimal split point t:
rmin = INFINITY
for z = x_i
calculate r = misclassification rate
if (r < rmin) rmin = r, z = x_i
return x_i


【在 l*********8 的大作中提到】
: What is your linear algorithm?
: If example is already sorted, I think we still need O(N) time to find
: optimal split, which is linear.

l*********8
发帖数: 4642
8
How do you calculate r = misclassification rate ?
If it's O(n), then the overall time complexity is o(n^2)

【在 l****i 的大作中提到】
: Yes, assume the examples are already sorted. We can search through the set
: to find the optimal split point t:
: rmin = INFINITY
: for z = x_i
: calculate r = misclassification rate
: if (r < rmin) rmin = r, z = x_i
: return x_i
:

l*********8
发帖数: 4642
9
I think llyod max algo is a more general algorithm. For this question, we
can have linear algorithm if "examples" are already sorted.

【在 g*********e 的大作中提到】
:
: polynomial, should be fine.

k***g
发帖数: 58
10
Maximum entropy
★ Sent from iPhone App: iReader Mitbbs 7.56 - iPad Lite
l****i
发帖数: 230
11
more details please.
The interview also require coding for this question, any one tried coding
this?

【在 k***g 的大作中提到】
: Maximum entropy
: ★ Sent from iPhone App: iReader Mitbbs 7.56 - iPad Lite

1 (共1页)
进入JobHunting版参与讨论
相关主题
求教一个dropbox面试题DP interview question
请教两个面试题再问个amazon面试题
面试题 (statistician and optimization) --总结问个google面试题
[合集] 面试题 (statistician and optimization) --总结问一个G的面试题
算法面试题贡献一道面试题
发Facebook intern面经欢迎大家积极讨论一个ms简单的算法面试题
赛车问题请教一道面试题
一道列举所有和相等的pairs的面试题.问个google面试题(3)
相关话题的讨论汇总
话题: rmin话题: linear话题: optimal话题: example