We present a new machine learning (ML)-based approach for efficient inverse design of nanophotonic structures. Generating training data for a ML method is the most computationally expensive step in the ML-based inverse design and knowledge discovery, and it becomes cumbersome when the number of design parameters and the complexity of the structure increase. Here we show how to optimize the training process and considerably reduce the computation requirements without increasing error in order to efficiently model the input-output relationship in a nanophotonic structure and solve the inverse design problem.