This project implements sorting algorithms and regression prediction in C programming language.
- A C compiler like GCC
To compile the program:
gcc -o app.exe main.c
To execute the program :
./main.exe
main.exe
- With the programm you can compare algorithms of sorting and know how they interact. Exemple :
main.exe -algorithm all -size 10/10000/10
main.exe -algorithm all -size 10/10000/10
main.exe -algorithm bubblesort -size 10/10000/10
This project includes a linear regression module that uses mathematical formulas to analyze data through four different models:
- Linear Model: A classic linear relationship where the output is directly proportional to the input.
- Logarithmic Model: A model where the response variable increases logarithmically with the predictor.
- Log-Linear Model: A transformation where the predictor is logarithmic, but the relationship is linear in the log scale.
- Quadratic Model: A model where the response variable is a quadratic function of the predictor, allowing for curvilinear relationships.
The program computes each model using their respective mathematical formulas and compares the accuracy of each by evaluating the residuals (errors) between predicted and actual values. At the end of the analysis, the program identifies the model that best fits the data based on these error comparisons, giving you the most suitable regression type for your dataset.
main.exe -algorithm bubblesort -size 10/10000/10 predict 1
At the end of the program, if you activate the prediction option by entering [predict -1]
, you will interact with the console. The program will prompt you to specify the number of elements you wish to predict. Using the formula from the best-fitting model, it will then provide an estimate of the execution time for the predictions.
For more information on how to use the program, you can type main.exe -help
in the console. This command will display a list of available options and usage instructions to guide you through the functionalities of the application.