Model Export

Is it possible export or save a model so that whenever i want i can run the model if so how should i do it?

1 comment

  1. The library ‘pickle’ is used to save a machine learning model …

    To Save a Machine Learning Model: 

    #############################################
    # Import the pickle library
    import pickle

    # Save the trained model
    model = pickle.dumps(model_object)
    #############################################

    To load the Machine Learning Model:

    # Load the model
    loaded_model = pickle.loads(model)

    #############################################

    Example:

Leave a comment