All Apps and Add-ons

Exclude select data columns from Splunk algorithms

lancair
Observer

Question : I am trying to determine if it's possible to exclude selected columns of data from algorithm processing when running a search analysis in the search and reporting window. 

This would equate to using a python pandas dataframe and selecting the features you desire from the dataset to be processed or considered in the algorithm.

Example

index=firewall action="allowed" (host="myhost*")
transport="tcp"

-- Assumption: my data has 10 columns, but I only want to use 6 of them in the algorithm.

-- Problem:  Filter the columns to be used when executing the 1CSVM Algorithm. By default I believe Splunk is assuming I want to analyze all columns as features.

`comment("Fit Using 1CSVM Algorithm")`
| fit OneClassSVM * kernel="rbf" gamma=1 nu=.0001 shrinking=False | outputlookup compositeResults.csv append=true

 

Labels (2)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Perhaps the fields command will help.

 

index=firewall action="allowed" (host="myhost*") transport="tcp"
`comment("Exclude the fields we don't want considered by the algorithm")`
| fields - foo bar
`comment("Fit Using 1CSVM Algorithm")`
| fit OneClassSVM * kernel="rbf" gamma=1 nu=.0001 shrinking=False | outputlookup compositeResults.csv append=true

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...