Skip to content

[TimeSeries Explanation] Score is NaN #5274

Description

@lisahua

System information

  • OS version/distro: .Net 4.8
  • .NET Version (eg., dotnet --info): ML.Net 1.5.0

Issue

  • What did you do? Invoke var prediction = this.mlContext.AnomalyDetection.LocalizeRootCause(input);
  • What happened? rootCauseItem.Score = double.NaN
  • What did you expect? Should return a meaningful score (either 0 or 1)

Source code / logs

Please paste or attach the code or logs or traces that would be helpful to diagnose the issue you are reporting.

string jsonString = ""{\"AnomalyTimestamp\":\"1997-05-19T00:00:00\",\"AnomalyDimension\":{\"__Sandbox.Categories.CategoryName__\":\"\"},\"Slices\":[{\"TimeStamp\":\"1997-05-19T00:00:00\",\"Points\":[{\"Value\":8995.35,\"ExpectedValue\":-120.28187410606782,\"IsAnomaly\":true,\"Dimension\":{\"__Sandbox.Categories.CategoryName__\":\"Beverages\"},\"Delta\":9115.6318741060677},{\"Value\":1282.02,\"ExpectedValue\":1374.808978001977,\"IsAnomaly\":false,\"Dimension\":{\"__Sandbox.Categories.CategoryName__\":\"Condiments\"},\"Delta\":-92.788978001977057},{\"Value\":1686.7,\"ExpectedValue\":2014.8946291211198,\"IsAnomaly\":false,\"Dimension\":{\"__Sandbox.Categories.CategoryName__\":\"Confections\"},\"Delta\":-328.19462912111976},{\"Value\":174.15,\"ExpectedValue\":215.02809847811903,\"IsAnomaly\":false,\"Dimension\":{\"__Sandbox.Categories.CategoryName__\":\"Dairy Products\"},\"Delta\":-40.878098478119028},{\"Value\":12138.22,\"ExpectedValue\":9066.203,\"IsAnomaly\":true,\"Dimension\":{\"__Sandbox.Categories.CategoryName__\":\"\"},\"Delta\
":3072.017}]}],\"AggregateType\":0,\"AggregateSymbol\":\"\"}"
";
var input = JsonConvert.DeserializeObject<RootCauseLocalizationInput>(jsonString); // using Newtonsoft.Json
var prediction = this.mlContext.AnomalyDetection.LocalizeRootCause(input);

The input is like:

{
	"AnomalyTimestamp": "1997-05-19T00:00:00",
	"AnomalyDimension": {
		"__Sandbox.Categories.CategoryName__": ""
	},
	"Slices": [
		{
			"TimeStamp": "1997-05-19T00:00:00",
			"Points": [
				{
					"Value": 8995.35,
					"ExpectedValue": -120.28187410606782,
					"IsAnomaly": true,
					"Dimension": {
						"__Sandbox.Categories.CategoryName__": "Beverages"
					},
					"Delta": 9115.631874106068
				},
				{
					"Value": 1282.02,
					"ExpectedValue": 1374.808978001977,
					"IsAnomaly": false,
					"Dimension": {
						"__Sandbox.Categories.CategoryName__": "Condiments"
					},
					"Delta": -92.78897800197706
				},
				{
					"Value": 1686.7,
					"ExpectedValue": 2014.8946291211199,
					"IsAnomaly": false,
					"Dimension": {
						"__Sandbox.Categories.CategoryName__": "Confections"
					},
					"Delta": -328.19462912111978
				},
				{
					"Value": 174.15,
					"ExpectedValue": 215.02809847811904,
					"IsAnomaly": false,
					"Dimension": {
						"__Sandbox.Categories.CategoryName__": "Dairy Products"
					},
					"Delta": -40.87809847811903
				},
				{
					"Value": 12138.22,
					"ExpectedValue": 9066.203,
					"IsAnomaly": true,
					"Dimension": {
						"__Sandbox.Categories.CategoryName__": ""
					},
					"Delta": 3072.017
				}
			]
		}
	],
	"AggregateType": 0,
	"AggregateSymbol": ""
}

And the output:

{
	"Items": [
		{
			"Score": "NaN",
			"Path": [
				"__Sandbox.Categories.CategoryName__"
			],
			"Dimension": {
				"__Sandbox.Categories.CategoryName__": "Beverages"
			},
			"Direction": 0
		}
	]
}

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions