wdtools.neural
¶
Module Contents¶
Classes¶
Base class for a simple convolutional neural network. Work in progress, do not use. |
Attributes¶
- wdtools.neural.path¶
- wdtools.neural.dir_path¶
- class wdtools.neural.CNN(n_input=4000, n_output=2, n_hidden=2, neurons=32, n_conv=2, n_filters=4, filter_size=8, pool_size=4, activation='relu', output_activation='linear', regularization=0, loss='mse', bayesian=False, dropout=0.1, model='bayesnn')¶
Base class for a simple convolutional neural network. Work in progress, do not use.
- nn(self)¶
- train(self, x_data, y_data, model='default', n_epochs=100, batchsize=64, verbose=0)¶
- eval_data(self, x_data, model='default', n_bootstrap=100)¶
- labels_from_spectrum(self, wl, flux)¶
- save(self, modelname)¶
- load(self, modelname)¶
- args(self)¶
- label_sc(self, label_array)¶
Label scaler to transform Teff and logg to [0,1] interval based on preset bounds.
- Parameters
label_array (array) – Unscaled array with Teff in the first column and logg in the second column
- Returns
Scaled array
- Return type
array
- inv_label_sc(self, label_array)¶
Inverse label scaler to transform Teff and logg from [0,1] to original scale based on preset bounds.
- Parameters
label_array (array) – Scaled array with Teff in the first column and logg in the second column
- Returns
Unscaled array
- Return type
array