machine-learningdatasetpre-trained-model

How can I retrain a model on new data without losing the earlier model


For my current business requirement I need a classifying model which is to be trained on data which comes on a daily basis, and the most important thing is that the data is not available to me after that day, so I need to train my model on that day itself and also continuing to train it on daily basis without losing the training done on the previous day(for increasing it's training data). How should I get on with this challenge. I have read about a concept called online machine learning or incremental learning but I have no clues how to implement it. Please give your suggestion on this issue. Whta can be the possible solutions to it.


Solution

  • You can load your earlier kernel back to the training, fit with new data. See keras as example,

    model = load_model(old_kernel)
    model.fit(new_x_train, new_y_train,epochs=100,batch_size=2000,shuffle=True)