|
|
|
```python
|
|
|
|
from chemicalchecker import ChemicalChecker
|
|
|
|
cc = ChemicalChecker('/home/mbertoni/tmp/cc')
|
|
|
|
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] ChemicalChecker with root: /home/mbertoni/tmp/cc
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [WARNING ] Empty root directory, creating new one
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/A/A1/A1.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/A/A2/A2.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/A/A3/A3.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/A/A4/A4.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/A/A5/A5.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/B/B1/B1.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/B/B2/B2.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/B/B3/B3.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/B/B4/B4.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/B/B5/B5.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/C/C1/C1.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/C/C2/C2.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/C/C3/C3.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/C/C4/C4.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/C/C5/C5.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/D/D1/D1.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/D/D2/D2.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/D/D3/D3.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/D/D4/D4.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/D/D5/D5.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/E/E1/E1.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/E/E2/E2.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/E/E3/E3.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/E/E4/E4.001/models
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] Creating /home/mbertoni/tmp/cc/E/E5/E5.001/models
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
sign0 = cc.get_data('sign0', 'A1.001')
|
|
|
|
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] data path: /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] model path: /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign0.pkl
|
|
|
|
chemicalchecker.core.data.DataFactory [DEBUG ] initializing object sign0
|
|
|
|
chemicalchecker.core.sign0.sign0 [DEBUG ] data_path: /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
chemicalchecker.core.sign0.sign0 [DEBUG ] model_path: /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign0.pkl
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] __init__
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [WARNING ] Data file not available: /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [WARNING ] Model file not available: /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign0.pkl
|
|
|
|
```
|
|
|
|
```
|
|
|
|
sign0.create_dummy()
|
|
|
|
|
|
|
|
chemicalchecker.core.sign0.sign0 [DEBUG ] faking data in /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
```
|
|
|
|
```
|
|
|
|
sign1 = cc.get_data('sign1', 'A1.001')
|
|
|
|
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] data path: /home/mbertoni/tmp/cc/A/A1/A1.001/sign1.h5
|
|
|
|
chemicalchecker.core.chemcheck.ChemicalChecker [DEBUG ] model path: /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign1.pkl
|
|
|
|
chemicalchecker.core.data.DataFactory [DEBUG ] initializing object sign1
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] data_path: /home/mbertoni/tmp/cc/A/A1/A1.001/sign1.h5
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] model_path: /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign1.pkl
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] __init__
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [WARNING ] Data file not available: /home/mbertoni/tmp/cc/A/A1/A1.001/sign1.h5
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [WARNING ] Model file not available: /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign1.pkl
|
|
|
|
```
|
|
|
|
```
|
|
|
|
sign1.fit(sign0)
|
|
|
|
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] fit
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] LSI/PCA fit /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] saving model to /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign1.pkl
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] __iter__
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] parsing data /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
```
|
|
|
|
```
|
|
|
|
sign1.validate('MoA.csv')
|
|
|
|
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] validate
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] LSI/PCA validated on MoA.csv
|
|
|
|
```
|
|
|
|
```
|
|
|
|
sign1.predict(sign0)
|
|
|
|
|
|
|
|
chemicalchecker.core.signature_base.BaseSignature [DEBUG ] predict
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] loading model from /home/mbertoni/tmp/cc/A/A1/A1.001/models/sign1.pkl
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] LSI/PCA predict /home/mbertoni/tmp/cc/A/A1/A1.001/sign0.h5
|
|
|
|
chemicalchecker.core.sign1.sign1 [DEBUG ] generating /home/mbertoni/tmp/cc/A/A1/A1.001/sign1.h5
|
|
|
|
``` |
|
|
|
\ No newline at end of file |