Closed Joseph-Rance closed 4 years ago
I think we have decided that we're just gonna do the machine learning in the browser in js. Iv'e been looking around and found this: https://medium.com/tensorflow/introducing-tensorflow-js-machine-learning-in-javascript-bf3eab376db. Im not entirely sure (bc the article doesn't go into loads of detail) but it seems like I can train a model in python with keras and then save it to a file that can then be used (and retrained, which is really important) in js. I recommend reading the article linked to make sure I have understood this correctly.
The main idea behind the ML part will be to have a GAN like structure where there is a main generator network that picks the revision times. The cost for this network is then a weighed average of the amount of time revising (this could be time taken transformed by a graph that looks a bit like a leaky ReLu, moved to the right so the change of direction point is where they said they wanted to revise) and a discriminator network that predicts the grades based on past tests and the revision time generated and then compares it to the grades the user is aiming for. The generator and discriminator could be initially trained on randomly generated data with a logarithmic-like relationship between revision rime and days, weighted by previous scores. The model can then retrain on what the actual scores are so it can retain to tailor the experience for each person (how can I save the weights etc for this?).
Ok change of plan. I think this would be a better format for the ML:
I think we have pretty much decided how this is going to work.
Ok so I think we need to make a decision on this so I can actually get started on the Machine Learning.
As I said on the discord (I'm not gonna explain the whole model again - maybe i'll comment the discord message here when I can get to it) it would be good to use a slightly more complex model so we can take advantage of a GAN. However, implementing this model in keras is enough - I'm not gonna be doing it without tf.keras.
I am not 100% sure about how Pratyaksh's stuff all works but I gather that we have these options:
Have a second server with python running on it and then send the data to that from either the rust server or the website. This is my preferred option bc then I can use tf.keras in python, so I can guarantee that we will get a good ml model. Also, it compartmentalises the ml part of the website nicely which makes everything nicer to work with.
alternatively I could write the program with tf.keras in js. I can't guarantee that it will work/arrive on time with this one, however, as I have never used js for ml.
lastly, we could use azure. I think we could do everything we need with a free trial and it would be quite easy to do and then add an api. However, me may only have a short time we can use the free trial so I don't think we should do this,
For me the first option is by far the best, but Pratyaksh would have to agree that it is possible to do that.
If there are any more possibilities, plz let me know as well
requirements: