I required help in regard to the next step. Currently, the project is to figure out the best result from the three models, which were linear, logarithmic linear regression, and KNN. After the preprocessing step (Deleting null, empty, and etc) I decided to test it with the library I created. Currently, I do not have time to clean the code.
For the current context, the independent features are everything except "Pengeluaran Riil Per Kapita"
https://hastebin.com/share/didagupami.python
For these couple of weeks, I ignored MAE, MSE, and only focused on the r2. In the nutshell, with the original data, (no feature selection), the result goes as follows:
linear reg: 0.0019379825785782456
log lin reg: -0.138491503196299
KNN: 0.07097272631083451 (k=60)
After that, I decided to do this:
This part of the script deletes any independent feature that has correlation below or equal i with another independent feature, whislt j independent feature with dependent feature
https://hastebin.com/share/roveparote.python
I decided to turn the features to log and deleting it, the best result goes as follow
linear reg r2: 0.00193798257857825 (at i = 1 && -0.08)
log lin reg r2: -0.137177331469033 (at i = 1&&j=-0.07)
knn r2: 0.0709727263108345 (at i=1 && j=-0.07)
Which, you can see. r2 decreased
At this point, I thought the current variable is incorrect because I deleted based on log, whilst some feature aren't skewed and some are. Hence, I decided that the best method is to correlate matrix on the original data (the untitled one) and babysit it instead of deleting correlation based on the value i and j. Hence, this script:.
https://hastebin.com/share/jigimuleqi.python
The result goes as the table shown. The linear gets better, but knn resulted with lower rate, and decreased KNN. After this post, I heed my teacher's suggestion and will add SVM. But, as time goes on, I don't know, and deemed the result would still low. Hence, I requested your recommendation for the next step.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.