"The objects of the Society are to encourage an interest in, and improvement of, horticulture."
The phrases "interest in" and "improvement of" form a coordination of two only partially complete nominals, but because the second coordinate intervenes between the preposition "in" in the first coordinate and its object "horticulture", it is set off with commas to avoid ambiguity and to make for easier reading.