StarNet (arXiv:1709.09182)

class astroNN.models.apogee_models.StarNet2017[source]

To create StarNet, S. Fabbro et al. (2017) arXiv:1709.09182. astroNN implemented the exact architecture with default parameter same as StarNet paper

History:

2017-Dec-23 - Written - Henry Leung (University of Toronto)

digraph inheritance7ded58f35f { bgcolor=transparent; dpi=144; rankdir=LR; size="8.0, 12.0"; "ABC" [URL="https://docs.python.org/3/library/abc.html#abc.ABC",dpi=144,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Helper class that provides a standard way to create an ABC using"]; "CNNBase" [URL="basic_usage.html#astroNN.models.base_cnn.CNNBase",dpi=144,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Top-level class for a convolutional neural network"]; "NeuralNetMaster" -> "CNNBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "CNNBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NeuralNetMaster" [URL="basic_usage.html#astroNN.models.base_master_nn.NeuralNetMaster",dpi=144,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Top-level class for an astroNN neural network"]; "ABC" -> "NeuralNetMaster" [arrowsize=0.5,style="setlinewidth(0.5)"]; "StarNet2017" [URL="#astroNN.models.apogee_models.StarNet2017",dpi=144,fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="To create StarNet, S. Fabbro et al. (2017) arXiv:1709.09182. astroNN implemented the exact architecture with"]; "CNNBase" -> "StarNet2017" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

StarNet2017 is a astroNN neural network implementation from the paper (arXiv:1709.09182), StarNet2017 is inherited from astroNN’s CNNBase class defined in astroNN.models.NeuralNetBases

You can create StarNet2017 via

from astroNN.models import StarNet2017
from astroNN.datasets import H5Loader

# And then create an object of StarNet2017 classs
starnet_net = StarNet2017()

# Load the train data from dataset first, x_train is spectra and y_train will be ASPCAP labels
loader = H5Loader('datasets.h5')
loader.load_err = False
x_train, y_train = loader.load()

# And then create an object of Convolutional Neural Network classs
starnet = StarNet2017()

# Set max_epochs to 10 for a quick result. You should train more epochs normally
starnet.max_epochs = 10
starnet.train(x_train, y_train)

Note

Default hyperparameter is the same as the original StarNet paper