本文整理匯總了Python中Detector.Detector.gridSearchSingleSet方法的典型用法代碼示例。如果您正苦於以下問題:Python Detector.gridSearchSingleSet方法的具體用法?Python Detector.gridSearchSingleSet怎麽用?Python Detector.gridSearchSingleSet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Detector.Detector
的用法示例。
在下文中一共展示了Detector.gridSearchSingleSet方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Smit
# 需要導入模塊: from Detector import Detector [as 別名]
# 或者: from Detector.Detector import gridSearchSingleSet [as 別名]
from Detector import Detector
__author__ = 'Rik Smit ([email protected])'
projectDirectory = '/home/rik-target/owncloud-rixmit/Studie/Droneproject/dataset/cows/'
datasetIds = [
'DJI_0005_cut_233-244',
'DJI_0007_cut_22-65',
'DJI_0081'
]
detector = Detector(projectDirectory, datasetIds)
detector.featureType = 'HSV-HIST'
detector.classifierType = 'SVM-RBF'
datasetIdx = 0 # used for interset (which set is tested on
parameterOptions = { # lists of different classifier parameters values that should be tested
'C': [1, 2, 3, 4, 5, 8, 16, 32, 64, 128, 256],
'gamma': [0.1, 1, 10, 100, 1000],
'n_neighbors': [1, 2, 3, 4, 5, 10]
}
# singleset test
detector.gridSearchSingleSet(parameters=parameterOptions, datasetIdx=datasetIdx)
# crossset test
detector.gridSearch(parameters=parameterOptions)