<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Data - Tag - Jorgen Bergstrom</title><link>https://bergstrom.org/tags/data/</link><description>Data - Tag - Jorgen Bergstrom</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>Jorgen Bergstrom</copyright><lastBuildDate>Sun, 26 May 2024 00:00:00 -0500</lastBuildDate><atom:link href="https://bergstrom.org/tags/data/" rel="self" type="application/rss+xml"/><item><title>Hammer Throw: Generate Training Data</title><link>https://bergstrom.org/posts/hammer_throw_generate_training_data/</link><pubDate>Sun, 26 May 2024 00:00:00 -0500</pubDate><author>Jorgen Bergstrom</author><guid>https://bergstrom.org/posts/hammer_throw_generate_training_data/</guid><description>Training Data All machine learning algorithms require data for training the model. In this example, we can use physics calculations to generate a dataset with two input variables: velocity and angle, and one output variable: flight distance. The following Python code creates an input file named data_X.csv containing the input variables, and a results file with the flight distance. These files will be used in subsequent machine learning demonstrations.
import math import numpy as np import csv def calc_distance(angle, velocity): # fixed input parameters g = 9.</description></item></channel></rss>