Predict

class jamie.predict.Bootstrap(random_state, n=1000)

Get bootstrap means and confidence intervals from a sample.

Parameters
  • random_state (int) – Set initial random state

  • n (int, default=1000) – Number of bootstrap samples

sample(array)

Get bootstrap samples from array.

Parameters

array (array-like) – Sample to perform bootstrap on

Returns

dict – Dictionary containing probability, lower_ci, upper_ci (95% confidence intervals).

class jamie.predict.Predict(model_snapshot, random_state=0, bootstrap_size=1000)

Predict job classification using saved model snapshots.

Parameters
property dataframe

Returns predictions as pd.DataFrame

predict(save=True, skip_existing=True)

Record predictions in MongoDB

Parameters
  • save (bool, default=True) – Whether to save results in model snapshot folder, on by default. Results are always saved in the MongoDB instance

  • skip_existing (bool, default=True) – Whether to skip existing predictions or overwrite them. You can set this to False to force prediction of the entire dataset. Note that different model snapshots correspond to different prediction snapshots.

Returns

self (Predict) – Returns copy of itself

save(output=None)

Save predictions in prediction snapshot folder