This example demonstrates how to train a regression model against the Boston housing price dataset.
There are 506 data points. Samples contain 13 attributes of houses at different locations around the Boston suburbs in the late 1970s. Targets are the median values of the houses at a location (in k$).
You'll need the latest version of Swift for TensorFlow installed and added to your path.
Note: For macOS, you need to set up the
PYTHON_LIBRARY
to help the Swift for TensorFlow find thelibpython3.<minor-version>.dylib
file, e.g., inhomebrew
.
To train the model, run:
cd swift-models
swift run Regression-BostonHousing