It is the simple iOS application for training linear regression
with gradient descent
optimization algorithm. You can change parameters to see how do they affect learning.
- macOS Catalina - 10.15.5 Beta
- Xcode - 11.4.1
- iPhone 8
- iOS - 13.3.1
git clone https://github.com/Gleonett/ft_linear_regression.git
cd ft_linear_regression
git submodule update --init --recursive
- Open
ft_linear_regression/ft_linear_regression.xcodeproj
- Drag the
Charts/Charts.xcodeproj
to the project - Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework
- Build and run
Main view contains visualization for model, dataset and buttons:
Parameters
- Link to Parameters viewReset
- Reset already trained linear regression model parametersTrain
- Train modelPredict
- Link to Prediction view
Learning rate
is a tuning parameter in an optimization algorithm that determines the step size at each iteration while moving toward a minimum of a loss function
learningRate = initinalLearningRate / (decay * currentEpoch + 1)
Model will train either until the end of epochs
or until:
abs(InterceptN - InterceptN-1) < AccuracyThreshold
and
abs(BiasN - BiasN-1) < AccuracyThreshold
regressor
is the value we want to predict the dependent