diviyank / CausalDiscoveryToolbox

8 stars 5 forks source link

CAM Linear #1

Closed manonromain closed 4 years ago

manonromain commented 4 years ago

Hi!

I'm working with CAM and the linear score which I need doesn't work... Running:

from cdt.causality.graph import CAM
X = np.random.random((1000, 30))
df = pd.DataFrame(X)
obj = CAM(score="linear")
output = obj.predict(df)

produces the error:

R Process Error Output 
-----------------------
Le chargement a nécessité le package : glmnet
Le chargement a nécessité le package : Matrix
Loaded glmnet 4.0-2
Le chargement a nécessité le package : mboost
Le chargement a nécessité le package : parallel
Le chargement a nécessité le package : stabs
This is mboost 2.9-3. See ‘package?mboost’ and ‘news(package  = "mboost")’
for a complete list of changes.

Attachement du package : ‘mboost’

The following object is masked from ‘package:glmnet’:

    Cindex

Le chargement a nécessité le package : mgcv
Le chargement a nécessité le package : nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
Warning message:
replacing previous import ‘glmnet::Cindex’ by ‘mboost::Cindex’ when loading ‘CAM’ 
Error in scoreUpdate - scoreNodes[j] : 
  argument non numérique pour un opérateur binaire
Calls: CAM -> updateScoreMat
De plus : Warning message:
In mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule,  :
  all scheduled cores encountered errors in user code
Exécution arrêtée

Leaving the default score ie "non-linear" works tho.

I'm working with version 0.5.21.

Thanks for your help!

Otherwise, the package is great, thank you very much!!

diviyank commented 4 years ago

Hello,

Thanks for noticing this! I'll look into it ! (i'll transfer the issue to the main repo)

Best, Diviyan

manonromain commented 4 years ago

I posted the same message on the other repo :)

diviyank commented 4 years ago

Ah! great, I'll close this one then :) !