Skip to content

Screen freeze #28

@bumbeishvili

Description

@bumbeishvili

I am not sure if this counts as an issue.

I have a fairly low, 12 data points (last 12 days covid19 new cases in Europe)

data = [
  {"x":1,"y":18539},{"x":2,"y":20695},{"x":3,"y":21848},
  {"x":4,"y":19121},{"x":5,"y":23501},{"x":6,"y":28724},
  {"x":7,"y":28061},{"x":8,"y":36222},{"x":9,"y":37756},
  {"x":10,"y":38212},{"x":11,"y":31629},{"x":12,"y":32282}
]

Screen Shot 2020-03-31 at 22 42 15

and I am trying to fit 3 order polynomial regression

polynomialRegression = d3.regressionPoly()
   .x(d => d.x)
   .y(d => d.y)
   .order(3);

And it freezes the screen indefinitely.

Here is an observable notebook where this issue is reproduced (just uncomment the first line)
https://observablehq.com/d/69dd1849304db49f

Question: Is it normal for this function to behave like this when we have such a small dataset?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions