#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""

load and and plot multi objective results from Sferes 2 optimisation 


Copyright (c) 2013 Guillaume VIEJO. All rights reserved.
"""

import sys
import os
from optparse import OptionParser
import numpy as np

sys.path.append("../src")
from fonctions import *

from Models import *

from matplotlib import *
from pylab import *

from Sferes import pareto
from itertools import *

# -----------------------------------
# ARGUMENT MANAGER
# -----------------------------------
if not sys.argv[1:]:
    sys.stdout.write("Sorry: you must specify at least 1 argument")
    sys.stdout.write("More help avalaible with -h or --help option")
    sys.exit(0)
parser = OptionParser()
parser.add_option("-i", "--input", action="store", help="The name of the directory to load", default=False)
parser.add_option("-m", "--model", action="store", help="The name of the model to test \n If none is provided, all files are loaded", default=False)
parser.add_option("-o", "--output", action="store", help="The output file of best parameters to test", default=False)
(options, args) = parser.parse_args()
# -----------------------------------

# -----------------------------------
# LOADING DATA
# -----------------------------------
front = pareto(options.input, case = 'meg')

# front.showBrute()
front.constructParetoFrontier('r2') # 'r2', 'bic', 'aic' , 'log'
front.removeIndivDoublons()
front.constructMixedParetoFrontier()
front.rankDistance()
front.rankOWA()
front.rankTchebytchev()
front.retrieveRanking()
front.timeConversion()
front.preview()
show()

with open("parameters_meg.pickle", 'wb') as f:
	pickle.dump(front.p_test, f)

with open("timing_meg.pickle", 'wb') as f:
	pickle.dump(front.timing, f)













416be9dcbf419bfcaf4150a54b19d131340080bb
<mask token>

<mask token>
sys.path.append('../src')
<mask token>
if not sys.argv[1:]:
    sys.stdout.write('Sorry: you must specify at least 1 argument')
    sys.stdout.write('More help avalaible with -h or --help option')
    sys.exit(0)
<mask token>
parser.add_option('-i', '--input', action='store', help=
    'The name of the directory to load', default=False)
parser.add_option('-m', '--model', action='store', help=
    """The name of the model to test 
 If none is provided, all files are loaded"""
    , default=False)
parser.add_option('-o', '--output', action='store', help=
    'The output file of best parameters to test', default=False)
<mask token>
front.constructParetoFrontier('r2')
front.removeIndivDoublons()
front.constructMixedParetoFrontier()
front.rankDistance()
front.rankOWA()
front.rankTchebytchev()
front.retrieveRanking()
front.timeConversion()
front.preview()
show()
with open('parameters_meg.pickle', 'wb') as f:
    pickle.dump(front.p_test, f)
with open('timing_meg.pickle', 'wb') as f:
    pickle.dump(front.timing, f)

<mask token>
sys.path.append('../src')
<mask token>
if not sys.argv[1:]:
    sys.stdout.write('Sorry: you must specify at least 1 argument')
    sys.stdout.write('More help avalaible with -h or --help option')
    sys.exit(0)
parser = OptionParser()
parser.add_option('-i', '--input', action='store', help=
    'The name of the directory to load', default=False)
parser.add_option('-m', '--model', action='store', help=
    """The name of the model to test 
 If none is provided, all files are loaded"""
    , default=False)
parser.add_option('-o', '--output', action='store', help=
    'The output file of best parameters to test', default=False)
options, args = parser.parse_args()
front = pareto(options.input, case='meg')
front.constructParetoFrontier('r2')
front.removeIndivDoublons()
front.constructMixedParetoFrontier()
front.rankDistance()
front.rankOWA()
front.rankTchebytchev()
front.retrieveRanking()
front.timeConversion()
front.preview()
show()
with open('parameters_meg.pickle', 'wb') as f:
    pickle.dump(front.p_test, f)
with open('timing_meg.pickle', 'wb') as f:
    pickle.dump(front.timing, f)

<mask token>
import sys
import os
from optparse import OptionParser
import numpy as np
sys.path.append('../src')
from fonctions import *
from Models import *
from matplotlib import *
from pylab import *
from Sferes import pareto
from itertools import *
if not sys.argv[1:]:
    sys.stdout.write('Sorry: you must specify at least 1 argument')
    sys.stdout.write('More help avalaible with -h or --help option')
    sys.exit(0)
parser = OptionParser()
parser.add_option('-i', '--input', action='store', help=
    'The name of the directory to load', default=False)
parser.add_option('-m', '--model', action='store', help=
    """The name of the model to test 
 If none is provided, all files are loaded"""
    , default=False)
parser.add_option('-o', '--output', action='store', help=
    'The output file of best parameters to test', default=False)
options, args = parser.parse_args()
front = pareto(options.input, case='meg')
front.constructParetoFrontier('r2')
front.removeIndivDoublons()
front.constructMixedParetoFrontier()
front.rankDistance()
front.rankOWA()
front.rankTchebytchev()
front.retrieveRanking()
front.timeConversion()
front.preview()
show()
with open('parameters_meg.pickle', 'wb') as f:
    pickle.dump(front.p_test, f)
with open('timing_meg.pickle', 'wb') as f:
    pickle.dump(front.timing, f)

#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""

load and and plot multi objective results from Sferes 2 optimisation 


Copyright (c) 2013 Guillaume VIEJO. All rights reserved.
"""

import sys
import os
from optparse import OptionParser
import numpy as np

sys.path.append("../src")
from fonctions import *

from Models import *

from matplotlib import *
from pylab import *

from Sferes import pareto
from itertools import *

# -----------------------------------
# ARGUMENT MANAGER
# -----------------------------------
if not sys.argv[1:]:
    sys.stdout.write("Sorry: you must specify at least 1 argument")
    sys.stdout.write("More help avalaible with -h or --help option")
    sys.exit(0)
parser = OptionParser()
parser.add_option("-i", "--input", action="store", help="The name of the directory to load", default=False)
parser.add_option("-m", "--model", action="store", help="The name of the model to test \n If none is provided, all files are loaded", default=False)
parser.add_option("-o", "--output", action="store", help="The output file of best parameters to test", default=False)
(options, args) = parser.parse_args()
# -----------------------------------

# -----------------------------------
# LOADING DATA
# -----------------------------------
front = pareto(options.input, case = 'meg')

# front.showBrute()
front.constructParetoFrontier('r2') # 'r2', 'bic', 'aic' , 'log'
front.removeIndivDoublons()
front.constructMixedParetoFrontier()
front.rankDistance()
front.rankOWA()
front.rankTchebytchev()
front.retrieveRanking()
front.timeConversion()
front.preview()
show()

with open("parameters_meg.pickle", 'wb') as f:
	pickle.dump(front.p_test, f)

with open("timing_meg.pickle", 'wb') as f:
	pickle.dump(front.timing, f)












