 Hello everybody, good morning, good evening, good afternoon and thank you for joining this episode of Neo4j Live. Today we talk about the book Graph Algorithms for Data Science and I'm super happy to have Tomas Bratanic with me today. Hi Tomas, how's it going? Hey, you kinda almost named my name which is quite commendable so yeah I'm doing very good how about you I'm good as well I'm looking forward to this episode now that how is the proper pronunciation it was good right it's Tomas and then Bratani it's like nobody has the chur. Okay, Bratani Chur. So now I know. It's good to know because I have been using your name in the past for almost a long time and I'm planning on using your name for a long time as well because you've been and you are super active in in the Neo4j community as well as in you know posting blogs and answering questions in the community but you know as I mentioned also posting blogs so you have a very active medium blog where you post I mean it feels sometimes like every week um is is or maybe more often than once a week you post something pretty amazing there but you you're super regular so i think i just opened it up latest latest post from you was on march 30th of march so a couple of days ago and then in february and so on yeah I mean I used to be more active, now I do a bit more coding, I mean integration but there's like, I think there's like 80 or 90 million articles. Yeah, that's a lot and it kind of kicked off, well, you know, for a long time. But I think you went really on fire towards the course of last year, when you wrote lots of articles, lots of posts about, you know, artificial intelligence, Gen-AI intelligence gen ai llms integrating knowledge graphs integrating graphs with with gen ai with rack so so yeah but the funny thing is the funny thing is that like this like nlp like natural language processing topics were always interesting because i wrote like let's say one or two a year interesting because I wrote like, let's say one or two a year, they got like five times as many views as the other blog posts. So like MLP, natural language processing and like things around that, that was always interesting. It's just that now with LLNs and GenAI, that's more at the forefront, right? Because LLNs make life much easier. Yeah, and I mean it's the hot topic these days. Everybody is talking about it. Everybody wants to say something about it. Everybody wants to use it, wants to play with it. So it's only natural that the interest is is high and and we do a lot of it as well here at neo4j so um there is there's a good i think as a good connection and a good a good reason for it to use uh these these tools and to but to also pair them with uh graph technology um and i think we we talk about those about those in relatively often on these streams. A couple of episodes in the past, we had interesting guests to showcase what they're doing. We have together with Jesus, I'm doing a going meta live stream series, which talks about these things as well in the past. So it's a very interesting topic with lots of content. It's a very interesting topic with lots of content. And, you know, very, very interesting to see what's happening, how the technology evolves, new discoveries, new ways of working with data, new ways of, you know, playing with that in that field and try things out and also to make things work and to implement things in the end and to benefit everybody. So that's a cool cool thing yeah and you you've been also a little bit of a mentor i would say in in this space for for many people leadership exactly yeah yeah totally um you you have you inspire lots of people that have been out in the field and read your articles and then tried out themselves, play with it and then post themselves something about it and lead on to how they then themselves become influencers or, you know, thought leaders, I guess, or, you know, at least experts in the field and to share the voice here and to share the stories. It's quite awesome to see that, like, you plant an idea and then you see, like, like glowing people giving their own touches and like inputs and then making you something great yeah i think that's awesome yeah absolutely no that's very cool very very very good to see um and i guess that's a little bit how how you how you decided to write a book um is is that is that one where you want to kind of collect your knowledge and then summarize it in one space? Yeah, I mean, it was kind of funny because as you know, I've been writing a Medium blog post. Even before Medium, I had a WordPress blog posts, like even before medium, I had like a WordPress blog post, which probably nobody knows about, but I had a WordPress blog post for like two or three years and then went to medium. But then it was like I remember exactly there was like one blog post that I did, It was kind of long and it showed basically how to build value element topic, how to build knowledge graphs from text. And that was like maybe four years ago or something. And I think we use some like Google API for like topic detection Google API for like topic detection and then like named entity extraction from Amazon or something like that. So it was, it wasn't like today, right? Where this is all much simpler. It was like, had to go to one provider for this, to another provider for that. And then kind of combine everything and it's already static, not flexible. Yeah, but anyway, I showed how to build an orgy lab after text and it was like, at the end, it was like a very long blog post. And then at the end I say, if I'm ever going to write a book this is going to be a chapter in the book and then you know what happened Michael said Michael Hangard Of course, write a book! And then he said let's write a book. Why not? I mean, by we, I mean you. And then he got me in contact with the publishers. And that was that. Well, I mean, he at least contributed the foreword. So he did something. But I mean, yeah, I can imagine how it went. I mean, he was a helpful also along the way. He likes syntax and book and he did chapter the reviews and, you know. Yeah, absolutely. All over the place. But yeah, it's basically Michael. Because it's also my car why i work for neo4j in the first place because maybe that's even like before the book happened like long long long time ago like seven or eight years neo4j didn't have a graph algorithm library. And I mean, and before GDS, it was called graph algorithms. And I started writing content and contact me, Michael, when graph algorithms, the first library that now doesn't exist anymore was being developed. And I said, I like to write content for Neo4j and do you have any work for me? And then he said, yeah, I need someone to write documentation for graph algorithms. A library, right? Because it was a labs project, so it means not... Yes, I remember.... actually supported, so like external contributors. And he said, yeah, I need someone to help with graph algorithm library documentation. And I said, yeah, fine, why not? I mean, what's the reason it could happen? And then that was like seven years ago. And then they implemented some like first 10 algorithms. And then I was like, in the beginning, I was like reading research papers, algorithms, how people are using it, like what to do, but also like giving like user experience feedback, like a little bit, I have a little bit with standardization of parameters of a graph. So that was basically, it was all meant to be right. The second I started to work for Neo2J I was writing documentation about graph algorithms. Cool. And now you went on and written a book. It's called Graph Algorithms for Data Science. So it's a little bit like you said, the evolution from the original graph algorithms data science. So it's a little bit, like you said, the evolution from the original graph algorithms without the library part where we had like data, they were like a little bit standalone in their own, in their own world. And now we have a proper graph data science library and client that's, that's fully integrated with Neo4j. And that's, that's, that's part of, of Neo4j and, and the book covers book covers different algorithms and showcases them across. Yeah, I mean, actually it's designed because unfortunately most people never worked with graphs. So it was designed to take a complete novice or someone who never seen graphs before or used them before and teach them. So the assumption is that the user knows a little bit of Python. Maybe they do like a pie chart or a bar chart in Python, just like some basic data analytics, but they have no idea about Neo4j or anything like that. And then the idea is to take them and like educate them first a little bit about what are the graphs, like when to use them, how to model them. And then the next two chapters, we kind of go through what is Cypher, what's like the syntax of Cypher and like also like how to do, how is it similar to SQL, how to do basic aggregations, stuff like that. So that's gently... I feel like that new users, people who never touch the technology, they need a lot of handholding they need a lot of handholding, because you want it to work. Because if I give you something and on the first try it doesn't work, okay, you may try again. But if on the second try it doesn't work, you're just going to say, okay, that's not for me, goodbye. Yeah, you can be discouraged quickly and it's yeah i mean whatever maybe next time yeah and then that's why i take the approach of like really hand holding and like really gently introducing because i can i want like you want those small victories to motivate people and have something working right, because if nothing is working, that's not really motivating. Yeah, you're right. So the idea is to take a complete beginner and make them, I don't know what's the word, but you can like graph data science. Because maybe I can share a picture. Yeah, and we can. So we plan to look over the book a little bit, give some insights, and show you a little bit what to expect there and some learnings and some tips and tricks from Tomas as well. So maybe that's a good way of doing it today. And also, if you have any questions, any comments, anything you want to know more about, then please don't be shy. Use the chat and let us know. We are also giving away a couple of free ebook versions of the book so um if you're watching this live and if you are watching this on twitch or on youtube because otherwise it's not going to work on the other channels but if you're watching this on youtube or twitch or you can switch over if you're watching somewhere some if you watch it somewhere else if you can switch over if you're watching somewhere else. If you can switch over to YouTube or Twitch, then you can use exclamation mark raffle. And you're in the pot. And later, maybe after we introduce the couple of chapters, we draw a couple of winners. Tomasz, remind me, how many PDF e-books do we have? Like three. TOMASZ CZELINSKI- Do like three. MARTIN SPLITTINGER- OK. All right. That's good. Three. So that's a good number. So if you want to win that, then let's switch over to Twitch or YouTube and use exclamation mark raffle. And good luck with that. And yeah, here is the slide. Yeah, let's go there. So now you can observe my diagram skills. Yeah. So it was funny because all like with the book, like images, right? It's all about copyrights. So in the end, like this, I don't know how many let's say 100 pictures in the book and like 99 came from me and only one was from someone else so a lot of diagrams and images as well and yeah this is the image you can see it's on the second page and basically how I designed the book how I designed like to take a journey from a complete novice and hold you basically thank you by the head and make you here we call it yeah that's good that's cool and that's like incremental I guess it starts. So it's super simple and easy and then you. Yeah, like I said, so we start, it's like what is a graph? Like when to use it, how to construct it, but it doesn't go like into very a lot of details, but just like some basics about graph construction and modeling. And by the way, we use like Twitter dataset. I mean, can you still call it Twitter? Yeah, it's probably has a different name now. You Twitter because it was written before X happened. So yeah, so first we construct a knowledge graph, I mean a graph of a Twitter dataset. Maybe, I don't know, maybe if I should jump out a lot or not. Maybe, I don't know, maybe if I should jump out a lot. Yeah. But yeah, I mean, there's the simple idea, right? How to describe the structure then how to import it into Graph database. And then once we have the graph, we kind of do exploratory data analysis, right? And then cipher to the exploratory data analysis. So like how many users are in the graph, like how many posts, like what's the ratio between posts and users, just some basic statistics and help you get into the flow of writing Cypher and using it for analysis. And then that's, I think, chipped up to, so like graph modeling and construction is like chapter one, chapter two. And you already call it graph query language. It's very, very, you know, very up to date. If you don't know, we're laughing why it's a little bit of a joke, the ISO committee just published the GQL as an official database language standard. And it's called, obviously, GraphQL language. And that is an official standard now for databases, how to interact and how to query data with databases, graph databases, property graph model databases. And that's now an official standard, similar to what data with databases graph databases property graph model databases and um that's now an official standard similar to what sql is for relational databases as of past friday and it's called gql so it's it's very cool we're very very happy yeah i had the first part yeah exactly yeah yeah Yeah. So that's, that's, I think chapter three and four, and then we put maybe, yeah, I don't know exactly, but yeah, somewhere around that. And then we go into graph algorithms, right? Cause that's kind of the topic and the title of the book, right? It's called graph algorithms. the title of the book, right? It's called Graph Algorithms for Data Science. Yeah. So we dive into graph algorithms and like the restarts with the classical ones. So the classical graph algorithms like finding the most important nodes using something like PageRank or like finding communities of nodes or like identifying similar nodes and then also a little bit about indirect relationships. So that's like the, that's like four or five chapters about graphic bulletins and how to use them. And it's all like, if you read any of my blog posts, the chapters are kind of, each chapter is a standalone like tutorial. So you get like a theory introduction and then some nice diagrams, what you're actually going to be doing in the chapter, what was the idea and we kind of put you into the scenario so like imagine you're looking at twitter and want to analyze something whatever that and then we actually do the analysis throughout the chapter and and explain out the chapter and explain what we are doing, but also the results, what do they mean and how to interpret them. And then when you kind of get the, I call it graph machine learning. I mean, this is some distinction I came up with because also graph algorithms, they are also machine learning. The typical graph algorithms like PageRank or like community detection, they are like unsupervised machine learning where you basically say, here I have a graph, right? And I don't have any labored information. So that's why it's unsupervised. And please find the most important node within the graph. So that's why it's unsupervised. But I specifically, I kind of mentioned the reasoning behind this distinction is that for the graph machine learning, I kind of say that here is basically we're training as a class, in this book there are only classification models. We don't do any regression. So we actually train like a classification model like a random forest model. So we use graphs and like Northern bearings and all of that fancy algorithms for like feature engineering. And then we extract the feature vectors for nodes and use them downstream to train and influence in machine learning models like classification. So that's basically the gist of it. So yeah, like I said, the idea is to take somebody who's never seen graph of the witness and have them train a couple of machine learning models based on the graph. OK, so I don't know what to, how should we, do we just walk? Well, let's maybe pick a couple of chapters where you think are most interesting and give a good impression and maybe where we can share a bit of additional knowledge and a bit of interesting bits where you think this makes a good impression, a good overview, and is maybe most interesting for the audience. And maybe we do that. Does that make sense to you? Yeah, I mean, it's totally fine. It's totally fine. So by the way, the first chapter is free, right? So if you're interested, the first chapter is always free. I don't know how you... Yeah, you go just on the website and click. Maybe look inside. Yeah, and you get the first chapter because i have the oh actually i'm not signed in right you can see yeah oh that's good yeah so you can you can check it out the first chapter but yeah for example we say here are you not listening Are you not listening? But yeah, maybe let me show in the PDF. It's like, it's not so nicely. It's how to spot a graph-shaped problem. Yeah, it's not so easy because PDF is not so nicely structured. But yeah, basically we go into how to, how to spot a graph shape? Okay. Problem. And for example, like the typical use case is like the terminology is like self-referencing relationships where basically you have like a single entity, like for example, user, and then like just one type of relationship between users. So in SQL, I think that would be like self-joins. But in graph database, that's just like a nice graph. So basically you have like users who have relationships between us. It could be for that, that they can send money between each other. Or like, if you want to be more technical, you could have like, for example, dependencies, like let's say Python dependencies, and then see, okay, if there's like a vulnerability detected inside the package but all the packages that it influences because you can then just reverse depends on relationships to do that so that's like one types of graphs another type of graph is the like pathfinding networks that you have. Basically you're searching for certain paths because you can also think like Google Maps. They have, you say I want to go to Berlin, and then the locations are nodes, and then you have different options. And even on Google Maps, you can choose, do you want to go by public transport, do you want to go by car, do you want to go by bike? Do you want to walk? And depending on the transportation mode, there are different paths and it also like different costs. Like for example, the cost in Google Maps is time, right? How much time do you need? Yeah. Yeah. Okay. Okay, so that's like another like classic example for when to use graph databases and graphs and then the third one that I showcased is the so-called like bipartite graphs, where you have like two types of nodes. So for example, user and item, and then you have which user you have like the purchasing history, like which user bought which item. And these types of graphs are very frequently used in recommendations, right? Which user bought which item. And these types of graphs are very frequently used in recommendations, right? Because you can, or in e-commerce in general, right? Because you can use these graphs to find similar users, like groups of similar users. And that like, if you use fancy marketing lingo, that means like segmentation, right? Groups of similar users, or you can also use this information and for recommendation, right? So if me and Alex have similar tastes, like similar purchasing history, it is a good chance that if you buy something new, I might also like it because we had similar Purchasing History. That's also quite similar, frequently used and it could also be not just like purchasing but for example like also like spotify you have like playlists and single songs right so it's a lot of these use cases so that's like the i think the three use cases that I showed or actually I did four. And then I could, I just said complex methods, but like, because Neo4j in particularly labeled property graph models are very good for representing highly complex and heterogeneous information and which is highly connected and like biomedical so this is one image that i didn't draw and like biomedical networks like prime example of like heterogeneous, a very complex connected information. Because here, for example, you have genes and genes interact with genes, but genes also interact with compounds and diseases, and then it can upregulate, it can downregulate, it can totally associate when you don't know exactly what it is. And it's like highly complex and everything is connected, right? And knowledge graphs, as you might call them, knowledge graphs, shine in that data representation and then it can also allow you to analyze direct connections, but also indirect connections that are also might be useful. Because for example in the previous example we said if two users are similar right you might recommend new items based on that but for example it's also like the two genes you could identify the two genes could be similar because they interact with the same compounds. Or I don't know, I'm not an MD, but I just assume something. And then you talk if two genes are very similar, have similar effects, whatever, then they might also be used for similar diseases. And maybe like it can help you come up with ideas, like what should we test or at least prioritize because people always have a lot of ideas yeah it's just that you need some prioritization like what should we look at next and then graphs can help you basically capture existing knowledge. And then once you have that, they can help you predict the future. Yeah. No, it's very powerful stuff. It is almost like it. It's pretty amazing what it can do. I would say we give the raffle five more minutes. I would say we give the raffle five more minutes. So until 20 to the hour, we will do the raffle. So if you want to take part in it, give it a go on Twitch or on YouTube if you watch it live. Exclamation mark raffle, and you're in the pot, and then we draw after that. So now's your chance to win the e-book version of Tomasz Batanic's book that we are discussing today. And, yeah, maybe next. I don't know how would you continue, but do you want to talk about maybe about your favorite algorithm? Is that something we could look at next? Something that you think is most interesting one or something you think is a good one that gives a good impression of? Yeah, we can actually show is that what's quite interesting is with What's quite interesting is with graph algorithms, I mean, it's similar as with most machine learning, but it is that you don't feed algorithms to your data, but you feed data to your algorithms, if you know what I mean. Yeah. Yeah. I know what you mean. Yeah. So we can take a look at one example for the Twitter that I am certain you have seen before, I'm certain you have seen before, but it shows quite well, like the power of indirect translating indirect patterns into direct relationships. It also shows the power of why it's useful to have a graph database because like you can run like a graph algorithms anywhere, right? But usually running it's like the same thing as in machine learning, just running like a machine learning model or training it is very simple. But doing the feature engineering and preparing the data and like massaging it so that it nicely fits, like that's the big problem. So that's something that I show because it's actually I think a chapter 5 we show in chapter 5 we show he starts with graph algorithms but then chapter 6 7 8 I think maybe also 9 I I'm not sure. We show how to feed the data to match graph algorithms input, right? Because mostly graph algorithms are designed to run on a simple graph. So like single node and single relationship type, they aren't designed. So like the typical example is like people friends, right? So let's like mono per type, mono meaning one, per type meaning, I don't know. But like something like one type of notes and one type of relationship, right? So it could be, like I said, person, friend, person. But here in this example, for example, in the Twitter example, it's very famous with tweets, right? Because you can write a tweet or a post nowadays, but then somebody else retweets it, right? So that's like a relationship kind of between the person who wrote the original tweet and the person who retweeted but it's not a direct one because here for example you can see that sasha published a tweet oh no actually it was francois who published the tweet and then sasha retweets it right so it's not like by uh how you say uh raw data, in the raw data, there is not a lot of, there's no direct connection between the two users, right? But then you can make assumption. Okay, if I retweet your content, that means I like your content and I want to share it with my audience, which is a fair assumption, right? Yeah. And you can say, okay. So that kind of means I am amplifying you or the, cause here I went, amplify and you can use Cypher to say, okay, these indirect relationships. So it goes from user to the retweet, from retweets to the original tweet and back to user, you can say, okay, this pattern for me, I want to represent a direct relationship between two users. And that means that Sasha amplifies Francois. And this is basically how you're reducing or transforming indirect relationships to direct relationships. And that's like a big part of graph algorithms. And like I said, also it's like four chapters in my books book just showing how to basically massage and transfer data to fit a graph algorithm input. Because I think that's the most important thing when you're like uh data scientists like analysts right um when you have like nice clean data uh yeah it's very nice but like in reality the reality is often very different yeah it's really very clean and nice it's a bit of a mess. Emphasis on first like exploring to see what's happening inside your data, how because what are some like characteristics of the data set or like maybe something that you messed up maybe or is something that like the the the the one who designed API thought that it should be correct like but it kind of doesn't make sense because for example when I scraped the Twitter right we are API's you long time ago, you could still use API. Yeah. I learned that, for example, every time you retweet someone, by default, it's also a mesh, right? I don't know why, but that's just how it is. Like under the hood, that's how you get it from the API. And then you need to take into account these anomalies, right? So what does the data actually kind of have to dig deeper a little bit and explore and explore and see like, is this like a characteristic of like the network? Is this characteristic of the like implementation? What does it actually mean? Cause it's not like just running algorithms. It's also interpreting the results cause because that's the most important thing. You run an algorithm, you get some numbers, and if you don't know what to do with those numbers, what do they mean? Exactly. What do they mean? That's very important. It's useless, right? You say, okay, Alex has page length score of five. And whatever. What does that mean? Nobody knows. Then you have to go a little bit deeper. So, yeah, so that's, like I said, Transforming data sets and like massaging is very important because I have like, for example, another example where basically you don't have any relationships. You just have a feature vector. for the back while you're looking for that I would say we close the raffle so I think we will be already over time anyways from what I said we would be doing it so I'll close it so everybody that's in the pot by now you have the chance to win one of three e-box and I'll pick the winners as well through the tool that we are using here. So it's all random, it's all very safe, so don't worry I'm not picking anybody by their name or anything else. It's just a tool is gonna do it. And the first winner is Martin, congratulations. The second winner is Salman and the third winner is Amal, congratulations to you three. So you see here, if you won, then that's it. If you did win, please send me an email and reach out to me at alexander.ertl at neo4j.com. I'll post my email in the chat and then you can reach out to me and we get the link over to you. I'll do that in a bit. And yeah, with that, back to you, Tomas. So actually I decided we're not gonna look at nodes with no relationships or like feature vectors because here we have more 3D pictures. because here we have more three-tiered pictures. Okay. I mean, like, for presentations, three-tiered pictures are better. So, for example, another way how you could, like, turn, like, sometimes people call them implicit relationships or, like, indirect relationships between entities and turn them into direct relationships so that you can run graph algorithms on top of that. It's the so-called co-occurrence networks. That just means you kind of define a co-occurrence between two entities and here in this example I think medical people tell how often they occur in the same article. And then that kind of helps you to find communities of similar entities, so how they are kind of related, so what's showing up very frequently. So for example, we have anti-anxiety agents, and they co-occurred with the medical retention. That's something that was just automatically generated, but taking a look at how often do entities co-occur, like medical entities co-occur in the same article. And then we have maybe more the, I say, popular ones. So for example, you can also take this approach and just look at Headed Butter and see, for example, if two characters If two characters are in 10 words of each other, they appear within 10 words of each other in the text, that by definition, we define an arbitrary limit. And let's say we define 10 words. And then that means that they kind of co-occur. And if we take this algorithm and run it through the whole book, we can then construct a graph out of the co-occurrence relationships and see who interacts with each other. For example, Petunia really interacts with Dudley. I think this is the first book and well-known. And then, for example, obviously Harry Potter is the main character of the book. So it's the largest now, then very close to Harry, Argus, Ronnard, Hermione is slightly more far away, but then you can see kind of how characters group together, right? And then you can also, for example, you could use kind of set, I didn't use like community detection algorithm here then you can find like uh but it could be an add-on you could yeah i mean you could i just unfortunately didn't uh uh at uh uh colors right because colors make the images are also nice. Yeah, yeah. And then he's... So for example, here we have like when two, like here we have a co-occurrence network of ingredients in dishes. So for example, when two ingredients are in the same when two ingredients are in the same recipe, right? We say that they co-occur, that there is a relationship between the two. And then the more frequently they are in the same recipes, the stronger the relationships between the two. And then we can use this, for example, here to analyze uh communities of ingredients and for example you can see that like eggs flowers sugars milk that is very frequently used so that would be like that's like most of the baking stuff that Yeah. And then I think I would say like main dishes, it's onions are very vital. Yeah. More like savory. The other sounds like more like cake ingredients and there's more like onions, more like, yeah. Yeah. More savory, a bit more like, yeah. It's like, yeah. More savory, but more, you know. And then you can, for example, onions, and then you can add like chicken, pork, like tomato sauce, potatoes. And you can, if you can, if you dig deep into it, you can kind of, because I know like that they did like some analysis of foods from which cuisine so like from which countries and then you can do like these uh visualizations for each country or like each region and yeah it's quite interesting to see differences between different religions how they combine ingredients, for example. So that's that's always nice because the nice thing about like when you're dealing with small graphs is that you can visualize them and they make really nice visualizations for demos presentations but like when the graphs are too big to visualize and that happens very soon that even like thousand nodes it's beyond any like it's not you you can't find a lot of insights looking at thousand notes. Yeah, no, that's not going to work. So that's when graph algorithms come in. So you can think of how I usually explain it. Like when you're dealing with small networks, you can say, okay, egg, flour, and for me it's funny, it's peanut butter. So I think this is very American. A lot of peanut butter. And like I said, the effort, like small networks like this is maybe 50 or 100. You see these relationships and kind of patterns and it kind of makes sense. But like, let's say you're dealing with even 10,000, but you can be like in the millions, right? What you're going to do, you're not going to look at million notes and kind of digest something you hope to find. Because you can't do that, like, at least in a timely manner, what you do, you use graph algorithms. So graph algorithms are then kind of your substitute for when you can't, like, manually find information, then you use graph algorithms, which, like, programmatically they use some fancy mathematics. They find those insights for you and they say, like programmatically they use some fancy mathematics. They find those insights for you and they say, okay, these are important, these are communities. Maybe these are how communities change over time. I don't know. So yeah, so that's how I would, that's what I would say about graph algorithms. It's basically when you're dealing with graphs that are too big to visualize. That's when you want... And I mean, that happens quite fast. Yeah, that's cool. We have a couple of questions. Tomas, do we want to... Yeah, I mean, we can... Do we want to go through them before we wrap up? Yeah, we can look at some questions. Okay, cool. So one comes from Salman. He asks, will this library be available for free on AuraDB for learning and for experimenting? Or maybe to rephrase it because I know already the answer, what's the best way of exploring and try out and learning graph algorithms in the Neo4j environment? What would you recommend starting? So I would actually recommend Neo4j Sandbox Neo4j Sandbox because, so Neo4j Sandbox is just a bunch of projects. You can, for example, take a graph data science project. You can actually look like libraries and then if have data science is enabled it kind of implies that some algorithms are in there that you can use so if you're like completely new you don't know you you just want to try it out and test i would recommend spinning up because it's like a free recommend spinning up because it's like a free cloud instance that you just click on create, wait a minute or maybe less, 30 seconds, and then you can open it and it's got like nice guides and it hopefully handholds you. Yeah, and it has already the data so you don't have to worry about getting something there. And to completely answer the question, on RRDB-free, the Graph Data Science library is not available. So you are currently not able to try it out there. There is a paid tier which allows you to use the Graph Data Science library, but not on the free tier of AuraDB. So yeah, the sandbox is going to be the best way to play around with it and to see what it is. Cool. The other question comes from Lavanya. She asks, what are some known challenges of the cipher language implementing custom graph algorithms as a complex query, e.g. the with statement only always maintains modifies a table structure. Knowing these challenges would help users to look right these algorithms in the backend. Maybe that's a bit of a longer question. A long question, but what I would say is that like what you're saying is that like you want to write your own custom algorithms with Cypher and yet there's like a lot of I mean there are like no challenges of Cypher. There's like someone can write a book and I mean, and talk about it. I mean, I'm not saying that there are a lot of known challenges for Cypher because I honestly don't know, but it's like, this is like a big topic. Yeah. But what you should know is that like in the book, when we are referring to graph algorithms, we are not referring to actual, to implementation in Cypher, but in Neo4j you have a graph data science library that exposes less algorithms to do procedures, right? So if you want to run PageRank, you just say, okay, I want to call GDS PageRank.stream. So I want to to call GDS page rank.stream. So I want to run a page rank. So that's all you need to do. It's not like now you go into this PhD math mode and you look at the original paper and then use Cypher to implement the original paper. I mean, that's like only a handful of people know how to do it. But for the rest of us, we just kind of abstract the complexity away and just use procedures to use to call the algorithms. Yeah. Yeah. Cool. And the next question comes from Mac. He asks, is Neo4j suitable as a replacement for vector databases? I think we talked about vectors. You talked about it a little bit. I mean, that's also. I know it's also. It depends. Most of the time. Yes. There are probably some cases where no. and it depends like exactly what you're doing but in theory I would say most of the time yes not always so that's a very nice political yeah no yeah but that's that's hard to say. And it's always difficult if you don't know exactly what's going on. I think things are changing, right? Exactly. You don't know what's going to happen in one month. Yeah. Yeah. Absolutely. Cool. I think that's all the questions I could at least see right now that come in. If you have any other questions then then please obviously reach out to the community either on Discord or in the community forum or comment down on below this video on YouTube we will have a look out as well for anything on there. Anything you want to to say before before I close us out too much yeah I want to say thank you to Asheville he said it's very nice but yeah like I said, the idea, so if you don't know anything about graphs and you want to kind of, if you want to start, then I think it's a good book. Obviously I'm biased, right? But it's a good book. But if you already know a lot about graphs and graph algorithms for the last three chapters, actually four, I have the code on GitHub because we use, as you can see, spaCy, for example. But also like machine learning libraries in Python. And you can take a look if that's interesting for you. Obviously, there is no copy, there is no text in notebooks because it is what it is. But I don't know if you can also maybe just share this link if people want to take a look at some of the latest chapters it's fine for me you can if you're just interested in seeing what's the code what maybe to expect by the end of the book you can take a look around the code yeah the culture to them if you if you have no idea anyway and then you can decide if you like it yeah no no thank you very much thank you you very much, Thomas, for, for obviously for writing this book. Thank you, obviously, also to Michael for making you write this book. It's really, it's really good. If you if you didn't win the ebook, we have a 35% off discount code that is also the YouTube description in, in the video. So if you want to, you know Tomas has a discount code and you get the chance to get it for a little bit cheaper than the list price. And yeah, thank you very much for the cool presentation. Thank you for showcasing us or guiding us through the book. showcasing us or guiding us through the book. And thank you everybody for, for, for participating today. The next stream is going to be on the 25th of April. So there's going to be next Thursday where Martin and I, we will talk about the Neo4j and LLM fundamentals course that's happening or that you can already participate and try out yourself on the graph Academy. And we will, we will go through the basics of the concepts of the, of the, you know, what to expect there, what, what you can learn there and how it works in the, in the stream next Thursday. And if you between now and then basically want to know what's, what's up, then check out the new Virginia community on discord or on the forum, as I said before, for any questions, anything, any open discussions, anything else where you would like to talk about and you have, you know, issues and want to discuss or network with Neo4j folks and experts. If you want to learn more on the Graph Academy, then please check that out as well. That's a really good place to learn about graph databases and also graph data science we have we have courses as well for this so you maybe it's a good combination to try out one of these courses on the graph academy and then also read the book from tomas and if you want to play with it you can use neo4j aura free which obviously gives you a database on the cloud but does not work with crop data science. So I think that's really a bit of the downside here, but you can use Sandbox instead as we discussed. And yeah, with that, thank you all for watching today. Thank you for participating. Thank you for your comments and your questions. I hope you fun um and i hope this was informative and interesting to you um if you want to know anything else then yeah reach out and yeah with that thank you very much and thank you tomas have a good rest of your day and see you soon bye thank you bye
Neo4j Live: Graph Algorithms for Data Science
Graphs are the natural way to represent and understand connected data. This book explores the most important algorithms and techniques for graphs in data science, with concrete advice on implementation and deployment. You don’t need any graph experience to start benefiting from this insightful guide. These powerful graph algorithms are explained in clear, jargon-free text and illustrations that makes them easy to apply to your own projects.

Guest: Tomaz Bratanic

Book: https://www.manning.com/books/graph-algorithms-for-data-science
35% off with code: au35bra
Blog: https://medium.com/@bratanic-tomaz
Neo4j Graph Data Science: https://bit.ly/45V0WMU
Sandbox https://dev.neo4j.com/try
Code Examples: https://github.com/tomasonjo/graphs-network-science/tree/main

0:00 Intro
15:20 Chapter Overview
24:25 Chapter 1
34:30 Graph Algorithms with Twitter Dataset 
43:00 Relationships between entities ( co-occurrence)
52:10 Q&A
1:00:30 Wrap-Up

#neo4j #graphdatabase #datascience #algorithm #python