Commit c5bf5686 authored by matjaz's avatar matjaz

CrossBee: New widgets for outlier detection and outlier heurisitcs functionality

parent a7031776
This diff is collapsed.
......@@ -5,19 +5,9 @@
from import_dotnet import *
from serialization_utils import *
def crossbee_get_vocabulary(inputDict):
_bow = ToNetObj(inputDict['bow'])
_startIndex = ToInt(inputDict['startIndex'])
_maxWords = ToInt(inputDict['maxWords'])
execResult = CrossBeeIntf.GetVocabulary(_bow, _startIndex, _maxWords)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['vocabulary'] = execResultPy
return outputDict
def crossbee_construct_standard_heurisitc(inputDict):
_name = ToString(inputDict['name'])
_heurisitcSpec = ToEnum(CrossBeeInterfaces.StandardHeurisitc.Specification, inputDict['heurisitcSpec'], CrossBeeInterfaces.StandardHeurisitc.Specification.random)
_heurisitcSpec = ToEnum(CrossBeeInterfaces.Heurisitcs.StandardHeurisitc.Specification, inputDict['heurisitcSpec'], CrossBeeInterfaces.Heurisitcs.StandardHeurisitc.Specification.random)
execResult = CrossBeeIntf.ConstructStandardHeurisitc(_name, _heurisitcSpec)
execResultPy = ToPyObj(execResult)
outputDict = {}
......@@ -43,7 +33,7 @@ def crossbee_construct_outlier_heuristics(inputDict):
def crossbee_construct_calculated_heuristics(inputDict):
_name = ToString(inputDict['name'])
_calc = ToEnum(CrossBeeInterfaces.CalculatedHeustistic.Calculation, inputDict['calc'], CrossBeeInterfaces.CalculatedHeustistic.Calculation.Sum)
_calc = ToEnum(CrossBeeInterfaces.Heurisitcs.CalculatedHeustistic.Calculation, inputDict['calc'], CrossBeeInterfaces.Heurisitcs.CalculatedHeustistic.Calculation.Sum)
_heuristics = ToNetObj(inputDict['heuristics'])
execResult = CrossBeeIntf.ConstructCalculatedHeuristics(_name, _calc, _heuristics)
execResultPy = ToPyObj(execResult)
......@@ -84,3 +74,47 @@ def crossbee_get_heuristic_structure(inputDict):
outputDict['structure'] = execResultPy
return outputDict
def crossbee_load_outlier_heuristics(inputDict):
_namePrefix = ToString(inputDict['namePrefix'])
_specification = ToString(inputDict['specification'])
_relative = ToBool(inputDict['relative'])
execResult = CrossBeeIntf.LoadOutlierHeuristics(_namePrefix, _specification, _relative)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['newHeurisitcs'] = execResultPy
return outputDict
def crossbee_outlier_heuristics_spec(inputDict):
_heuristics = ToNetObj(inputDict['heuristics'])
execResult = CrossBeeIntf.OutlierHeuristicsSpec(_heuristics)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['specification'] = execResultPy
return outputDict
def crossbee_outlier_detection_via_cross_validation(inputDict):
_csf = ToNetObj(inputDict['csf'])
_ds = ToNetObj(inputDict['ds'])
_repetitionCount = ToInt(inputDict['repetitionCount'])
_outlierThreshold = ToInt(inputDict['outlierThreshold'])
_numOfSets = ToInt(inputDict['numOfSets'])
_random = ToBool(inputDict['random'])
_useSeed = ToBool(inputDict['useSeed'])
_randomSeed = ToInt(inputDict['randomSeed'])
_outlierWeighting = ToEnum(CrossBeeInterfaces.CrossBeeIntf.OutlierWeighting, inputDict['outlierWeighting'], CrossBeeInterfaces.CrossBeeIntf.OutlierWeighting.RelativePercentage)
execResult = CrossBeeIntf.OutlierDetectionViaCrossValidation(_csf, _ds, _repetitionCount, _outlierThreshold, _numOfSets, _random, _useSeed, _randomSeed, _outlierWeighting)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['out'] = execResultPy
return outputDict
def crossbee_get_vocabulary(inputDict):
_bow = ToNetObj(inputDict['bow'])
_startIndex = ToInt(inputDict['startIndex'])
_maxWords = ToInt(inputDict['maxWords'])
execResult = CrossBeeIntf.GetVocabulary(_bow, _startIndex, _maxWords)
execResultPy = ToPyObj(execResult)
outputDict = {}
outputDict['vocabulary'] = execResultPy
return outputDict
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment