[ Time ] 2018.10.23
[ Title ] Quick Start: 30s Hands-on Keras
[ Reprint Link ] This article is reprinted from " Keras Chinese Document" with the link of https://keras-cn.readthedocs.io/en/latest/
Keras' core data structure is " model", which is a way to organize the network layer.The main model in Keras is the Sequential model, which is a series of stacks formed by network layers in sequence.You can also look at functional models to learn to build more complex models.
Original Address: http://blog.csdn.net/heyongluoyao8/article/details/49408131Thank the author
In many machine learning tasks, the number of samples in one or some categories in the training set may be much larger than the number of samples in other categories.That is, class imbalance. In order to achieve better learning results, it is necessary to solve the problem of class imbalance.
Jason Brownlee's answer:
original title: 8tactics to combat imbalanced classes in your machine learning datasetWhen you classify a dataset with unbalanced categories, you get 90% Accuracy.
Multilayer Perceptron is the simplest neural network model used to deal with classification and regression problems in machine learning.
First Case: Indian Diabetes Diagnosis
pimadindians dataset: standard machine learning dataset downloaded free of charge by UCI Machine Learning.
# Import Required Packages
from keras.models import Sequential
from keras.layers import Dense
import numpy as np
# Initializes a random number generator using a fixed random number seed
Firstly, the model trained by keras is saved in. model (.h5) format through its own model.save ()
model loading is through my _ model = keras.models.load _ model (filepath)
To convert this model into a TensorFlow model in. pb format, the code is as follows:
1 # -*- coding: utf-8 -*- 2 from keras.layers.core import Activation, Dense, Flatten 3 from keras.layers.embeddings import Embedding 4 from keras.layers.recurrent import LSTM 5 from keras.
CNN Network Label Classification
1. Corpus Processing and Model Buildingthe training corpus format follows the label-> title-> content, and the title is optional.How can text be used as input to convolutional neural networks?We know that the input of convolution neural network is a three-dimensional matrix, and if batch is included, it is a four-dimensional matrix.Each three-dimensional matrix is similar to the length, width and color depth of the figure.
The basic content of this article is translated from Lift: Multi-Label Learning With Label-Specific Features [ 1 ], including some of my own understanding, and finally attached with github link of python code that I reproduced.
generic attribute The so-called multi-label learning is a machine learning problem compared with single-label learning.As the name implies, the model will return the prediction results of multiple label to the input feature vectors. For example, it will give a picture for the program to judge whether there are "
Random Forest Reprinted from: http://www.zilhua.com/629.htmlAlthough it is reprinted, it is written in python later, and the original author uses r language.
1. Random Forest Use Background 1.1 definition of random forest Random Forest is a relatively new machine learning model.The classic machine learning model is neural network, which has a history of more than half a century.Neural network is accurate in prediction, but it takes a lot of calculation.