-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State/substate population baseline #275
Comments
Long version of what was already done. Step 1. I extracted Vic3 states data from its files. I have state pops (pop is target variable), state arable resources, capped resources, state region, state buildings, state terrains and number of coastal provinces. These are features I've tried feeding into Linear Regression model so far. In the end feeding only arable resources, fish and logging, and region, gives the best (most predictive) result so far. (I could try other features yet, such as state traits, impassibility, latitude, actual area of state, etc. I could also try more of what is called 'feature engineering'. I'll try them when I have time.) So this csv is an example of an input to the model. The equation I'll give you will also need input similar to this. Possible arable resource and region need to be multiplied by the state's arable land. |
Coefficients and intercept of equation (best one so far - better one will come if I manage to) is given here in json format. (seems github doesn't support json uploading, so I'll save as .txt, but it's actually json format) So the way to use it is you make your code generate something like this:
(The last one is called 'intercept', which is where your line crosses Y-axis. This one is not multiplied by anything.) So to use 1st entry in sample.csv above as an example, the equation would do
And this would be correct within 30% threshold. Here is the map of prediction results for 10%-50% thresholds btw old world prediction is way more reliable than new world. As you can see new world is mostly white and black. Code (Python) used to produce these maps and equation will be subsequently uploaded to my github. (give me a couple days to clean up) |
I did some linear regression on vanilla Vic3 data, to find that vanilla Vic3 population is mostly dictated by its potential food and logging resource, with a couple edge cases when the state is empire capital or being impassible in EU4.
So I have for you an equation for a baseline pop count a state/substate should have. This baseline can be further added/multiplied by factors such as development from EU4 save, being country capital, and more. This should allow you to better split population within same state between substates, and better distribute population across states too, while being physically plausible, and without being bound by vanilla Vic3 pop.
This is the intro of what this issue is about. I'll add more details and files later.
The text was updated successfully, but these errors were encountered: