deepSIP¶
-
class
deepSIP.model.
deepSIP
(spec_len=1024, seed=100, drop_rate=0.02)¶ Bases:
object
class for deploying trained deepSIP models
Parameters: - spec_len : int, optional
number of wavelength bins for pre-processed spectra (must match what was used in training models)
- seed : int, optional
seed for random number generator
Attributes: - models : pd.DataFrame
models, along with metadata and utilities, indexed by purpose
- device : torch.device
device type being used (GPU if available, else CPU)
Methods
predict
(self, spectra[, threshold, mcnum, …])make predictions with trained models -
predict
(self, spectra, threshold=0.9, mcnum=30, status=False)¶ make predictions with trained models
Parameters: - spectra : np.ndarray or pd.DataFrame
pre-preocessed spectra if np.ndarray else pd.DataFrame with columns of [SN, filename, z] and optionally obsframe as bool
- threshold : float, optional
minimum threshold for ‘in’ classification by Domain model
- mcnum : int, optional
number of stochastic forward passes to perform
- status : bool, optional
show status bars
Returns: - pd.DataFrame
predictions generated by each model