2007年11月01日 星期四 14:57
各位大虾,
for feature_id in range(len(feature_set)):
# get the feature we're looking at (h_i)
feature = feature_set[feature_id]
# determine the subset of negative_examples_set (N)
# covered by our feature (h_i)
Q[feature_id] = \
filter( lambda (is_positive, data_point) :
feature.covers_neg_point(data_point) , \
negative_examples_set)
# determine the subset of positive_examples_set (P) on
# which our feature (h_i) makes a mistake
R[feature_id] = \
filter( lambda (is_positive, data_point) :
feature.errs_pos_point(data_point) , \
positive_examples_set)
作用域是不是到这结束?
while (len(negative_examples_set)>0) and
(len(result_set)xunkai.wei at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20071101/6462e86d/attachment.html
2007年11月01日 星期四 15:05
for 与 其它的块语句一样,当遇到缩近与for相同或少于for的语句时就结束了。所以当碰到下面的while时因为缩近相同,所以在while前就结束了。 On 11/1/07, xunkai wei <xunkai.wei在gmail.com> wrote: > 各位大虾, > > for feature_id in range(len(feature_set)): > # get the feature we're looking at (h_i) > feature = feature_set[feature_id] > > # determine the subset of negative_examples_set (N) > # covered by our feature (h_i) > Q[feature_id] = \ > filter( lambda (is_positive, data_point) : > feature.covers_neg_point(data_point) , \ > negative_examples_set) > > # determine the subset of positive_examples_set (P) on > # which our feature (h_i) makes a mistake > R[feature_id] = \ > filter( lambda (is_positive, data_point) : > feature.errs_pos_point(data_point) , \ > positive_examples_set) > 作用域是不是到这结束? > > > while (len(negative_examples_set)>0) and > (len(result_set)> > iterations = iterations+1 > > 谢谢 > > -- I like python! UliPad < >: http://code.google.com/p/ulipad/ meide < >: http://code.google.com/p/meide/ My Blog: http://www.donews.net/limodou
2007年11月01日 星期四 15:09
了解了,多谢多谢!发现python跟matlab不一样,有很多优势,需要好好学习啊,呵呵,谢谢您! On 11/1/07, limodou <limodou at gmail.com> wrote: > > for 与 > 其它的块语句一样,当遇到缩近与for相同或少于for的语句时就结束了。所以当碰到下面的while时因为缩近相同,所以在while前就结束了。 > > On 11/1/07, xunkai wei <xunkai.wei at gmail.com> wrote: > > 各位大虾, > > > > for feature_id in range(len(feature_set)): > > # get the feature we're looking at (h_i) > > feature = feature_set[feature_id] > > > > # determine the subset of negative_examples_set (N) > > # covered by our feature (h_i) > > Q[feature_id] = \ > > filter( lambda (is_positive, data_point) : > > feature.covers_neg_point(data_point) , \ > > negative_examples_set) > > > > # determine the subset of positive_examples_set (P) on > > # which our feature (h_i) makes a mistake > > R[feature_id] = \ > > filter( lambda (is_positive, data_point) : > > feature.errs_pos_point(data_point) , \ > > positive_examples_set) > > 作用域是不是到这结束? > > > > > > while (len(negative_examples_set)>0) and > > (len(result_set)> > > > iterations = iterations+1 > > > > 谢谢 > > > > > > > -- > I like python! > UliPad < >: http://code.google.com/p/ulipad/ > meide <>: http://code.google.com/p/meide/ > My Blog: http://www.donews.net/limodou > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- XunKai Wei IEEE Member Air Force Engineering University Xi'an, China Email:xunkai.wei at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20071101/bb5277da/attachment.html
Zeuux © 2025
京ICP备05028076号