‫So in the last video, we saw this little chart here and the steps to take in a new project.
‫If we've been through this, if we've got our computer, we've downloaded and installed Mini Conda that
‫we did in a few sections ago.
‫Now we're up to here.
‫We want to start a new project.
‫So how exactly would we do that?
‫Well, that's what we're going to cover in this video.
‫We're going to work through here, start a new project, create a project folder.
‫Yep, we'll do that.
‫We'll get our data ready for the project that we're working on will make an environment.
‫We'll probably want to create an environment that uses much the similar tools that what we've been using
‫in our past environment.
‫We'll make sure that environment works by starting up a Jupyter Notebook.
‫So if we come back to the desktop, I'm going to start up a terminal here.
‫So how would we go about it?
‫If I've been working in, you might be working somewhere different, but for me I've been working.
‫So right now I'm going to change directory onto my desktop, into my ML course folder and if I check
‫in here, I've got a few different things going on, so a few different folders, but we've been working
‫out of this sample project folder, or at least we have in the last few videos.
‫So if I go on a sample project and if I ls there, which stands for list, I list all the things that
‫are in here.
‫So you can see there the introduction to map pop lab numpy pandas psych learn.
‫And the thing is about this folder is that we've got an end folder in there and now in this env folder
‫it's hard to say actually inv env shortfall environment in this environment folder contains all of our
‫tools.
‫And if you remember way back when, if not, that's okay.
‫We created that environment using Conda.
‫So create an environment collection of tools using Conda.
‫And so what we might want to do for this new project is if we go back up to where we were in the ML
‫Clause folder, if I wanted to start a new project.
‫We might want to create a project folder that way.
‫If we're in a new project, say for example, the one we're going to work on now, which is working
‫on classifying whether a patient has heart disease or not.
‫Meanwhile, I want to create a project specific folder for that, and then within that folder has all
‫of these these little tidbits here so that if we needed to share our work, we could share this folder
‫by itself and then hopefully someone on our team or someone else could replicate what we were working
‫on because it's all contained in one folder.
‫So let's do that.
‫So if we go here, maybe we go make dir and we'll call it let's go project heart disease when I.
‫We'll go to Heart Disease Project, and in sticking to our nomenclature, we might use our hyphens instead
‫of underscores.
‫So we'll do that.
‫Make sense of make directory heart disease project.
‫Now if we go ls we've got a folder.
‫Heart Disease Project.
‫So if we seed into that.
‫So change directory.
‫Heart Disease project.
‫LS There's nothing in there.
‫But we want to create an environment folder like we've got up here.
‫In here.
‫And how then would we replicate if we went back to our sample project folder and we ALS there?
‫How would we replicate this environment?
‫Because we know this one works, because we've been working through these notebooks.
‫And what I mean by replicated environment is that we want to use the same tools in our heart disease
‫project as we have working through all of these introductory notebooks.
‫So I'll show you one way that you could do it.
‫So we first have to activate.
‫So we go to End List.
‫We first have to activate our sample project folder or environment.
‫So let's do that.
‫We've seen this before.
‫To activate.
‫We'll copy this path or we can just type it out.
‫Users slash Daniel slash desktop slash ML Course slash sample project.
‫Wonderful.
‫So now that environment is activated, we can tell that because base has changed to this.
‫And now what we want to do is we want to create a new environment based on this one.
‫So one way to do it is to export everything that's in this end folder as a YAML file.
‫And what a YAML file is, is basically a text file of instructions of how to create a new environment
‫based off this one.
‫So let's see it in action.
‫We can do that by running the code conda env export and then this little symbol, this arrow, this
‫greater than or I never get these these correct greater than a lesson.
‫So this is the way I think about it is this is greater than what's on this site.
‫It doesn't matter.
‫This is like an arrow in this case.
‫So it's conda and export like an arrow pointing to the file you want to export it to.
‫So in our case we're going to call it environment dot, yaml or why html which stands for YAML.
‫The actual way to spell yaml is y yaml.
‫If you see either of these, why yaml slash?
‫Why yaml that?
‫The same thing if we do that.
‫Beautiful.
‫We get a whole bunch of different outputs here.
‫Lots of warnings.
‫So if we go, LZ.
‫We should have an environment dot yaml file.
‫So if we look at that, if we go VM environment yaml.
‫So this is showing us what's in our Yammer folder.
‫These are all different dependencies.
‫So conda packages that our previous environment is built upon.
‫So see their socket learn equals version 0.22.
‫Wonderful.
‫We've got Seabourn.
‫Wonderful, we've got python.
‫We've got a fair few things here now to exit them, we can press escape and then colon see how it appears
‫down here and queue.
‫Excellent.
‫Now, to create a new environment, we can deactivate the current one.
‫Second a deactivate.
‫So we can see now we're in the base.
‫We're back to base.
‫And to create an environment from a YAML folder.
‫We're going to change back into our new Hot Disease Project folder.
‫See here, there's nothing in it.
‫Now we're going to run the command.
‫Conda env create.
‫See how we're in the heart disease project folder.
‫Run this command in this folder.
‫So conda emf create prefix.
‫Dot slash envy for M and then hyphen F for file.
‫And then now we're going to pass it the path to our YAML folder, that file that we just created.
‫So dot dot, it's in the directory above environment y QML.
‫Beautiful and now running.
‫This is going to create an end folder within the Heart Disease Project file.
‫Now doing it this way ensures that we get the exact same tools as in our sample project env.
‫The other way we could do this is what with the one we've seen before is by just going conda and create
‫prefix dot slash env and then passing it the tools we want.
‫So I get learn pandas num py map plot lib jupyter.
‫We could do it that way.
‫But in this case, we want to make sure we have the exact same tool set for this project that we've
‫been working on.
‫So that's why we run the command.
‫Conda and create.
‫Prefix.
‫Dot slash.
‫Envy.
‫Hyphen f.
‫And then we're going to pass it the path to our environment y html file and we'll hit enter.
‫Now this is going to tell Condit to go to the Internet and download all of those tools that we need,
‫such as pandas, psychic, learn, map, plot, lib, all the specific versions that we've been working
‫with in our introduction series.
‫So while this runs through, we might speed up the video and I'll see you when it's done.
‫Beautiful.
‫That's what I'm talking about.
‫So we've been through that.
‫So basically has just gone to the Internet, grabbed all those tools that we need.
‫We've got a success message, this and that all these execution and transactions are done and to activate
‫the environment we just created, we can use this, but what we might do is just go on to MV list to
‫see what environments we have.
‫So now we can say here.
‫In users.
‫Daniel Desktop ML Course in our Heart Disease Project file, we now have an EMF file and to activate
‫it we can run.
‫Make sure you've got no other environment activated.
‫So we're on base here, so we go on to activate.
‫We're just going to run this code here.
‫Then it's told us uses slash Daniel slash desktop slash ML course.
‫Now again, of course your path might be different.
‫I'm just showing you an example, one of what mine looks like for this heart disease project that we're
‫going to work on if we hit Enter.
‫We notice that base changes to this path name.
‫So we've activated the environment and now we're in the Heart Disease Project file.
‫So to test it out, we can go Jupyter Notebook.
‫And this should bring up a Jupyter Notebook in our browser.
‫Beautiful.
‫If we look here, we've got the MB folder.
‫So in there we've got a whole bunch of different stuff that Condor has created for us.
‫And so if we go back to our keynote, what have we done now?
‫So we've started a new project.
‫Yes, Tick.
‫We've created a project folder tick.
‫We've created an environment, a collection of tools, and we have access to Jupyter.
‫So we have our workspace.
‫What we're missing now is a data folder, so we can get that.
‫What we're going to do is if we come back to Finder, I'll show you what mine looks like, where the
‫data is.
‫So if we go here ML Course, we've got this heart disease CSV and we've worked with this file before,
‫we've worked with this comma separated value file.
‫So I'm going to move that into my heart disease project.
‫And if you don't have this file, that's okay.
‫There'll be a link in the resources section where you can download it.
‫And so now we're almost ready to go.
‫We come back.
‫We've got a project folder.
‫We've got some data in the form of a CSV.
‫It may be in a different style for depending on what project you're working on, but in our case we're
‫using CSV.
‫We've got an environment to work with and we go to Jupyter Notebook.
‫Beautiful.
‫Now it's time to get our hands on, create a notebook and start performing some data analysis and manipulation
‫and then some machine learning with the tools we've used so far.