当前位置:网站首页>Machine learning based on deepchem
Machine learning based on deepchem
2022-07-29 03:25:00 【Order anything】
Introduce a library ——DeepChem, It's a building on Tensorflow Libraries on the platform , Designed to help use deep learning in Life Sciences , For molecular processing , Genetic data sets or microscopic data sets have special support .
DeepChem And Tensorflow The system can be well integrated , Therefore, it can DeepChem Code and others Tensorflow Application code mixing and matching .
DeepChem I won't support it windows install , Currently only supported linux And Mac, For installation and use, please refer to its official website :
DeepChemhttps://deepchem.io/ There are rich usage methods on the official website , See the detailed tutorial .
Here is a small example that may be used in work demo( Use DeepChem To train models for predicting molecular toxicity ):
import numpy as np
import deepchem as dc
# Load a toxicity data set —— The characterization process is to transform the data set containing molecular information into matrices and vectors
tox21_tasks,tox21_datasets,transformers = dc.molnet.load_tox21()
# Look at the data
print(f'tox21_tasks:{tox21_tasks};tox21_datasetsL:{tox21_datasets}')
# Split the dataset
train_dataset,valid_dataset,test_dataset = tox21_datasets
# see Transformer
print(f'transformers:{transformers}')
# [<deepchem.trans.transformers.BalancingTransformer at XXXXXXXXX>]
# Establish a fully connected network
model = dc.models.MultitaskClassifier(n_tasks=12,n_features=1024,layer_sizes=[1000])
model.fit(train_dataset,nb_epoch=100)
metric = dc.metrics.Metric(dc.metrics.roc_auc_score,np.mean)
# Model to evaluate
train_scores = model.evaluate(train_dataset,[metric],transformers)
test_scores = model.evaluate(test_dataset,[metric],transformers)
print(train_scores)
print(test_scores)
notes : among transformers It is a process of characterization , Here we call transformers, In fact, the modules used are BalancingTransformer, Looking at the name, I feel that it is not simple transformer The appearance of , in fact BalancingTransofrmer Class is designed to correct unbalanced data , The unbalanced data set is compensated by adjusting the weight matrix of the data set .
BalancingTransofrmer Adjust the weight of each data point , Make the total weight assigned to each class the same . such , The loss function has no systematic bias towards any class , Only through correct classification , To reduce losses ( If you are interested in the specific implementation process, please refer to the source code ).
In life sciences , Data imbalances are common , Screening 100 Ten thousand molecules , Maybe it's just 10 One is effective ,99.99% Are invalid molecules , When using the model, we should focus on dealing with the problem of data imbalance .
边栏推荐
- 增量实时灾备笔记
- Naive Bayes -- continuous data
- C obtains JSON format data asynchronously from the web address
- CUDA GDB prompt: /tmp/tmpxft**** cudafe1.stub. c: No such file or directory.
- 再学EXKMP(EXKMP模板)
- Learn more than 4000 words, understand the problem of this pointing in JS, and handwrite to realize call, apply and bind
- Photo scale correction tool: DxO viewpoint 3 direct mount version
- Kubernetes-1.24.x feature
- 04 | background login: login method based on account and password (Part 1)
- Reproduce 20 character short domain name bypass and XSS related knowledge points
猜你喜欢
Implement Lmax disruptor queue from scratch (VI) analysis of the principle of disruptor solving pseudo sharing and consumers' elegant stopping
exness:鸽派决议帮助黄金反弹,焦点转向美国GDP
04 | background login: login method based on account and password (Part 1)
Let's talk about the summary of single merchant function modules
Simple code implementation of decision tree
July 28, 2022 Gu Yujia's study notes
[freeswitch development practice] media bug obtains call voice flow
Calculation of array serial number of force deduction questions (daily question 7/28)
STC单片机驱动1.8‘TFT SPI屏幕演示示例(含资料包)
Photo scale correction tool: DxO viewpoint 3 direct mount version
随机推荐
RTP 发送 和接收 h265
13_ UE4 advanced_ Montage animation realizes attack while walking
Target detection, industrial defects, image segmentation -- deep learning data set induction
Design of smoke temperature, humidity and formaldehyde monitoring based on single chip microcomputer
04 | background login: login method based on account and password (Part 1)
makefile详解
MySQL installation and configuration super detailed tutorial and simple database and table building method
Precautions for using latex
Numpy acceleration -- > cupy installation
mysql的timestamp存在的时区问题怎么解决
后缀自动机(sam)板子 from jly
Sanzi chess (player + computer)
ROS - create workspace
Shortcut key for adjusting terminal size in ROS
Matlab learning -- structured programs and user-defined functions
Code speed optimization
Simple code implementation of K-means clustering
[freeswitch development practice] media bug obtains call voice flow
Digital image processing Chapter 10 - image segmentation
简历竟然敢写精通并发编程,那你说说AQS为什么要用双向链表?