Invention, though it can be cultivated, can not be reduced to rule; there is no science which will enable a man to bethink himself of that which will suit his purpose.
 John Stuart Mill, A System Of Logic, Ratiocinative And Inductive (1843). copy citation

Context

“in calling to mind such of the known or received maxims of probability as admit of application to the case in hand, and selecting from among them those best adapted to his object. Success is here dependent on natural or acquired sagacity, aided by knowledge of the particular subject, and of subjects allied with it. Invention, though it can be cultivated, can not be reduced to rule; there is no science which will enable a man to bethink himself of that which will suit his purpose. But when he has thought of something, science can tell him whether that which he has thought of will suit his purpose or not. The inquirer or arguer must be guided by his own knowledge and sagacity in the choice of the inductions out of which he will construct his argument.” source