<s> from . . scorer_model import ScorerModel <EOL> from . . svc import RBFSVC , SVC , LinearSVC <EOL> from . util import ( FEATURES , get_and_format_info , pickle_and_unpickle , <EOL> train_score ) <EOL> def test_svc ( ) : <EOL> model = SVC ( FEATURES ) <EOL> get_and_format_info ( model ) <EOL> train_score ( model ) <EOL> pickle_and_unpickle ( model ) <EOL> get_and_format_info ( model ) <EOL> model = SVC ( FEATURES , scale = True , center = True , balanced_sample = True ) <EOL> get_and_format_info ( model ) <EOL> train_score ( model ) <EOL> pickle_and_unpickle ( model ) <EOL> get_and_format_info ( model ) <EOL> config = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:test>' : { <EOL> '<STR_LIT:class>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] <EOL> } <EOL> } <EOL> } <EOL> model = ScorerModel . from_config ( config , '<STR_LIT:test>' ) <EOL> assert isinstance ( model , SVC ) <EOL> def test_linear_svc ( ) : <EOL> model = LinearSVC ( FEATURES ) <EOL> get_and_format_info ( model ) <EOL> train_score ( model ) <EOL> pickle_and_unpickle ( model ) <EOL> get_and_format_info ( model ) <EOL> config = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:test>' : { <EOL> '<STR_LIT:class>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] <EOL> } <EOL> } <EOL> } <EOL> model = ScorerModel . from_config ( config , '<STR_LIT:test>' ) <EOL> assert isinstance ( model , LinearSVC ) <EOL> def test_rbf_svc ( ) : <EOL> model = RBFSVC ( FEATURES ) <EOL> get_and_format_info ( model ) <EOL> train_score ( model ) <EOL> pickle_and_unpickle ( model ) <EOL> get_and_format_info ( model ) <EOL> config = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT:test>' : { <EOL> '<STR_LIT:class>' : "<STR_LIT>" , <EOL> '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] <EOL> } <EOL> } <EOL> } <EOL> model = ScorerModel . from_config ( config , '<STR_LIT:test>' ) <EOL> assert isinstance ( model , RBFSVC ) </s>
