looking for "optimal weighting" algorithm

Sean Ross frobozz_electric at hotmail.com
Thu Apr 10 10:53:03 EDT 2003


Hi.
It sounds like you're doing a 'Decision Tree' problem, from machine
learning. If this is correct, you can find a Python implementation here:
    http://www.norvig.com/python/learning.html
This contains code for the Decision Tree as well as a few Learner classes.
It looks like your problem will not fit exactly into this framework, but
this code may still provide a basis for your solution. Of course, if this
isn't a Decision Tree problem, then the code won't serve as much of anything
besides light reading ;)
I hope this will have been helpful, and good luck with your project,
Sean Ross


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:b73ql8011te at enews4.newsguy.com...
> I _know_ there's a decent algorithm to solve the following problem,
> but I don't recall its name and thus can't rapidly google for the
> details... can somebody help?
>
>
> The problem: I need to design a "decision criterion" to classify
> "observations".  For each observation I measure the values of a
> number N of features, x1, x2, ... xN; the desired design criterion
> is a set of weights w1, w2, ... wN such that for any observation I
> will then just compute a weighted sum
>   S = w1*x1 + w2*x2 + ... + wN*xN
> and classify the observation as Black if S<=1, White if S>1.  To
> train my classifier I have a large corpus of observations already
> made and annotated with "ground-truth" data about whether each
> given observation should have been classified as B or W, and an
> error-cost value for each kind of classification (Ebw is the cost
> of erroneously classifying a feature as W when it should be B,
> Ewb is that of classifying it as B when it should be W).  So,
> what's the algorithm to estimate the weights given the corpus of
> observation and ground-truth data, and the error-costs?
>
> Responses welcome either here or directly to my mailbox -- if I
> do get responses to my mailbox, I'll eventually summarize here --
> as a bonus, I promise to make available a Python implementation of
> whatever algorithm I end up with, if one's not already around...;-).
>
>
> TIA,
>
> Alex
>






More information about the Python-list mailing list