All Apps and Add-ons

How can I save a value and then use it to set a parameter in the Splunk MLTK?

monicamendoza95
New Member

As a simplified example, my data looks like this:

alt text

I would like to cluster my points with MLTK's DBSCAN, using radius for the eps parameter.
My radius column is the result of an eval function. All the rows have the same value.

I am trying to use this command:

… | fit DBSCAN eps=radius metric*

But I get this error:

Error in 'fit' command: Error while initializing algorithm "DBSCAN": Invalid value for eps: must be a float

Even though when I use isnum(radius) the result is TRUE

0 Karma

grana_splunk
Splunk Employee
Splunk Employee

Hi,

You need to specify eps=0.3 instead of eps=radius as eps accepts only numeric value

http://docs.splunk.com/Documentation/MLApp/2.3.0/User/Algorithms#DBSCAN

Let me know if this solves your issue.

Thanks,

0 Karma

monicamendoza95
New Member

Specifying eps=0.3 works.
However, my "radius" value is a result of previous data manipulation (I run several SPL commands beforehand to obtain that value). If I change my data source but run the same commands, "radius" will change. So for example, it could range from 0.1 to 1.0
This is why I would like to use a variable "radius," rather than a hard-coded number.

0 Karma
Get Updates on the Splunk Community!

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...

Unlock Instant Security Insights from Amazon S3 with Splunk Cloud — Try Federated ...

Availability: Must be on Splunk Cloud Platform version 10.1.2507.x to view the free trial banner. If you are ...