У меня есть данные об использовании процессора aws, которые NAB использовала для создания обнаружения аномалий с помощью AWS-SageMaker Random Cut Forest. Я могу выполнить это, но мне нужно более глубокое решение для настройки гиперпараметров. Я просмотрел документацию по AWS, но мне нужно понять выбор гиперпараметров. являются ли параметры обоснованным предположением или нужно ли нам вычислить среднее значение co_disp и стандартное отклонение, чтобы вывести параметры.
Заранее спасибо.
Я пробовал 100 деревьев и 512/256 tree_size для обнаружения аномалий, но как определить эти параметры
# Set tree parameters
num_trees = 50
shingle_size = 48
tree_size = 512
# Create a forest of empty trees
forest = []
for _ in range(num_trees):
tree = rrcf.RCTree()
forest.append(tree)
# Use the "shingle" generator to create rolling window
#temp_data represents my aws_cpuutilization data
points = rrcf.shingle(temp_data, size=shingle_size)
# Create a dict to store anomaly score of each point
avg_codisp = {}
# For each shingle...
for index, point in enumerate(points):
# For each tree in the forest...
for tree in forest:
# If tree is above permitted size, drop the oldest point (FIFO)
if len(tree.leaves) > tree_size:
tree.forget_point(index - tree_size)
# Insert the new point into the tree
tree.insert_point(point, index=index)
"""Compute codisp on the new point and take the average among all
trees"""
if not index in avg_codisp:
avg_codisp[index] = 0
avg_codisp[index] += tree.codisp(index) / num_trees
values =[]
for key,value in avg_codisp.items():
values.append(value)