// geneticPredictionModels contains genetic prediction neural network models for predicting genetic traits // These are .gob encoded files of []float32 weights // This package also contains prediction accuracy information for each model // Prediction accuracy models describe information about how accurate the predictions made by the models are // All of the files in this package are created by the Create Genetic Models utility. // This utility is located in /utilities/createGeneticModels/createGeneticModels.go package geneticPredictionModels import _ "embed" import "errors" //Outputs: // -bool: Model exists // -[]byte func GetGeneticPredictionModelBytes(traitName string)(bool, []byte){ switch traitName{ case "Eye Color":{ return true, predictionModel_EyeColor } case "Lactose Tolerance":{ return true, predictionModel_LactoseTolerance } } return false, nil } //go:embed predictionModels/EyeColorModel.gob var predictionModel_EyeColor []byte //go:embed predictionModels/LactoseToleranceModel.gob var predictionModel_LactoseTolerance []byte // The files returned by this function are .gob encoded geneticPrediction.TraitPredictionAccuracyInfoMap objects func GetPredictionModelTraitAccuracyInfoBytes(traitName string)([]byte, error){ switch traitName{ case "Eye Color":{ return predictionAccuracy_EyeColor, nil } case "Lactose Tolerance":{ return predictionAccuracy_LactoseTolerance, nil } } return nil, errors.New("GetPredictionModelTraitAccuracyInfoFile called with unknown traitName: " + traitName) } //go:embed predictionModelAccuracies/EyeColorModelAccuracy.gob var predictionAccuracy_EyeColor []byte //go:embed predictionModelAccuracies/LactoseToleranceModelAccuracy.gob var predictionAccuracy_LactoseTolerance []byte