This project implements SVM, Neural Networks and Naïve Bayes with three different datasets: the original one, a copy from the original containing features selected by RELIEF algorithm only, and a dataset containing the corresponding PCA components. For each run, the average error, the recall and the precision are printed for comparison. P.S.: The original dataset was downloaded from kaggle at https://www.kaggle.com/ludobenistant/hr-analytics/downloads/human-resources-analytics.zip.
Clone the repository:
[email protected]:tuliorc/hr-analysis.git
Go into your new local repository:
cd hr-analysis
Make sure you have R installed in your computer:
R --version
In case you don't, install it:
sudo apt-get update
sudo apt-get install r-base
For other Operational Systems, follow the instructions found in the links below:
Then, execute the main file script.R, either by running it in RStudio or terminal.
- Try to run, at first, the first block of code independently. You may need to run install.packages() specifying the packages that you still don't have in your computer. Both RStudio and Terminal are going to notify you about what is missing.
- Then, run the second and third blocks of code. You may again be asked to install some missing packages.
- After that, you can run the fourth to sixth blocks of code. These will only create the model functions and no trouble should be caused.
- Now, you're able to run the seventh (and last) block of code. Here you can make some experimentations! Feel free to change and adapt parameters to what you are curious about. By chunking the script as above, it will be easier to follow and understand what's going on!