export_weights_gams: Export neural nets weights and biases to .csv and write gams...

Description Usage Arguments Author(s) Examples

Description

Save and export model weights and biases for use in GAMS reconstruction of neural networks.

Usage

1
export_weights_gams(model, inputs_vec, type)

Arguments

model

keras .h5 saved model.

inputs_vec

vector with input column names

type

Letter used to identify the dataset being used

Author(s)

Marcos Alves mppalves@gmail.com

Examples

1
2
3
4
5
6
## Manually extracted column names
inputs <- c("lsu", "lon", "lat", "tem", "pre", "rad", "soil")

## Suggested way to extract the inputs from the dataset
inputs <- c(colnames(df.harvest)[-ncol(df.harvest)])
export2gams(model, module, means, stddevs, inputs_vec, "s")

mppalves/GSTools documentation built on May 22, 2020, 7:21 p.m.