miranov25 / RootInteractive

4 stars 12 forks source link

Linear fitter on the client #325

Closed pl0xz0rz closed 1 year ago

pl0xz0rz commented 1 year ago

This PR adds linear regression on the client to RootInteractive.

This PR also:

This isn't finished, and some features are missing:

How to use

parameterArray = [
    {"name": "predictors", "value":["X1","X2"], "options":["X1", "X2", "X3",  "Custom"]}
]
jsFunctionArray = [
    {
        "name": "fitterY",
        "type": "linearFit",
        "varX": "predictors",
        "varY": "Y",
        "alpha": 1,
       "weights":"W",
       "source": None # If using the main source for fitting, this is optional
    }
]
aliasArray = [
    {
        "name": "YPred",
        "variables": "predictors",
        "transform": "fitterY"
    }
]
widgetParams=[
    ['multiSelect', ["predictors"]]
]

EDIT: Ridge regression and weights are working now

miranov25 commented 1 year ago

Test failed in the


ERROR test_ClientSideJoin.py - ValueError: Integers to negative integer powers are not allowed.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================== 8 warnings, 1 error in 13.27s ===========================================================================================```
miranov25 commented 1 year ago

Observations: In some tests looks like callbacks are broken, histograms do not react to changes in selection.

Problem looks to be there only for some dashboards.

miranov25 commented 1 year ago

Tests formally passed

============================================================================================ 37 passed, 8 warnings in 190.35s (0:03:10) ==========================================================================================

miranov25 commented 1 year ago

Above reported problems with callback for some dashboards

miranov25 commented 1 year ago

The test on Linux test servers at GSI can not be done. Farm should be back next week. Will we wait or do we merge?

miranov25 commented 1 year ago

Tests are OK

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
-------------------------------------------------------------------------------------------------------------- JSON report ---------------------------------------------------------------------------------------------------------------
report saved to: test6.json
=============================================================================================== 37 passed, 11 warnings in 87.74s (0:01:27) ===============================================================================================
miranov25 commented 1 year ago

predictRFStat - Working also in realistic use case