Commit 415dcfc6 authored by Chanelle Lee's avatar Chanelle Lee
Browse files

Working on alpha and sigma choice analysis

parent 454cef7c
......@@ -98,6 +98,52 @@
"plt.plot(ss, confusions)"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x9d2ec50>]"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAGSBJREFUeJzt3X2QXXd93/H39z7s82pXD6vnlVe2ZWxBbWwW4+IGHGwm9kAlOobUTmkNdaKhRYWETFu3dNypaWYCzSTNTJ1OVOJAG0AQwzTCI2ISQppCJ0YrsEEPGBRZtlaPq4dd7dN9/vaPe+/q7t272ivp7h6dcz+vmZ0959zfPed7Lfvjr37n3HPM3RERkWiJBV2AiIg0nsJdRCSCFO4iIhGkcBcRiSCFu4hIBCncRUQiSOEuIhJBCncRkQhSuIuIRFAiqAOvWrXKBwYGgjq8iEgo7d+//5y79y00LrBwHxgYYGhoKKjDi4iEkpm9Xs84TcuIiESQwl1EJIIU7iIiEVRXuJvZw2b2qpkdMbOnarz+ETMbMbOXSz+/2vhSRUSkXgueUDWzOPAs8F5gGNhnZnvc/VDV0K+6+85FqFFERK5SPZ37vcARdz/q7hlgN7B9ccsSEZHrUU+4bwCOV6wPl7ZVe9TMfmxmz5tZf60dmdkOMxsys6GRkZFrKFdEROpRz3XuVmNb9bP5vgl8xd3TZvYx4IvAe+a8yX0XsAtgcHBQz/cTaWLuTsEhX3AKXv4prrt7aTszr+ULTqFQXM97eQwzr7lDvryfqvfizFr30rLPbLtcj1O5XjymUx5fuV+g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GAcJW7jX87DuSDEzozgXe9jdfzfoehabu/87d9/o7gMU/3z/yt0j3dG5+2nguJm9qbTpQeBQgCUthTeA+8yso/Tv+INE/CRyhT3AE6XlJ4A/W4yD1PUM1RvFfA/rDrisxXY/8E+Bn5jZy6Vt/770XFuJjn8FfKnUtBwFPhpwPYvK3V8ys+eBH1K8IuxHRPCbqmb2FeABYJWZDQP/Efht4Gtm9iTF/8ktyvOn9Q1VEZEICtu0jIiI1EHhLiISQQp3EZEIUriLiESQwl1EJIIU7iIiEaRwFxGJIIW7iEgE/X/Qgi0cjnH1kAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"ss = np.linspace(0.0000001, 10, 1000)\n",
"confusions = [probConfusion(1, 2, s)[0] for s in ss]\n",
"plt.plot(ss, confusions)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ss = np.linspace(0.0000001, 10, 1000)\n",
"confusions = [[probConfusion(1, j, s)[0] for s in ss] for j in [2, 3, 4, 5]]\n",
"for confusion in confusions:\n",
" plt.plot(ss, confusion)"
]
},
{
"cell_type": "code",
"execution_count": null,
......
%% Cell type:code id: tags:
``` python
import numpy as np
import scipy
import seaborn as sns
import matplotlib.pyplot as plt
```
%% Cell type:code id: tags:
``` python
def f(x, mu, s):
return scipy.stats.norm.pdf(x, loc=mu, scale=s)
```
%% Cell type:code id: tags:
``` python
def F(x, mu, s):
return scipy.stats.norm.cdf(x, loc=mu, scale=s)
```
%% Cell type:code id: tags:
``` python
qualities = {i: i/6 for i in range(1, 6)}
```
%% Cell type:code id: tags:
``` python
def integrand(x, i, j, s):
return f(x, qualities[i], s)*F(x, qualities[j], s)
def probConfusion(i, j, s):
return scipy.integrate.quad(integrand, -np.inf, np.inf, args=(i, j, s))
```
%% Cell type:code id: tags:
``` python
s0 = 0.0000001
sf = 100
ss = np.linspace(s0, sf, 1000)
confusions = [probConfusion(1, 2, s)[0] for s in ss]
```
%% Cell type:code id: tags:
``` python
plt.plot(ss, confusions)
```
%%%% Output: execute_result
[<matplotlib.lines.Line2D at 0x9cdc390>]
%%%% Output: display_data
[Hidden Image Output]
%% Cell type:code id: tags:
``` python
ss = np.linspace(0.0000001, 10, 1000)
confusions = [probConfusion(1, 2, s)[0] for s in ss]
plt.plot(ss, confusions)
```
%%%% Output: execute_result
[<matplotlib.lines.Line2D at 0x9d2ec50>]
%%%% Output: display_data
[Hidden Image Output]
%% Cell type:code id: tags:
``` python
ss = np.linspace(0.0000001, 10, 1000)
confusions = [[probConfusion(1, j, s)[0] for s in ss] for j in [2, 3, 4, 5]]
for confusion in confusions:
plt.plot(ss, confusion)
```
%% Cell type:code id: tags:
``` python
```
......
......@@ -4,7 +4,6 @@ import vrep
import time
import numpy as np
import sys
import subprocess
from ePucks import EPuckSim
from myThreads import ControllerThread
......@@ -15,33 +14,33 @@ logger = logging.getLogger(__name__)
def main(numSims=1):
logging.config.fileConfig('configuration.ini')
# Connect to V-REP
subprocess.call("")
clientID = vrep.simxStart('127.0.0.1', 19997, True, True, 5000, 5)
if clientID != -1:
logger.info('Connected to remote API server')
else:
logger.critical('Could not connect to streaming server')
time.sleep(5)
for i in range(0, numSims):
sretCode = vrep.simxStartSimulation(clientID, vrep.simx_opmode_oneshot)
if sretCode > 1:
logger.critical('Simulation not started! {}'.format(sretCode))
sys.exit('Could not start simulation {}'.format(sretCode))
time.sleep(5)
controllerJobs = start()
try:
while any([p.isAlive() for p in controllerJobs]):
time.sleep(1)
except BaseException as exc:
print('exception "{}" occurred'.format(type(exc)))
sys.exit(1)
time.sleep(5)
eretCode = vrep.simxStopSimulation(clientID, vrep.simx_opmode_oneshot)
if eretCode > 1:
logger.critical('Simulation not finished'
+ ' properly! {}'.format(eretCode))
sys.exit('Could not finish simulation {}'.format(eretCode))
time.sleep(240)
for noise in []
for i in range(0, numSims):
sretCode = vrep.simxStartSimulation(clientID, vrep.simx_opmode_oneshot)
if sretCode > 1:
logger.critical('Simulation not started! {}'.format(sretCode))
sys.exit('Could not start simulation {}'.format(sretCode))
time.sleep(5)
controllerJobs = start(noise)
try:
while any([p.isAlive() for p in controllerJobs]):
time.sleep(1)
except BaseException as exc:
print('exception "{}" occurred'.format(type(exc)))
sys.exit(1)
time.sleep(5)
eretCode = vrep.simxStopSimulation(clientID, vrep.simx_opmode_oneshot)
if eretCode > 1:
logger.critical('Simulation not finished'
+ ' properly! {}'.format(eretCode))
sys.exit('Could not finish simulation {}'.format(eretCode))
time.sleep(240)
def start(noise):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment