Correlation between variables

Dear Experts

I wanted to study the correlation between a sets of variables. I followed an example. I have attached the macros for your kind information.

Thanking you
Kanhaiya Gupta


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


correlation.cpp (2.0 KB)

The statement “does not work” is not really useful.

What concerns ROOT … right after “t->GetEntry(i);” do you get proper values of “age”, “sex”, …, “charges”?
If yes, your problem is NOT related to ROOT.
If no, attach the output of: t->Print();

Thank you. I find the problem is:

root [0] #include <xtensor/xarray.hpp>

ROOT_prompt_0:1:10: fatal error: ‘xtensor/xarray.hpp’ file not found

#include <xtensor/xarray.hpp>

I followed the previous question. So I checked

root [6] .I

-I

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-ubuntu18-gcc74-opt/etc/

-I

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-ubuntu18-gcc74-opt/etc//cling

-I

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-ubuntu18-gcc74-opt/include/

-cxx-isystem

/usr/include/c++/7

-cxx-isystem

/usr/include/x86_64-linux-gnu/c++/7

-cxx-isystem

/usr/include/c++/7/backward

-isystem

/usr/local/include

-isystem

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-ubuntu18-gcc74-opt/etc//cling/lib/clang/5.0.0/include

-extern-c-isystem

/usr/include/x86_64-linux-gnu

-extern-c-isystem

/include

-extern-c-isystem

/usr/include

-I

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-ubuntu18-gcc74-opt/include

-resource-dir

/cvmfs/sft.cern.ch/lcg/app/releases/ROOT/6.20.00/x86_64-ubuntu18-gcc74-opt/etc//cling/lib/clang/5.0.0

-fmodule-cache-path

/tmp/org.llvm.clang.s6kagupt/ModuleCache

-nostdinc++

and I tried with

root [7] gSystem->AddIncludePath("/usr/local/include")

root [8] #include <xtensor/xarray.hpp>

ROOT_prompt_8:1:10: fatal error: ‘xtensor/xarray.hpp’ file not found

#include <xtensor/xarray.hpp>

**^~~~~~~~~~~~~~~~~~~~**

The “xtensor” is NOT a part of ROOT.
The error message is clear.
Apparently, it was not installed on your system. Maybe you need:
sudo apt-get install xtensor-dev

Thank you very much.