make_prediction_dlhub
- mastml.mastml_predictor.make_prediction_dlhub(input_dict)[source]
Method used to take a saved preprocessor, model and calibration file and output predictions and calibrated uncertainties on new test data
- Args:
input_dict: (dict), dictionary of input passed to predictor. The dictionary may have the following keys:
- X_test: (pd.DataFrame or str), dataframe of featurized test data to be used to make prediction, or string of path
containing featurized test data in .xlsx or .csv format ready for import with pandas. If passing an already featurized dataframe, only the features used to fit the original model should be included, and they should be in the same order as the training data used to fit the original model.
featurizers: (list), list of strings denoting paths to saved mastml feature generators, e.g., [“myfolder/ElementalFeatureGenerator.pkl”, “myfolder/PolynomialFeatureGenerator.pkl”]
- featurize_on: (list), list of strings of column name in X_test to perform featurization on, needs to be same length and in
same order as featurizers listed above, e.g., [‘Composition’, [‘feature1’, ‘feature2’] ]
composition_column: (str), string denoting name of X_test column denoting material compositions. Will be needed if assessing domain with “elemental” method.
- Returns:
- pred_df: (pd.DataFrame), dataframe containing column of model predictions (y_pred) and, if applicable, calibrated uncertainties (y_err).
Will also include any extra columns denoted in extra_columns parameter.