fundamentals of machine learning keep in mind that machine learning can only be used to memorize patterns that are present in your training data you can only recognize what you've seen before using machine learning trained on past data to predict the future is making the assumption that the future will behave like the past that often isn' the case choosing measure of success to control somethingyou need to be able to observe it to achieve successyou must define what you mean by success--accuracyprecision and recallcustomer-retention rateyour metric for success will guide the choice of loss functionwhat your model will optimize it should directly align with your higher-level goalssuch as the success of your business for balanced-classification problemswhere every class is equally likelyaccuracy and area under the receiver operating characteristic curve (roc aucare common metrics for class-imbalanced problemsyou can use precision and recall for ranking problems or multilabel classificationyou can use mean average precision and it isn' uncommon to have to define your own custom metric by which to measure success to get sense of the diversity of machine-learning success metrics and how they relate to different problem domainsit' helpful to browse the data science competitions on kaggle deciding on an evaluation protocol once you know what you're aiming foryou must establish how you'll measure your current progress we've previously reviewed three common evaluation protocolsmaintaining hold-out validation set--the way to go when you have plenty of data doing -fold cross-validation--the right choice when you have too few samples for hold-out validation to be reliable doing iterated -fold validation--for performing highly accurate model evaluation when little data is available just pick one of these in most casesthe first will work well enough preparing your data once you know what you're training onwhat you're optimizing forand how to evaluate your approachyou're almost ready to begin training models but firstyou should format your data in way that can be fed into machine-learning model--herewe'll assume deep neural networkas you saw previouslyyour data should be formatted as tensors the values taken by these tensors should usually be scaled to small valuesfor examplein the [- range or [ range licensed to