rajatsen91 / ccit Goto Github PK
View Code? Open in Web Editor NEWClassifier Conditional Independence Test: A CI test that uses a binary classifier (XGBoost) for CI testing
Classifier Conditional Independence Test: A CI test that uses a binary classifier (XGBoost) for CI testing
In the function XGBOUT2, you have the following code:
num_samp = len(all_samples)
if bootstrap:
np.random.seed()
random.seed()
I = np.random.choice(num_samp, size=num_samp, replace=True)
samples = all_samples[I, :]
else:
samples = all_samples
Xtrain, Ytrain, Xtest, Ytest, CI_data = CI_sampler_conditional_kNN(
all_samples[:, Xcoords],
all_samples[:, Ycoords],
all_samples[:, Zcoords],
train_samp,
k,
)
You create the variable samples when bootstrap is True, but when you call the CI_sampler_conditional_kNN function, you use the variable all_samples. In my understanding, you should use the variable samples in this case. Am I right?
BTW, this is an excellent paper!
I tried running CCIT on a clean virtualenv. While the installation works fine, there are numerous sklearn and XGBoost based errors which are mostly due to depreciation. Even the example in the README doesn't work.
Would it be possible to specify the exact versions of the requirements for CCIT? I believe that would solve most of the problems and make CCIT future-proof.
For example, in setup.py we have:
install_requires=[
'markdown',
'xgboost',
'pandas',
'numpy',
'scikit-learn',
'scipy',
'matplotlib'
],
So the correct/working package versions of these 7 packages is needed. In fact, I think only xgboost and sklearn's correct package number should solve it.
Hey there, CCIT contributors,
From line 389 in CCIT.py file, I think you believe that acc1-acc2 obeys the normal distribution N(0, 2\sigma(acc2)^2) where \sigma(acc2) is the standard variance of acc2. I think this is right, too. But based on this thought, there are two inconsistent points in the other part of the codes:
BTY, I appreciate your paper Model-powered Conditional Independence Test. It is great!
Hey there, CCIT contributors,
I tryed the following commands.
data = DataGen.generate_samples_cos(dx=1,dy=1,dz=20,sType='NI') #non-CI dataset, pvalue should be low
X = data[:,0:1]
Y = data[:,1:2]
Z = data[:,2::]
pvalue = CCIT.CCIT(X,Y,Z)
And received the following warning.
C:\Users\XXX\Anaconda3\lib\site-packages\sklearn\preprocessing\label.py:151: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0
to check that an array is not empty.
if diff:
The output pvalue is 0.014717305527501225, which looks fine. So is everything alright with my installation? Could you kindly let me know if there is anything I can do to with the warning?
Thank you,
gogotrace
Hi,
Cool paper and thanks for uploading the code. Really interesting concepts put forward.
I perused the code and noticed that there is possibly a mismatch between what the implementation and the proposed algorithm do?
Specifically,
Lines 97 to 103 in 0b9dce9
Instead Algorithm 1 proposes that one should be construct the NearestNeighbor tree on a distinct set, U_2 dataset, and then query elements in U_1, swapping y
with y'
for close by z'
and z
. @rajatsen91 is this an issue?
Better support for discrete distributions.
Import of CCIT in Jupyter (after installing with pip install ccit) throws an error:
ModuleNotFoundError: No module named 'DataGen'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.