Find the values of unknown variables in the given parametric equation of a curve :
unknowns are
Given range for unknown params is :
parameter ‘t’ has range:
Code for the algorithms used is given here
We are given a parametric curve, along with some of the points that lie on the curve, and asked to approximate the exact values of the parameters used.
This was a bit different than some of the ML problems that I have solved, as it was an optimization problem, So I decided to look up and understand some of the techniques used to solve optimization problems.
I tried using some of the algorithms given here to see which technique best fits the problem
Gradient Descent is an iterative optimization algorithm used to minimize a cost function by adjusting model parameters in the direction of the steepest descent of the function’s gradient. In simple terms, it finds the optimal values of weights and biases by gradually reducing the error between predicted and actual outputs. Source
Since the loss was pretty high, I tried the next algorithm
Bayesian Optimization is an automated optimization technique designed to find optimal hyperparameters by treating the search process as an optimization problem. It aims to maximize an objective function f(x), particularly beneficial for functions that are computationally expensive to evaluate and are treated as "black boxes," where their internal structure is unknown. Source Code
It converges much better than Gradient Descent, but there is room for fine tuning
With randomized search, instead of specifying a list of values for each hyperparameter, you specify a distribution for each hyperparameter. The randomized search algorithm will then sample values for each hyperparameter from its corresponding distribution and train a model using the sampled values. Source
While it gave better results than Bayesian Parameter Optimization, its computationally too expensive to run given the range of the parameters.
Particle Swarm Optimization (PSO) is a population-based optimization algorithm inspired by the social behavior of bird flocks and fish schools. Each individual in the swarm (a particle), represents a potential solution. These particles move through the search space by updating their positions based on experience and knowledge shared by neighboring particles. This cooperative mechanism helps the swarm converge toward optimal or near-optimal solutions. Source Code
It by far gave the best parameter estimation (2.99995036e+01, 3.00002457e-02, 5.49993364e+01) and loss (0.01) and nearly fitted the curve perfectly. Visually by the plot, we can see that it covers all the points given in the data.
Rounding the parameters given by Particle Swarm Optimization, we get the parameters used in the problem with ~ 0 loss.



