Changeset 840 for mystic


Ignore:
Timestamp:
10/27/15 11:21:32 (7 months ago)
Author:
mmckerns
Message:

moved svmtools to svr, svctools to svc; fixed VTR documentation

Location:
mystic
Files:
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • mystic/examples/test_svc1.py

    r839 r840  
    1212from numpy import * 
    1313import pylab 
    14 from mystic.svctools import * 
     14from mystic.svc import * 
    1515 
    1616# define the objective function to match standard QP solver 
  • mystic/examples/test_svc2.py

    r839 r840  
    1414from numpy import * 
    1515import pylab 
    16 from mystic.svctools import * 
     16from mystic.svc import * 
    1717import os.path 
    1818 
  • mystic/examples/test_svr1.py

    r839 r840  
    1212from numpy import * 
    1313import pylab 
    14 from mystic.svmtools import * 
     14from mystic.svr import * 
    1515 
    1616# define the objective function to match standard QP solver 
  • mystic/examples/test_svr2.py

    r839 r840  
    1212from numpy import * 
    1313import pylab 
    14 from mystic.svmtools import * 
     14from mystic.svr import * 
    1515 
    1616# define the objective function to match standard QP solver 
  • mystic/examples_other/qld_svc1.py

    r826 r840  
    1212import qld, quapro 
    1313import pylab 
    14 from mystic.svctools import * 
     14from mystic.svc import * 
    1515 
    1616def myshow(): 
  • mystic/examples_other/qld_svc2.py

    r826 r840  
    1414import qld, quapro 
    1515import pylab 
    16 from mystic.svctools import * 
     16from mystic.svc import * 
    1717import os.path, time 
    1818 
  • mystic/examples_other/qld_svr1.py

    r828 r840  
    1212import qld 
    1313import pylab 
    14 from mystic.svmtools import * 
     14from mystic.svr import * 
    1515 
    1616from mystic.tools import random_seed 
  • mystic/examples_other/qld_svr2.py

    r828 r840  
    1212import qld 
    1313import pylab 
    14 from mystic.svmtools import * 
     14from mystic.svr import * 
    1515 
    1616x = arange(-5, 5.001) 
  • mystic/mystic/svc.py

    r834 r840  
    5353If labels y are provided, then group indicies by label 
    5454    """ 
    55     import mystic.svmtools as svm 
    56     sv = svm.SupportVectors(alpha,eps) 
     55    import mystic.svr as svr 
     56    sv = svr.SupportVectors(alpha,eps) 
    5757    if y is None: 
    5858        return sv 
  • mystic/mystic/termination.py

    r826 r840  
    137137# Factories that give termination conditions 
    138138def VTR(tolerance=0.005, target=0.0): 
    139     """cost of last iteration is < tolerance: 
    140  
    141 cost[-1] <= tolerance""" 
     139    """cost of last iteration is < tolerance from target: 
     140 
     141abs(cost[-1] - target) <= tolerance""" 
    142142    doc = "VTR with %s" % {'tolerance':tolerance, 'target':target} 
    143143    def _VTR(inst, info=False): 
     
    262262def VTRChangeOverGeneration(ftol=0.005, gtol=1e-6, generations=30, target=0.0): 
    263263    """change in cost is < gtol over a number of generations, 
    264 or cost of last iteration is < ftol: 
    265  
    266 cost[-g] - cost[-1] <= gtol, where g=generations *or* cost[-1] <= ftol.""" 
     264or cost of last iteration is < ftol from target: 
     265 
     266cost[-g] - cost[-1] <= gtol *or* abs(cost[-1] - target) <= ftol.""" 
    267267    doc = "VTRChangeOverGeneration with %s" % {'ftol':ftol, 'gtol':gtol, 
    268268                                               'generations':generations, 
Note: See TracChangeset for help on using the changeset viewer.