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
| from nltk import pos_tag | |
| from nltk.tokenize import word_tokenize | |
| from nltk.stem import PorterStemmer, WordNetLemmatizer | |
| stemmer = PorterStemmer() | |
| lemmatiser = WordNetLemmatizer() | |
| print("Stem %s: %s" % ("going", stemmer.stem("going"))) | |
| print("Stem %s: %s" % ("gone", stemmer.stem("gone"))) | |
| print("Stem %s: %s" % ("goes", stemmer.stem("goes"))) |
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
| library(shiny) | |
| # Define UI for application | |
| fluidPage( | |
| titlePanel("Indian Leadership"), | |
| sidebarLayout( | |
| sidebarPanel( "President & PM"), | |
| mainPanel( | |
| img(src="http://ste.india.com/sites/default/files/2017/06/19/603716-ramnathgovind.jpg",height=200,width=250), |
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
| library(shiny) | |
| # Define server logic required to draw a histogram | |
| function(input, output) { | |
| # Expression that generates a histogram. The expression is | |
| # wrapped in a call to renderPlot to indicate that: | |
| # | |
| # 1) It is "reactive" and therefore should be automatically | |
| # re-executed when inputs change |
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
| library(shiny) | |
| library(Ecdat) | |
| data("Housing") | |
| ui <- pageWithSidebar(headerPanel = headerPanel("Regression Analysis"), | |
| sidebarPanel = sidebarPanel( | |
| sliderInput(inputId = "num", | |
| label = "Choose a Number:", | |
| value = mean(Housing$lotsize), |
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
| library(MASS) | |
| data("Boston") | |
| Boston | |
| library(caret) | |
| set.seed(1234) | |
| trainIndex <- createDataPartition(y=Boston$medv,p=0.7,list=F) | |
| training <- Boston[trainIndex,] |