The powerful support vector regression framework is proposed in a novel method for near-field focusing using antenna arrays. By using this machine-learning method, the set of weights required in the elements of an array can be calculated to achieve an assigned near-field distribution focused on one or more positions. The computational cost is concentrated in an initial training process so that the trained system is fast enough for applications where moving devices are involved. The increased learning capabilities of support vector machines allow using a reduced number of training samples. Thus, these training samples may be generated with a prototype or a convenient electromagnetic analysis tool, and hence realistic effects, such as coupling or the individual radiation patterns of the elements of the arrays, are accounted for. Illustrative examples are presented.