converting strings to most their efficient types '1' --> 1, 'A' ---> 'A', '1.2'---> 1.2
James Stroud
jstroud at mbi.ucla.edu
Mon May 21 07:52:52 EDT 2007
I need to correct myself here before someone else does. I didn't
actually reverse the probabilities as promised for the failing case. It
was late last night and I was starting to get a little cloudy.
> Pf(D|H) = 0.2 (We *guess* a 20% chance by random any column is Int.)
This can be read instead as "probability that it will fail the test
given that it is really from an Int column", which is 20% of the time.
> Pf(D|H') = 0.80 (80% of Ints fail because of carpel tunnel, ennui, etc.)
This can be read as "probability it will fail the test if it is not
really from an Int column". That would be Pf(D|H') = 0.95 (e.g. testing
the inability to cast to Int is a pretty bad test for Int because it
gives false positives 95% of the time).
This change doesn't change the conclusions of the example, with the
P_3(H|D) = 0.1505882 (lower than 20%, but no where near the 0.001 cutoff
to conclude the column is not Int) and the final probability P_7(H|D) =
0.9986247 (rounding up to our 0.999 criteria for confidence that it is
an Int ;).
James
More information about the Python-list
mailing list