1
0
Fork
You've already forked stacksurvey
0
Linear regression analysis of wages (=y) and years of experience (=x) for common jobs involving a specified programming language.
  • Jupyter Notebook 100%
Find a file
2025年04月30日 22:27:07 -07:00
images Updated README and images for logarithmic regression. 2025年04月30日 22:27:07 -07:00
README.md Updated README and images for logarithmic regression. 2025年04月30日 22:27:07 -07:00
stackoverflow-survey.ipynb Rewrote evaluation for logarithmic regression. 2025年04月30日 22:27:07 -07:00

stacksurvey

stacksurvey is an exploration and analysis of data from StackOverflow's developer survey of 2024.

https://survey.stackoverflow.co/2024/

The motivation for project is satisfying a class assignment. Eventually, an interesting (enough) topic was discovered in the data set:

What is the annual compensation (y) over years of experience (x) of developers who use a programming language from a specific country?

Requirements

numpy pandas sklearn matplotlib seaborn

Summary of Analysis

The models generated by the notebook become less reliable with years of experience greater than 10 or annual incomes greater than 200,000ドル.

Each chart has a red line for the logarithmic regression and a cyan line which is the derivative of the regression line.

C

graph of c programmers

+----------------------+
red log regression line for C
coefficient = 20734.28
intercept = 83648.77
rmse = 17490.15
r2 score = 0.75
sample predictions:
[[ 98020.67915334]
[106427.70806024]
[106427.70806024]]
+----------------------+

C developers have an income starting around 83,648ドル.77. The model can be off by 17,490ドル.15. With an r2 score of 0.75, the model can make good predictions.

Python

graph of python programmers

+----------------------+
red log regression line for Python
coefficient = 28995.42
intercept = 91543.33
rmse = 30814.08
r2 score = 0.65
sample predictions:
[[123398.04864925]
[123398.04864925]
[131739.51024811]]
+----------------------+

Python developers have an income starting around 91,543ドル.33. The model can be off by 30,814ドル.08. With an r2 score of 0.65, the model can also make good predictions but not as well with C developers.

Acknowledgements

"Udacity AI" (ChatGPT), the idea to transform x values to appropriate a linear regression into a logarithmic regression.