This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # load packages | |
| library(shiny) | |
| library(shinydashboard) | |
| ################################## | |
| # # | |
| # Basic Code to Start With # | |
| # # | |
| ################################## | |
| header <- dashboardHeader( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!require(car)){install.packages(car, dep=T)} | |
| library(car) | |
| ############### | |
| # # | |
| # Exercise 1 # | |
| # # | |
| ############### | |
| # load data file | |
| mussel<-read.csv(file.choose()) | |
| str(mussel) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def function_template(nums): | |
| ''' | |
| Signature: list ---> int | |
| Author: @Korkrid Akepanidtaworn | |
| Description: INSERT HERE | |
| ''' | |
| pass | |
| def has22(nums): | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------------------------------------- | |
| # ------------------------------------------------------------------------------------------- | |
| # Develop a Neural Network with MXNet in Five Minutes | |
| # R Notebook Author: @Korkrid Akepanidtaworn | |
| # Tutorial from MXNet Community | |
| # Source: https://mxnet.incubator.apache.org/tutorials/r/fiveMinutesNeuralNetwork.html | |
| # ------------------------------------------------------------------------------------------- | |
| # ------------------------------------------------------------------------------------------- | |
| library(mlbench) | |
| library(tidyverse) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------------------------------------- | |
| # ------------------------------------------------------------------------------------------- | |
| # Develop a Neural Network with MXNet in Five Minutes (Regression) | |
| # R Notebook Author: @Korkrid Akepanidtaworn | |
| # Tutorial from MXNet Community | |
| # Source: https://mxnet.incubator.apache.org/tutorials/r/fiveMinutesNeuralNetwork.html | |
| # ------------------------------------------------------------------------------------------- | |
| # ------------------------------------------------------------------------------------------- | |
| library(mlbench) | |
| library(tidyverse) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------------- | |
| # Handwritten Digits Classification Competition | |
| # Source: https://mxnet.incubator.apache.org/tutorials/r/mnistCompetition.html | |
| # MNIST is a handwritten digits image data set created by Yann LeCun. Every digit is represented by a 28 x 28 pixel image. It’s become a standard data set for testing classifiers on simple image input. A neural network is a strong model for image classification tasks. There’s a long-term hosted competition on Kaggle using this data set. This tutorial shows how to use MXNet to compete in this challenge. | |
| # ------------------------------------------------------------------- | |
| # ------------------------------------------------------------------- | |
| # Load the dependency packages | |
| # ------------------------------------------------------------------- | |
| library(mxnet) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ------------------------------------------------------------------- | |
| # Handwritten Digits Classification Competition | |
| # Source: https://mxnet.incubator.apache.org/tutorials/r/mnistCompetition.html | |
| # MNIST is a handwritten digits image data set created by Yann LeCun. Every digit is represented by a 28 x 28 pixel image. It’s become a standard data set for testing classifiers on simple image input. A neural network is a strong model for image classification tasks. There’s a long-term hosted competition on Kaggle using this data set. This tutorial shows how to use MXNet to compete in this challenge. | |
| # ------------------------------------------------------------------- | |
| # ------------------------------------------------------------------- | |
| # Load the dependency packages | |
| # ------------------------------------------------------------------- | |
| library(mxnet) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data <- structure(list(CODE = c("AA","AA","AA","AA","AA"), | |
| DATE = c(20181205,20181205,20181205,20181212,20181212), | |
| TIME = c(14.0,14.0,14.2,18.0,18.0), | |
| NO = c("D1","D1","D2","D3","D3"), | |
| ITEM = c("AK011","ZH002","HJ005","AK011","KK021"), | |
| RANK = c(1,1,2,3,3)), | |
| .Names = c("CODE", "DATE", "TIME", "NO", "ITEM","RANK"), | |
| class = c("tbl_df", "tbl", "data.frame"), | |
| row.names = c(NA, -5L)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print(3*4) | |
| p=22/7 # number (integer, float) | |
| print(p) | |
| P=45 | |
| print(P) | |
| m1 = "pikachu" # string | |
| m2 = 'rhydon' | |
| isAdult = True # boolean | |
| print(m1) | |
| print(m1 + " vs. " + m2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def rectangle(w, h): # dynamic typing | |
| # code block | |
| area = w * h | |
| return area | |
| def triangle(w, h): | |
| # area = .5 * w * h | |
| return .5 * w * h | |