Application of neural network to predict the depth of students' final grades

0 Preface

  • The purpose of writing: just to learn about the usage of DNN
  • The basic idea:
    • First, student achievement (normal results x, final grade y: csv format) is loaded;
    • Next, the performance data standardization. (PS: Although the results here has [0 ~ 100] between the article is to learn the DNN, so this step is not omitted)
    • Then, usually results x, y The final grade is further split (proportion, such as 20%) of the training data and test data. PS: test data used to model the performance of a test train
    • Next, create DNN model. In order to set parameters.
    • Then, the training model (fit function). model1.fit (x_train, y_train)
    • Next, evaluate model performance. Data evaluation using the test set, you can use the training data set. If the performance is not good, then tune parameters (Step Four)
    • Finally, you can use the resulting model to predict the end of the forecast.
  • lab environment
    • Mac OSX
    • python 2
    • Applied to the package (a lot of, what is missing what you installed, there are (many) mistakes when will he Baidu, Google, etc. can be solved, I spent one day time to do a good job)

1, loading the data

2, data standardization

3, split the data into training and test samples

4, set DNN model

  • Parameter setting step
    • DNN first set each calculation, each of the first hidden layer is provided, the final output layer is provided
      • Hidden layer. Set Parameters: activation function (Sigmoid, ReLU: Rectifier), the number of units calculation unit
      • Output layer. Layer ( "Linear")
    • Learning Rate: learning_rate = 0.02
    • random_rate = 2019: data for reproducing the same
    • Model allows the maximum number of iterations: n_iter = 10

5, Trainer

6, evaluation model

7, Application Model

Appendix: The complete experiment code

Guess you like

Origin www.cnblogs.com/juking/p/11223699.html