id int64 0 25.6k | text stringlengths 0 4.59k |
|---|---|
16,900 | the query is created in cypher and saysfor all the recipes and their ingredientscount the number of relations per ingredient and return the ten ingredients with the most relations and their respective counts the results are shown in figure most of the top list in figure shouldn' come as surprise with salt proudly at th... |
16,901 | figure the rise of graph databases spaghetti bolognese possible ingredients the cypher query merely lists the ingredients linked to spaghetti bolognese figure shows the result in the neo web interface let' remind ourselves of the remark we made when indexing the data in elasticsearch quick elasticsearch search on spagh... |
16,902 | connected data examplea recipe recommendation engine for this we introduce user we call "ragnar,who likes couple of dishes this new information needs to be absorbed by our graph database before we can expect it to suggest new dishes thereforelet' now create ragnar' user node with few recipe preferences listing creating... |
16,903 | figure the rise of graph databases the user ragnar likes several dishes for the simple recommendation engine we like to buildall that' left for us to do is ask the graph database to give us the nearest dishes in terms of ingredients againthis is basic approach to recommender systems because it doesn' take into account ... |
16,904 | it might come as bit of surprisebut single cypher command will suffice from py neo import graphnoderelationship graph_db graph("graph_db cypher execute(match (usr :user{name:'ragnar'})-[ :likes]->(rec :recipe)(rec )-[ :contains]->(ing :ingredientwith ing ,rec match (rec :recipe)-[ :contains]->(ing :ingredientwhere rec ... |
16,905 | the rise of graph databases step presentation the neo web interface allows us to run the model and retrieve nice-looking graph that summarizes part of the logic behind the recommendations it shows how recommended dishes are linked to preferred dishes via the ingredients this is shown in figure and is the final output f... |
16,906 | graph data structures consist of two main componentsnodes--these are the entities themselves in our case studythese are recipes and ingredients edges--the relationships between entities relationshipslike nodescan be of all kinds of types (for example "contains,"likes,"has been to"and can have their own specific propert... |
16,907 | and text analytics this covers understanding the importance of text mining introducing the most important concepts in text mining working through text mining project most of the human recorded information in the world is in the form of written text we all learn to read and write from infancy so we can express ourselves... |
16,908 | the important is still something human is better at than any machine luckilydata scientists can apply specific text mining and text analytics techniques to find the relevant information in heaps of text that would otherwise take them centuries to read themselves text mining or text analytics is discipline that combines... |
16,909 | text mining and text analytics while language isn' limited to the natural languagethe focus of this will be on natural language processing (nlpexamples of non-natural languages would be machine logsmathematicsand morse code technically even esperantoklingonand dragon language aren' in the field of natural languages bec... |
16,910 | figure the different answers to the queries "who is chelsea?and "what is chelsea?imply that google uses text mining techniques to answer these queries figure emails can be automatically divided by category based on content and origin |
16,911 | text mining and text analytics this allows for the creation of automatic reasoning engines driven by natural language queries figure shows how "wolfram alpha, computational knowledge engineuses text mining and automatic reasoning to answer the question "is the usa population bigger than china?figure the wolfram alpha e... |
16,912 | figure ibm watson wins jeopardy against human players text mining has many applicationsincludingbut not limited tothe followingentity identification plagiarism detection topic identification text clustering translation automatic text summarization fraud detection spam filtering sentiment analysis text mining is usefulb... |
16,913 | text mining and text analytics figure google maps asks you for more context due to the ambiguity of the query "springfield another problem is spelling mistakes and different (correctspelling forms of word take the following three references to new york"ny,"neww york,and "new york for humanit' easy to see they all refer... |
16,914 | text mining techniques during our upcoming case study we'll tackle the problem of text classificationautomatically classifying uncategorized texts into specific categories to get from raw textual data to our final destination we'll need few data mining techniques that require background information for us to use them e... |
16,915 | text mining and text analytics term frequency--inverse document frequency (tf-idfa well-known formula to fill up the document-term matrix is tf-idf or term frequency multiplied by inverse document frequency binary bag of words assigns true or false (term is there or not)while simple frequencies count the number of time... |
16,916 | text mining techniques this does come at costthoughbecause you're building bigger term-vectors by including bigrams and/or trigrams in the equation stop word filtering--every language comes with words that have little value in text analytics because they're used so often nltk comes with short list of english stop words... |
16,917 | text mining and text analytics table list of all pos tags (continuedtag meaning tag meaning nns nounplural nnp proper nounsingular nnps proper nounplural pdt predeterminer pos possessive ending prp personal pronoun prppossessive pronoun rb adverb rbr adverbcomparative rbs adverbsuperlative rp particle sym symbol uh int... |
16,918 | variable is variable that combines other variables for instance "dataand "sciencemight be good predictors in their own right but probably the two of them co-occurring in the same text might have its own value bucket is somewhat the opposite instead of combining two variablesa variable is split into multiple new ones th... |
16,919 | text mining and text analytics probability of fetus identified as female--ultrasound at weeks ultrasound female male figure decision tree with one variablethe doctor' conclusion from watching an ultrasound during pregnancy what is the probability of the fetus being femalefrom to that' pretty good discriminator decision... |
16,920 | case studyclassifying reddit posts meet the natural language toolkit python might not be the most execution efficient language on earthbut it has mature package for text mining and language processingthe natural language toolkit (nltknltk is collection of algorithmsfunctionsand annotated works that will guide you in ta... |
16,921 | text mining and text analytics two ipython notebook files are available for this data collection--will contain the data collection part of this case study data preparation and analysis--the stored data is put through data preparation and then subjected to analysis all code in the upcoming case study can be found in the... |
16,922 | case studyclassifying reddit posts data science process overview and step the research goal to solve this text mining exercisewe'll once again make use of the data science process figure shows the data science process applied to our reddit classification case not all the elements depicted in figure might make sense at ... |
16,923 | text mining and text analytics step data retrieval we'll use reddit data for this caseand for those unfamiliar with reddittake the time to familiarize yourself with its concepts at www reddit com reddit calls itself "the front page of the internetbecause users can post things they find interesting and/or found somewher... |
16,924 | case studyclassifying reddit posts listing setting up sqllite database and reddit api client import praw import sqlite import praw and sqlite libraries conn sqlite connect('reddit db' conn cursor(set up connection to sqlite database execute('''drop table if exists topics''' execute('''drop table if exists comments''' e... |
16,925 | text mining and text analytics posted new things in fact we can run the api request periodically and gather data over time while at any given time you're limited to thousand postsnothing stops you from growing your own database over the course of months it' worth noting the following script might take about an hour to ... |
16,926 | the prawgetdata(function retrieves the "hottesttopics in its subredditappends this to an arrayand then gets all its related comments this goes on until thousand topics are reached or no more topics exist to fetch and everything is stored in the sqlite database the print statements are there to inform you on its progres... |
16,927 | text mining and text analytics listing word filtering and lowercasing functions def wordfilter(excluded,wordrow)wordfilter(filtered [word for word in wordrow if word not in excludedfunction will return filtered remove term from stopwords nltk corpus stopwords words('english'an array of terms def lowercasearray(wordrow)... |
16,928 | case studyclassifying reddit posts listing first data preparation function and execution we'll use data['all_words'for data exploration create pointer to awlite data row[ is def data_processing(sql)titlerow[ execute(sqlfetch data is topic textdata {'wordmatrix':[],'all_words':[]row by row we turn them row fetchone(into... |
16,929 | text mining and text analytics figure the first word vector of the "datasciencecategory after first data processing attempt this sure looks pollutedpunctuations are kept as separate terms and several words haven' even been split further data exploration should clarify few things for us step data exploration we now have... |
16,930 | case studyclassifying reddit posts data science histogram frequency count occurrence buckets game of thrones histogram frequency count occurrence buckets figure this histogram of term frequencies shows both the "data scienceand "game of thronesterm matrices have more than , terms that occur once figure "data scienceand... |
16,931 | text mining and text analytics many of these terms are incorrect spellings of otherwise useful onessuch asjaimie is jaime (lannister)milisandre would be melisandreand so on decent game of thrones-specific thesaurus could help us find and replace these misspellings with fuzzy search algorithm this proves data cleaning i... |
16,932 | case studyclassifying reddit posts the following listing shows simple stemming algorithm called "snowball stemming these snowball stemmers can be language-specificso we'll use the english onehoweverit does support many languages listing the reddit data processing revised after data exploration stemmer nltk snowballstem... |
16,933 | text mining and text analytics notice the changes since the last data_processing(function our tokenizer is now regular expression tokenizer regular expressions are not part of this book and are often considered challenging to masterbut all this simple one does is cut the text into words for wordsany alphanumeric combin... |
16,934 | case studyclassifying reddit posts with the data cleaning process "completed(remarka text mining cleansing exercise can almost never be fully completed)all that remains is few data transformations to get the data in the bag of words format firstlet' label all our data and also create holdout sample of observations per ... |
16,935 | text mining and text analytics the holdout sample will be used for our final test of the model and the creation of confusion matrix confusion matrix is way of checking how well model did on previously unseen data the matrix shows how many observations were correctly and incorrectly classified before creating or trainin... |
16,936 | figure classification accuracy is measure representing what percentage of observations was correctly classified on the test data the accuracy on the test data is estimated to be greater than %as seen in figure classification accuracy is the number of correctly classified observations as percentage of the total number o... |
16,937 | text mining and text analytics accuracy of %and our model seems to perform better than that let' look at what it uses to determine the categories by digging into the most informative model features print(classifier show_most_informative_features( )figure shows the top terms capable of distinguishing between the two cat... |
16,938 | figure decision tree model accuracy as shown in figure the promised accuracy is we now know better than to rely solely on this single testso once again we turn to confusion matrix on second set of dataas shown in figure figure shows different story on these observations of the holdout sample the decision tree model ten... |
16,939 | text mining and text analytics takes into account when constructing the branches when multiple terms together create stronger classification than single termsthe decision tree will actually outperform the naive bayes we won' go into the details of that herebut consider this one of the next steps you could take to impro... |
16,940 | minor knowledge of javascript the code for the force graph example can found at we can also represent our decision tree in rather original way we could go for fancy version of an actual tree diagrambut the following sunburst diagram is more original and equally fun to use figure shows the top layer of the sunburst diag... |
16,941 | text mining and text analytics showing your results in an original way can be key to successful project people never appreciate the effort you've put into achieving your results if you can' communicate them and they're meaningful to them an original data visualization here and there certainly helps with this summary te... |
16,942 | to the end user this covers considering options for data visualization for your end users setting up basic crossfilter mapreduce application creating dashboard with dc js working with dashboard development tools application focused you'll notice quickly this is certainly different from to in that the focus here lies on... |
16,943 | data visualization to the end user course for many years to come takefor examplecompany investment decisionsdo we distribute our goods from two distribution centers or only onewhere do they need to be located for optimal efficiencywhen the decision is madethe exercise may not be repeated until you've retired in this ca... |
16,944 | this case is that of hospital pharmacy with stock of few thousand medicines the government came out with new norm to all pharmaciesall medicines should be checked for their sensitivity to light and be stored in newspecial containers one thing the government didn' supply to the pharmacies was an actual list of light-sen... |
16,945 | data visualization to the end user developed crossfilter to allow their customers extremely speedy slice and dice on their payment history crossfilter is not the only javascript library capable of mapreduce processingbut it most certainly does the jobis open sourceis free to useand is maintained by an established compa... |
16,946 | figure dc js interactive example on its official website crossfilterthe javascript mapreduce library javascript isn' the greatest language for data crunching but that didn' stop peoplelike the folks at squarefrom developing mapreduce libraries for it if you're dealing with dataevery bit of speed gain helps you don' wan... |
16,947 | data visualization to the end user , , linesdepending on the width of your datayour browser could give up on you conclusionit' balance exercise for the data you do sendthere is crossfilter to handle it for you once it arrives in the browser in our case studythe pharmacist requested the central server for stock data of ... |
16,948 | crossfilterthe javascript mapreduce library figure starting up simple python http server make sure to have all the required files available in the same folder as your index html you can download them from the manning website or from their creatorswebsites dc css and dc min js-- min js--crossfilter min js--now we know h... |
16,949 | data visualization to the end user make sure to have crossfilter min jsd min jsand dc min js downloaded from their websites or from the manning website crossfilterd jsdc min jsall javascript is loaded here no surprises here the header contains all the css libraries you'll useso we'll load our javascript at the end of t... |
16,950 | listing the createtable function var tabletemplate $(""""""join('\ '))createtable function(data,variablesintable,title)var table tabletemplate clone()var ths variablesintable map(function(vreturn $(""text( })$('caption'tabletext(title)$('thead tr'tableappend(ths)data foreach(function(rowvar tr $(""appendto($('tbody'tab... |
16,951 | data visualization to the end user inputtable empty(append(createtable(sample,variablesintable,"the input table"))you start off by showing your data on the screenbut preferably not all of itonly the first five entries will doas shown in figure you have date variable in your data and you want to make sure crossfilter wi... |
16,952 | your first dimension is the name of the medicinesand you can already use this to filter your data set and show the filtered data using our createtable(function var datafilteredmednamedim filter('grazax sq- 'var filteredtable $('#filteredtable')filteredtable empty(append(createtable(datafiltered top( ),variablesintable,... |
16,953 | data visualization to the end user figure data filtered on medicine name grazax sq- and sorted by day should end up with the same number for every medicine or observation per day in var countpermed mednamedim group(reducecount()variablesintable ["key","value"filteredtable empty(append(createtable(countpermed top(infini... |
16,954 | what about more interesting calculations that don' come bundled with crossfiltersuch as an averagefor instanceyou can still do that but you' need to write three functions and feed them to reduce(method let' say you want to know the average stock per medicine as previously mentionedalmost all of the mapreduce logic need... |
16,955 | data visualization to the end user reduceaddavg(takes the same and arguments but now you actually use vyou don' need your data to set the initial values of in this casealthough you can if you want to your stock is summed up for every record you addand then the average is calculated based on the accumulated sum and reco... |
16,956 | creating an interactive dashboard with dc js creating an interactive dashboard with dc js now that you know the basics of crossfilterit' time to take the final stepbuilding the dashboard let' kick off by making spot for your graphs in the index html page the new body looks like the following listing you'll notice it lo... |
16,957 | data visualization to the end user crossfilterd and dc libraries can be downloaded from their respective websites our own application javascript code standard practice js libraries are last to speed page load jqueryvital html-javascript interaction bootstrapsimplified css and layout from folks at twitter crossfilterour... |
16,958 | creating an interactive dashboard with dc js deliveries per day graph dc renderall() ( time scale(domain([mindate,maxdate])xaxislabel("year "yaxislabel("stock"margins({left right top bottom }render all graphs look at all that' happening here first you need to calculate the range of your -axis so dc js will know where t... |
16,959 | data visualization to the end user dimension(mednamedimgroup(avgstockmedicinemargins({top left right bottom }valueaccessor(function ( {return value stockavg;})this should be familiar because it' graph representation of the table you created earlier one big point of interestbecause you used custom-defined reduce(functio... |
16,960 | creating an interactive dashboard with dc js lightsensitivestockpiechart width(null/null means size to fit container height( dimension(lightsendimradius( group(summatedstocklightwe hadn' introduced the light dimension yetso you need to register it onto your crossfilter instance first you can also add reset buttonwhich ... |
16,961 | data visualization to the end user dashboard development tools we already have our glorious dashboardbut we want to end this with short (and far from exhaustiveoverview of the alternative software choices when it comes to presenting your numbers in an appealing way you can go with proven and true software packages of r... |
16,962 | high accessibility--the data science application is meant to release results to any kind of userespecially people who might only have browser at their disposal--your own customersfor instance data visualization in html runs fluently on mobile big pools of talent out there--although there aren' that many tableau develop... |
16,963 | data visualization to the end user javascript-based dashboards are perfect for quickly granting access to your data science results because they only require the user to have web browser alternatives existsuch as qlik (crossfilter is mapreduce libraryone of many javascript mapreduce librariesbut it has proven its stabi... |
16,964 | setting up elasticsearch in this appendixwe'll cover installing and setting up the elasticsearch database used in and instructions for both linux and windows installations are included note that if you get into trouble or want further information on elasticsearchit has pretty decent documentation you can find located a... |
16,965 | appendix setting up elasticsearch if java isn' installed or you don' have high enough versionelasticsearch recommends the oracle version of java use the following console commands to install it sudo add-apt-repository ppa:webupd team/java sudo apt-get install oracle-java -installer now you can install elasticsearch add... |
16,966 | windows installation the elasticsearch welcome screen should greet you notice your database even has name the name is picked from the pool of marvel characters and changes every time you reboot your database in productionhaving an inconsistent and non-unique name such as this can be problematic the instance you started... |
16,967 | appendix setting up elasticsearch attempting an install before you have an adequate java version will result in an error see figure figure the elasticsearch install fails when java_home is not set correctly installing on pc with limited rights sometimes you want to try piece of software but you aren' free to install yo... |
16,968 | now that you have java installed and set upyou can install elasticsearch download the elasticsearch zip package manually from will now become your self-contained database if you have an ssd driveconsider giving it place therebecause it significantly increases the speed of elasticsearch if you already have windows comma... |
16,969 | appendix setting up elasticsearch if you want to stop the serverissue the service stop command open your browser of choice and put localhost: in the address bar if the elasticsearch welcome screen appears (figure )you've successfully installed elasticsearch figure the elasticsearch welcome screen on localhost |
16,970 | setting up neo in this appendixwe'll cover installing and setting up the neo community edition database used in instructions for both linux and windows installations are included linux installation to install neo community edition on linuxuse your command line as instructed hereneo technology provides this debian repos... |
16,971 | appendix setting up neo or apt-get install neo -enterprise windows installation to install the neo community edition on windows go to following screen will appear save this file and run it after installationyou'll get new pop up that gives you the option to choose the default database location or alternatively browse t... |
16,972 | open your browser of choice and put localhost: in the address bar you have arrived at the neo browser when the database access asks for authenticationuse the username and password "neo "then press connect in the following window you can set your own password now you can input your cypher queries and consult your nodesr... |
16,973 | installing mysql server in this appendixwe'll cover installing and setting up the mysql database instructions for windows and linux installations are included windows installation the most convenient and recommended method is to download mysql installer (for windowsand let it set up all of the mysql components on your ... |
16,974 | select the suitable setup type you prefer the option developer default will install mysql server and other mysql components related to mysql advancementtogether with supportive functions such as mysql workbench you can also choose custom setup if you want to select the mysql items that will be installed on your system ... |
16,975 | appendix installing mysql server linux installation the official installation instructions for mysql on linux can be found at dev mysql com/doc/refman/ /en/linux-installation html howevercertain linux distributions give specific installation guides for it for examplethe instructions for installing linux on ubuntu can b... |
16,976 | log into mysqlmysql - root - enter the password you chose and you should see the mysql console shown in figure figure mysql console on linux finallycreate schema so you have something to refer to in the case study of create database test |
16,977 | setting up anaconda with virtual environment anaconda is python code package that' especially useful for data science the default installation will have many tools data scientist might use in our book we'll use the -bit version because it often remains more stable with many python packages (especially the sql oneswhile... |
16,978 | windows installation to install anaconda on windows go to for the -bit version of anaconda based on python run the installer setting up the environment once the installation is doneit' time to set up an environment an interesting schema on conda vs pip commands can be found at _downloads/conda-pip-virtualenv-translator... |
16,979 | appendix setting up anaconda with virtual environment anaconda will create the environment on its default locationbut options are available if you want to change the location now that you have an environmentyou can activate it in the command linein windowstype activate nameoftheenv in linuxtype source activate nameofth... |
16,980 | symbols (minussign (plussign numerics - diagrams accuracy gain acid (atomicityconsistencyisolationdurability activate nameoftheenv command aggregated measuresenriching - aggregation-oriented aggregations - agile project model ai (artificial intelligence aiddata org akinator algorithms - dividing large matrix into many ... |
16,981 | bigrams - binary coded bag of words binary count bit stringscreating - bitcoin mining blaze library block algorithms bootstrap bootstrap grid system bostockmike boxplots browse data button browser-based interfaceneo brushing and linking technique buckets - tag programming language js cap theorem - captcha case study di... |
16,982 | index data lakes data marts data modeling data preparation and analysisipython notebook files data retrieval see retrieving data data science process - benefits and uses of - building models - model and variable selection - model diagnostics and model comparison - model execution - cleansing data - data entry errors - ... |
16,983 | exploratory phase exploring data case study in reddit posts classification case study - nosql example - handling spelling mistakes overview project primary objective - project secondary objective - recipe recommendation engine example - external data facebook facets of data - audio graph-based or network data images ma... |
16,984 | index indexes adding to tables overview index html file - industrial internet information gain ingredients txt file insertion operation installing anaconda package on linux on windows mysql server - linux installation - windows installation - integrated development environment see ide interaction variables - interactiv... |
16,985 | malicious urlspredicting - acquiring url data - data exploration - defining research goals model building - overview many-to-many relationship map js mapper job mapreduce algorithms mapreduce function mapreduce libraryjavascript - mapreduce programming method problems solved by spark use by hadoop framework - mapreduce... |
16,986 | classification and regression generalizationoverfittingand underfitting relation of model complexity to dataset size supervised machine learning algorithms some sample datasets -nearest neighbors linear models naive bayes classifiers decision trees ensembles of decision trees kernelized support vector machines neural n... |
16,987 | binningdiscretizationlinear modelsand trees interactions and polynomials univariate nonlinear transformations automatic feature selection univariate statistics model-based feature selection iterative feature selection utilizing expert knowledge summary and outlook model evaluation and improvement cross-validation cross... |
16,988 | representing text data as bag of words applying bag-of-words to toy dataset bag-of-words for movie reviews stopwords rescaling the data with tf-idf investigating model coefficients bag-of-words with more than one word ( -gramsadvanced tokenizationstemmingand lemmatization topic modeling and document clustering latent d... |
16,989 | machine learning is an integral part of many commercial applications and research projects todayin areas ranging from medical diagnosis and treatment to finding your friends on social networks many people think that machine learning can only be applied by large companies with extensive research teams in this bookwe wan... |
16,990 | libraries why we wrote this book there are many books on machine learning and ai howeverall of them are meant for graduate students or phd students in computer scienceand they're full of advanced mathematics this is in stark contrast with how machine learning is being usedas commodity tool in research and commercial ap... |
16,991 | uate and tune your model online resources while studying this bookdefinitely refer to the scikit-learn website for more indepth documentation of the classes and functionsand many examples there is also video course created by andreas muller"advanced machine learning with scikitlearn,that supplements this book you can f... |
16,992 | using code examples supplemental material (code examplesipython notebooksetc is available for download at this book is here to help you get your job done in generalif example code is offered with this bookyou may use it in your programs and documentation you do not need to contact us for permission unless you're reprod... |
16,993 | mannibm redbookspacktadobe pressft pressapressmanningnew ridersmcgraw-hilljones bartlettcourse technologyand hundreds more for more information about safari books onlineplease visit us online how to contact us please address comments and questions concerning this book to the publishero'reilly mediainc gravenstein highw... |
16,994 | especially the contributors to scikit-learn without the support and help from this communityin particular from gael varoquauxalex gramfortand olivier griseli would never have become core contributor to scikit-learn or learned to understand this package as well as do now my thanks also go out to all the other contributo... |
16,995 | introduction machine learning is about extracting knowledge from data it is research field at the intersection of statisticsartificial intelligenceand computer science and is also known as predictive analytics or statistical learning the application of machine learning methods has in recent years become ubiquitous in e... |
16,996 | "intelligentapplication manually crafting decision rules is feasible for some applicationsparticularly those in which humans have good understanding of the process to model howeverusing handcoded rules to make decisions has two major disadvantagesthe logic required to make decision is specific to single domain and task... |
16,997 | able to solve your problem examples of supervised machine learning tasks includeidentifying the zip code from handwritten digits on an envelope here the input is scan of the handwritingand the desired output is the actual digits in the zip code to create dataset for building machine learning modelyou need to collect ma... |
16,998 | given set of customer recordsyou might want to identify which customers are similarand whether there are groups of customers with similar preferences for shopping sitethese might be "parents,"bookworms,or "gamers because you don' know in advance what these groups might beor even how many there areyou have no known outp... |
16,999 | that questionwhat is the best way to phrase my question(sas machine learning problemhave collected enough data to represent the problem want to solvewhat features of the data did extractand will these enable the right predictionshow will measure success in my applicationhow will the machine learning solution interact w... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.