avatar
非典型面试题# JobHunting - 待字闺中
l*i
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?
avatar
l*8
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?

avatar
l*8
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.
avatar
g*e
4
llyod max algo
avatar
l*8
5
what is the time complexity?

【在 g*********e 的大作中提到】
: llyod max algo
avatar
g*e
6

polynomial, should be fine.

【在 l*********8 的大作中提到】
: what is the time complexity?
avatar
l*i
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.

avatar
l*8
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
:

avatar
l*8
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.

avatar
k*g
10
Maximum entropy
★ Sent from iPhone App: iReader Mitbbs 7.56 - iPad Lite
avatar
l*i
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。