Polymer Mechanics and Machine Learning
Physics-Based Theory and Numerical Implementation The weight of the hammer ball is 7.26 kg, the material is steel and therefore the ball radius is given by $r = (3m/(4\pi \rho_s))^{1/3}$. The drag force from the air resistance is $F_d = \rho_a v^2 C_d A$, where $A$ is the cross-sectional area. In summary, Newton’s equation in the horizontal and vertical directions can be written in incremental form: $$ \displaystyle \Delta v_x = – \frac{F_d(v)}{m} \frac{v_x}{v} \Delta t$$ $$ \displaystyle \Delta v_y = – \left[ \frac{F_d(v)}{m} \frac{v_y}{v} + g \right] \Delta t$$
Background The purpose of this article is to demonstrate how JupyterLab can be used to solve numerical problems using Python.
Code Location You can find the code in this example in this repo. My example here is not a machine learning problem, but instead focuses on how one can calculate an approximate value of Pi. You may want to know why you want to do this since you can always just type:
Instructions The next step after installing Python is to install JupyterLab. This is free open-source web-based interactive development environment for Python coding. It is really cool, easy to install and use. All you have to do is to start Python and type the following commands:
pip install --upgrade pip pip install jupyterlab
Then start JupyterLab using the following command: jupyter lab. This will open a new browser window with JupyterLab. It will look something like in the following image.
Background You can use any computer language for learning, coding, and solving Machine Learning (ML) problems. The most common language to use is Python. The main reason for this is that there are many high quality libraries of ML algorithms already written and freely available for Python (e.g. PyTorch, TensorFlow, and Keras). This makes it really easy to get started and to try things out.
One main design feature of Python is that the core language is relatively small, and additional features are added through external packages.