Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
doug919 committed Feb 13, 2015
2 parents 9f5e9a2 + 252450c commit e3c1fce
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ Python modules for analyzing LJ40K emotion data
```python
>> from feelit.features import Learning
>> learner = Learning(verbose=args.verbose, debug=args.debug)
>> learner.set(X_train, y_train, feature_name)
>>
>> scores = {}
>> for C in Cs:
>> for gamma in gammas:
>> score = learner.kFold(kfolder, classifier='SVM',
>> kernel='rbf', prob=False,
>> C=c, scaling=True, gamma=gamma)
>> scores.update({(c, gamma): score})
>>
>> learner.set(X_train, y_train, feature_name)
>>
>> scores = {}
>> for C in Cs:
>> for gamma in gammas:
>> score = learner.kFold(kfolder, classifier='SVM',
>> kernel='rbf', prob=False,
>> C=c, scaling=True, gamma=gamma)
>> scores.update({(c, gamma): score})
>>
>> best_C, best_gamma = max(scores.iteritems(), key=operator.itemgetter(1))[0]
>> learner.train(classifier='SVM', kernel='rbf', prob=True, C=best_C, gamma=best_gamma,
>> scaling=True, random_state=np.random.RandomState(0))
Expand Down

0 comments on commit e3c1fce

Please sign in to comment.