Separate a parameter from a hyperparameter
Check signs and decimal points before moving to the next value. · 144 words
A travel app predicts a hotel price from its distance from the center. Use price_hat=b+w*x, where x is distance, y is the observed price, w is the distance coefficient, and b is the starting price. Both w and b are parameters: model values adjusted from training data. The learning rate eta controls each update's size, while the epoch count controls complete passes through the data. These are hyperparameters: settings chosen for the training run that govern learning rather than being updated by the same gradient step.
For one hand-checked hotel, x=4 and y=100. Start b=w=0 and minimize L=(b+w*x-y)^2. The prediction is 0, so L=10,000. The gradients are dL/db=2(b+w*x-y)=-200 and dL/dw=2(b+w*x-y)*x=-800. With eta=0.005, the updates are b=0-0.005*(-200)=1 and w=0-0.005*(-800)=4. The parameters changed because their gradients were used. The learning rate stays 0.005, and the chosen epoch count stays fixed; those hyperparameters control how training proceeds.
Check your recall
In the hotel-price model, which values are parameters and which are hyperparameters?
Check your answer
The coefficient w and bias b are parameters because training adjusts them from data. The learning rate and epoch count are hyperparameters because they control the training process. They may be selected or tuned on validation data, but ordinary gradient descent does not update them.
Sources and credits
Original KeyTouch lesson. Background reading · Google · Linear regression.