We introduce a class of generalized DNF formulae called wDNF or weighted disjunctive normal form, and present a molecular algorithm that learns a wDNF formula from training examples. Realized in DNA molecules, the wDNF machines have a natural probabilistic semantics, allowing for their application beyond the pure Boolean logical structure of the standard DNF to real-life problems with uncertainty. The potential of the molecular wDNF machines is evaluated on real-life genomics data in simulation. Our empirical results suggest the possibility of building error-resilient molecular computers that are able to learn from data, potentially from wet DNA data.