Index of /~meidanis/courses/mo810/2018s1/lectures/iris

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[   ]gen_xor.m 2018-04-03 18:20 176  
[TXT]iris_data.py 2018-04-03 18:20 3.0K 
[TXT]premade_estimator.py 2018-04-03 18:20 3.1K 
[TXT]xor_data.py 2018-04-03 18:20 2.8K 
[TXT]xor_estimator.py 2018-04-03 18:20 3.0K 
[TXT]xor_test.csv 2018-04-03 18:20 4.0K 
[TXT]xor_training.csv 2018-04-03 18:20 4.0K 

2018-03-28

Files in this directory

File Description
iris_data.py From TensorFlow IRIS Tutorial.
premade_estimator.py From TensorFlow IRIS Tutorial.
xor_data.py Adaptation of iris_data.py to learn XOR.
xor_estimator.py Adaptation of premade_estimator.py to learn XOR.
gen_xor.m Matlab/Ocatve file to generate data for XOR.
xor_training.csv Training dataset for XOR.
xor_test.csv Test dataset for XOR.

Be aware that, when running these codes, directories will be created to store the models. An 'iris' directory will be created by the IRIS scripts, and a 'xor directory will be created by the XOR scripts. These directories can be used with TensorBoard.

The data generation for the XOR function was as follows: first, a vector x1 of 100 random values 0 or 1 was generated. Then, a similar x2 vector was generated. A label vector y = xor(x1, x2) was then produced. Finally, two noise vectors, n1 and n2, were filled with normally distributed random values with mean 0.0 and standard deviatioin 0.1, and added to x1 and x2, respectively. A comma-separated output file is then written with x1+n1, x2+n2, and y.

Notice that the file generated by gen-xor.m needs to be edited to include a header line 'x1,x2,y'. The resulting training set file 'xor_training.csv' must be stored in the user's Keras cache directoty at ~/.keras/datasets/. A similar 'xor_test.csv' file must be produced, in much the same way, for testing purposes.