A project to show that an autonomous machine can contribute to mathematical discussion by generating appropriate examples in such a way that human participants appreciate, respond to and extend its contributions.
Code structure: follows the Good-Loop standard setup. Which is a js/react UI, and a Java server.
See the EgBot Maths Q&A blog post
The data is collected by @zero_point from mathstackexchange using Python scripts in the data-collection folder.
You are advised to get some snapshot data, rather than run these yourself.
Data should then be kept in the data\raw folder.
In G-Drive: "EgBot Data" (which has manually labeled data): https://drive.google.com/drive/u/0/folders/1K6US9Zy3WCJN0HKlCOejoT6cTnwBAlz-
We also have a Zenodo folder (which has the latest MathStackExchange dataset) https://zenodo.org/communities/egbot?page=1&size=20
- nvidia-driver-384 OR nvidia-driver-390
- python 3.5 -- e.g. add this to .bashrc to avoid Python 2 alias python='python3.5'
- pip3 8.1
- java 1.8
- com.winterwell.maths.stats.distributions.cond (restricted library)
Install required python packages using pip:
- tensorflow
- keras
- numpy
- OLD not needed anymore: jep
Install required Java jars using bob
Set the environment variables:
LD_PRELOAD path to your libpythonVERSION.so
LD_LIBRARY_PATH path to the jepVERSION.so
e.g. export LD_PRELOAD="$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libpython3.5m.so" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/python3.5/dist-packages:/home/irina/.local/lib/python3.5/site-packages"
-python 3.5
-pip 18.0
-cuda 9.0
-cudnn 7.0 <-- You will need an Nvidia developer login for this. Either create one or use existing one
-install required python packages listed in data-collection/train-lstm-requirements.txt using pip
-After installing cudnn , DO THIS : sudo ldconfig /usr/local/cuda/lib64
This is a test because only takes a small subset of the full data set:
- cd to data-collection/json-analysis and run python slimAndTrim.py (this should take the MSE-full data that you have and slim it down to MSE-100 with just 100 data points)
- you need to build egbot so run bob (because you'll need to make sure to have specific tf library)
- run EvaluationTest.java and it should run the Markov evaluation (first training on MSE-100 data and then evaluating using the MSE-20 data)
- the console should specify where it saved the results
- comment out test100Markov in EvaluationTest and uncomment test100LTSM
- cd to data-collection/build_graph and run python createLSTMGraphTF.py (this will create the graph needed to run LSTM training)
- run EvaluationTest.java again to evaluate LSTM (first it will train and then evaluate)
- the console should specify where it saved the results
- you need to build egbot so run bob (because you'll need to make sure to have specific tf library)
- run EvaluationTest.java and it should run the Markov evaluation
- the console should specify where it saved the results
- comment out testFullMarkov in EvaluationTest and uncomment testFullLTSM
- cd to data-collection/build_graph and run python createLSTMGraphTF.py (this will create the graph needed to run LSTM training)
- run EvaluationTest.java again to evaluate LSTM (first it will train and then evaluate)
- the console should specify where it saved the results