I'm really happy that MHB could find a home here on PF! I have been a member here since I was in high school (I'm in my 30's now), and it definitely got me into forums and online communities in a way that I don't think I would have otherwise. PF is unique compared to the handful of other math...
I'm so happy that @anemone and @Euge continue on their great work here at PF. Seeing how many people just respond to this announcement makes me smile. A community needs members of all sorts to thrive - those who ask, those who help, those who coordinate, those who lurk. :smile: PF looks to have...
I would recommend not partitioning this way, although it's not a bad idea. I think it's most stable and more common to do it this way. I'd do it like this.
train_size = 0.8
train_end = int(len(df)*train_size)
df_train = df[:train_end]
df_test = df[train_end:]
Nice! The way I would check for better is for your test timeframe (not the training timeframe) take the predicted vs. actual for each day then average them across all days. Then you can use a number of metrics, but commonly Mean Absolute Error, Root Mean Squared Error, or Mean Absolute...
If you want to calculate the 200 day average you need 200 datapoints, so the first 199 rows won't have a value. For 7 day average, rows 1-6 won't. To deal with this usually we can start training the model after these values have had time to populate. You could start training your model in...
That really all depends on the scenario or the assignment. You could make a model for hour, daily, weekly, or monthly. Usually it would be hourly or daily though in my experience. If you are trying to forecast the stock price for tomorrow then I would try daily first.
You will need to make...
5 years isn't necessary but it's a good length. For annual time series models it's good to have at least 2 full years to observe the entire cycle multiple times. If you only have 6 months for example, it's very likely the model will not forecast well for the other 6 months of the year not seen...
Trying to forecast stock movement is the ultimate problem of financial markets. It isn't possible without some extreme niche scenario and proprietary data (in my opinions and from everyone I know who works in this field). This problem has some great qualities that we want when modeling: a huge...
I think so unfortunately. Here are the types that the JSON format can work with and it looks like pandas has default behavior to use int64 and float64. You could write a function to loop over your columns and column types and convert any int64 dtypes to int as well as float64 to float.
I had to look this up but I found a couple threads on StackExhange which reference this error and they both say that this is due to the int64 type. That is a numpy type, so the fix seems to be converting it to a Python int before dumping to JSON. I would try modifying your function to something...
This is not my speciality and I didn't really know about PUT before this question, but it seems that PUT is used to check if a resource exists and POST always creates a new resource. It also seems to me that repeated POST requests with the same payload will create new records each time, and PUT...
Hi karush!
Part of me wants this problem to be more complicated than it seems, but I agree with you that it should be (e). There are 32 valid options to choose from at random, so 1/32 of a single person being chosen from that pool.