id int64 0 25.6k | text stringlengths 0 4.59k |
|---|---|
15,500 | introduction to pytorch tensor([[ ][ ][ ][ ]]in [ ] shape out[ ]torch size([ ]in [ ] gather( ,din [ ] out[ ]tensor([[ ][ ][ ][ ]]in [ ] shape out[ ]torch size([ ]similarlythe scatter method can be used to put values into tensor along given dimensions at given positions listing - illustrates augmenting tensor' values wi... |
15,501 | introduction to pytorch in [ ] shape out[ ]torch size([ ]in [ ]index torch longtensor([[ , , , ]]in [ ]index out[ ]tensor([[ ]]in [ ]index shape out[ ]torch size([ ]in [ ]values torch zeros( , in [ ]values out[ ]tensor([[ ]]in [ ]values shape out[ ]torch size([ ]in [ ]result scatter( indexvaluesin [ ]result out[ ]tenso... |
15,502 | introduction to pytorch athematical operations the allclose method allows us to check whether the values in two tensors are the same given an absolute or relative tolerance level the methodwhich helps us to compare two tensors based on margin of errorcan come in quite handy while writing unit tests listing - illustrate... |
15,503 | introduction to pytorch in [ ]torch allclose( , ,rtol= - out[ ]false in [ ]torch allclose( , ,atol= - out[ ]true in [ ]torch allclose( , ,atol= - out[ ]true in [ ]torch allclose( , ,atol= - out[ ]true in [ ]torch allclose( , ,atol= - out[ ]false the argmax and argmin methods allow you to get the index of the maximum an... |
15,504 | introduction to pytorch in [ ]torch argmax(adim= out[ ]tensor([ ]in [ ]torch argmin(adim= out[ ]tensor([ ]in [ ]torch argmin(adim= out[ ]tensor([ ]similarlythe argsort functionillustrated in listing - gives the indices of sorted values along given dimension listing - extracting the indices of sorted values of tensor in... |
15,505 | introduction to pytorch the cumsum methodillustrated in listing - allows you to compute the cumulative sum along given dimension listing - computing the cumulative sum along dimension of the tensor in [ ] torch rand( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ] shape out[ ]torch size([ ]in [ ] torch cumsum(adim= in [ ] out[... |
15,506 | introduction to pytorch in [ ] shape out[ ]torch size([ ]similarlythe cumprod method allows you to compute the cumulative product along given dimension listing - illustrates the computation of the cumulative product listing - computing the cumulative product along dimension of the tensor in [ ] torch rand( , in [ ] out... |
15,507 | introduction to pytorch tensor([[ ][ ][ ]]in [ ] shape out[ ]torch size([ ]the abs method allows you to compute the absolute value of the elements of given tensor listing - illustrates computing absolute value of the elements of tensor listing - computing the absolute value of the elements of tensor in [ ] torch tensor... |
15,508 | introduction to pytorch listing - clamping values within tensor in [ ] torch rand( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ] torch clamp(amin= max= in [ ] out[ ]tensor([[ ][ ][ ]]the ceil and floor functions allow you to round-up or round-down the elements of given tensoras illustrated in listing - listing - ceil and flo... |
15,509 | introduction to pytorch [ ][ ]]in [ ] torch ceil(ain [ ] out[ ]tensor([[ ][ ][ ]]element-wise mathematical operations let us now take look at number of element-wise mathematical operations these operations are called element-wise mathematical operations because an identical operation being performed on each of the ele... |
15,510 | introduction to pytorch tensor([[ ][ ][ ]]in [ ] torch mul( ,bin [ ] out[ ]tensor([[ ][ ][ ]]similarlywe have the div method for element-wise division listing - demonstrates element-wise division for tensors listing - element-wise division in [ ] torch rand( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ] torch floattensor([[ ... |
15,511 | introduction to pytorch in [ ] out[ ]tensor([[ ][ ][ ]]trigonometric operations in tensors within deep learningwe will also perform several trigonometric operations over tensors in the process of training them in this sectionwe will take brief look at few important functions frequently used in pytorch listing - illust... |
15,512 | introduction to pytorch in [ ]torch tan(aout[ ]tensor([- - - - - ]in [ ]torch asin(aout[ ]tensor([- - - - - ]in [ ]torch acos(aout[ ]tensor([ ]in [ ]torch atan(aout[ ]tensor([- - - - - ]listing - illustrates few functions that are frequently used in machine learning--namelysigmoidtanhlog (which computes log( + ))erf (g... |
15,513 | introduction to pytorch in [ ]torch sigmoid(aout[ ]tensor([ ]in [ ]torch tanh(aout[ ]tensor([- - - - - ]in [ ]torch log (aout[ ]tensor(-inf- - - - ]in [ ]torch erf(aout[ ]tensor([- - - - - ]in [ ]torch erfinv(aout[ ]tensor(-inf- - - - inf]comparison operations for tensors let' now consider some operations that allow u... |
15,514 | introduction to pytorch listing - comparison operations for tensors in [ ] torch rand( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ] torch rand( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ]torch ge( ,bout[ ]tensor([[ ][ ][ ]]dtype=torch uint in [ ]torch le( ,bout[ ]tensor([[ ][ ][ ]]dtype=torch uint in [ ]torch eq( ,bout[ ]tensor... |
15,515 | introduction to pytorch in [ ]torch ne( ,bout[ ]tensor([[ ][ ][ ]]dtype=torch uint linear algebraic operations we will now dive deeper into number of linear algebraic operations using pytorch tensors the matmul function allows you to multiply two tensors listing - demonstrates matrix multiplication for tensors listing... |
15,516 | introduction to pytorch in [ ] shape out[ ]torch size([ ]in [ ]torch matmul( ,bout[ ]tensor([[ ][ ]]in [ ] shape out[ ]torch size([ ]the addbmm function (where bmm stands for batch matrix-matrix productallows you to perform the computation [ ]where and are scalarsand ma and are tensors note that the addbmm function tak... |
15,517 | introduction to pytorch in [ ] torch ones( in [ ] out[ ]tensor([[[ ][ ][ ]][[ ][ ][ ]]]in [ ] shape out[ ]torch size([ ]in [ ] torch ones( , in [ ] out[ ]tensor([[ ][ ]]in [ ] shape out[ ]torch size([ ]in [ ]torch addbmm( about[ ]tensor([[ ][ ]]in [ ]torch addbmm( about[ ]tensor([[ ][ ]] |
15,518 | introduction to pytorch in [ ]torch addbmm(mabout[ ]tensor([[ ][ ]]the addmm function is non-batch version of addbmm that allows you to perform the computation bwhere and are scalarsand maand are tensors note that the addmm function takes parameters and with default values equal to one listing - illustrates non-batch m... |
15,519 | introduction to pytorch in [ ] torch ones( , in [ ] out[ ]tensor([[ ][ ]]in [ ] shape out[ ]torch size([ ]in [ ]torch addmm(mabout[ ]tensor([[ ][ ]]in [ ]torch addmm( about[ ]tensor([[ ][ ]]in [ ]torch addmm( about[ ]tensor([[ ][ ]]the addmv function (matrix-vectorallows you to perform the computation bwhere and are sc... |
15,520 | introduction to pytorch listing - matrix vector addition of tensors in [ ] torch ones( in [ ] out[ ]tensor([[ ][ ]]in [ ] shape out[ ]torch size([ ]in [ ] torch ones( in [ ] out[ ]tensor([ ]in [ ] shape out[ ]torch size([ ]in [ ] torch ones( in [ ] out[ ]tensor([ ]in [ ] shape out[ ]torch size([ ]in [ ]torch addmv( , ,... |
15,521 | introduction to pytorch the addr function allows you to perform an outer product of two vectors and add it to given matrix the outer product of two vectors in linear algebra is matrix for exampleif you have vector with elements ( dimensionand another vector with elements ( dimension)then the outer product of and will b... |
15,522 | introduction to pytorch in [ ] out[ ]tensor([[ ][ ][ ]]in [ ] shape out[ ]torch size([ ]in [ ]torch addr( , ,bout[ ]tensor([ ] ] ]]in [ ] torch zeros( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ]torch addr( , ,bout[ ]tensor([[ ][ ][ ]]the baddbmm function allows you to perform the computation [ ] [ ]where and are scalarsand... |
15,523 | introduction to pytorch and with default values equal to oneand that tensors such as and are provided by stacking them along the first dimension listing - illustrates the use of baddbmm function listing - the baddbmm function in [ ] torch ones( , , in [ ] out[ ]tensor([[[ ][ ]][[ ][ ]]]in [ ] shape out[ ]torch size([ ]... |
15,524 | introduction to pytorch in [ ] out[ ]tensor([[[ ][ ]][[ ][ ]]]in [ ] shape out[ ]torch size([ ]in [ ]torch baddbmm( , , , ,bout[ ]tensor([[[ ][ ]][[ ][ ]]]in [ ]torch baddbmm( , , , ,bout[ ]tensor([[[ ][ ]][[ ][ ]]]in [ ]torch baddbmm( , , , ,bout[ ]tensor([[[ ][ ]][[ ][ ]]] |
15,525 | introduction to pytorch the bmm function allows you perform batch-wise matrix multiplication for tensorsas illustrated in listing - listing - batch-wise matrix multiplication in [ ] torch ones( , , in [ ] out[ ]tensor([[[ ][ ]][[ ][ ]]]in [ ] shape out[ ]torch size([ ]in [ ] torch ones( , , in [ ] out[ ]tensor([[[ ][ ]... |
15,526 | introduction to pytorch in [ ]torch bmm( ,bout[ ]tensor([[[ ][ ]][[ ][ ]]]the dot function allows you to compute the dot product of tensorsas illustrated in listing - listing - computing the dot product of tensors in [ ] torch rand( in [ ] out[ ]tensor([ ]in [ ] torch rand( in [ ] out[ ]tensor([ ]in [ ]torch dot( ,bout... |
15,527 | introduction to pytorch listing - computing eigenvalues for tensor in [ ] torch rand( , in [ ] out[ ]tensor([[ ][ ][ ]]in [ ]valuesvectors torch eig(aeigenvectors=truein [ ]values out[ ]tensor([ ][- ][- - ]]in [ ]vectors out[ ]tensor([[- - ][- - ][- - ]]in [ ]values[ , vectors[:, reshape( , out[ ]tensor([[- ][- ][- ]]i... |
15,528 | introduction to pytorch the cross functionillustrated in listing - allows you to compute the cross product of two tensors listing - computing the cross product of two tensors in [ ] torch rand( in [ ] torch rand( in [ ] out[ ]tensor([ ]in [ ] out[ ]tensor([ ]in [ ]torch cross( ,bout[ ]tensor( - ]as shown in listing - t... |
15,529 | introduction to pytorch in [ ]torch norm( , out[ ]tensor( in [ ]torch norm( , out[ ]tensor( in [ ]torch norm( ,float('inf')out[ ]tensor( the renorm function allows you to normalize vector by dividing it by the norm listing - demonstrates normalizing operation on tensor listing - normalizing tensor in [ ] torch floatten... |
15,530 | introduction to pytorch that provide comprehensive set of functions for handling images (computer visionand text (natural language processingdatasets we will explore the essential utilities from these packages in "convolutional neural networks,and "recurrent neural networks as librarypytorch provides an excellent means... |
15,531 | feed-forward neural networks feed-forward neural networks were the earliest implementations within deep learning these networks are called feed-forward because the information within them moves only in one direction (forward)--that isfrom the input nodes (unitstowards the output units in this we will cover some key con... |
15,532 | feed-forward neural networks which takes an input rn and produces an output rmand the behavior of which is parameterized by th rp sofor instancefth could be simply fth(xth figure - shows the architecture of neuron (or unit within neural networkfigure - unit in feed-forward network unit unit (also known as node or neur... |
15,533 | feed-forward neural networks where is referred to as an activation function although variety of activation functions can be usedas we shall see later in the non-linear function is generally used figure - shows detailed look at the unit figure - unit in neural network the overall structure of neural network neural netw... |
15,534 | feed-forward neural networks the number of units in layer is referred to as the width of the layer the width of each layer need not be the samebut the dimension should be alignedas we shall see later in the the number of layers is referred to as the depth of the network this is where the notion of "deep(as in "deep lea... |
15,535 | feed-forward neural networks figure - the structure of neural network expressing neural network in vector form let' take look at the layers of neural network and their dimensions in bit more detail (refer to figure - if we assume that the dimensionality of the input is rn and the first layer has unitsthen each unit ha... |
15,536 | feed-forward neural networks rn weights associated with it that isthe weights associated with the first layer are matrix of the form while this is not shown in the figure - each unit also has bias term associated with it the first layer produces an output where oi xk *wk bi note that the index corresponds to each of t... |
15,537 | feed-forward neural networks figure - neural network in vector form evaluating the output of neural network now that we have looked at the structure of neural networklet' look at how the output of neural network can be evaluated against labeled data refer to figure - |
15,538 | feed-forward neural networks for single data pointwe can compute the output of neural networkwhich we denote as now we need to compute how good the prediction of our neural network is as compared to here comes the notion of loss function loss function measures the disagreement between and ywhich we denote by number of ... |
15,539 | feed-forward neural networks training neural network let' now look at how neural network is trained figure - illustrates training neural network assuming the same notation as earlierwe denote by th the collection of all the weights and bias terms of all the layers of the network let us assume that th has been initiali... |
15,540 | feed-forward neural networks figure - training neural network eriving cost functions using maximum likelihood as discussed earlierthe cost functions (aka loss functionshelp to determine the disagreement between the predictions and the actual targets with quantified metric based on specific use case and the nature of th... |
15,541 | feed-forward neural networks thereby update the weight parameters so as to reduce the disagreement and thus improve model performance we will now look into how various loss functions are derived using maximum likelihood specificallywe will see how commonly used loss functions in deep learning--such as binary cross-entr... |
15,542 | feed-forward neural networks we can take logarithm operation on both sides to arrive at the followingn log log xi xi yi which simplifies to the following expressionn log yi log xi yi log xi instead of maximizing the rhswe minimize its negative value as followsn yi log xi yi log xi this leads us to the following binary... |
15,543 | feed-forward neural networks have somehow generated model that predicts the probability of given we denote this model by (xth)where th represents the parameters of the model let us again use the idea behind maximum likelihoodwhich is to find th that maximizes (dthassuming multinomial distributionand given that each exa... |
15,544 | feed-forward neural networks this leads to the following binary cross-entropy functionn yi log xi thusthe idea of maximum likelihood enables us to derive the crossentropy functionwhich can be used as loss function in the context of multi-classification squared error let us now discuss deriving the squared error to be ... |
15,545 | feed-forward neural networks is the recommended loss function for binary classification this loss function should typically be used when the neural network is designed to predict the probability of the outcome in such casesthe output layer has single unit with suitable sigmoid as the activation function the cross-entro... |
15,546 | feed-forward neural networks types of activation functions we will now look at number of activation functions commonly used for neural networks let' start by enumerating few properties of interest for activation functions in theorywhen an activation function is non-lineara two-layer neural network can approximate any ... |
15,547 | feed-forward neural networks linear unit the linear unit is simplest unit that transforms the input as as the name indicatesthe unit does not have non-linear behavior and is typically used to generate the mean of conditional gaussian distribution linear units make gradient-based learning fairly straightforward task (fi... |
15,548 | feed-forward neural networks sigmoid units can be used in the output layer in conjunction with binary cross-entropy for binary classification problems the output of this unit can model bernoulli distribution over the output conditioned over figure - sigmoid function oftmax activation the softmax layer is typically used... |
15,549 | feed-forward neural networks figure - softmax layer rectified linear unit rectified linear unit (reluused in conjunction with linear transformation transforms the input as max ,wx the underlying activation function is (xmax ( xrecentlythe relu is more commonly used as hidden unit results show that relus lead to large ... |
15,550 | feed-forward neural networks figure - rectified linear unit there are few disadvantages with reluhowever when inputs approach near zerothe gradient of the function becomes zero and thus gets stuck within the training steps with no progress in the training this is commonly known as the dying relu problem yperbolic tange... |
15,551 | feed-forward neural networks figure - the tanh activation function there are many more that can be used for tailored benefits in specified setting or use case notable examples include leaky reluparametric reluand swish good starting point to explore additional activation functions is ackpropagation the most fundamental... |
15,552 | feed-forward neural networks disagreement would be the least (ideallyzerothis is where we interface with backpropagationan intuitive algorithm that enables the computation of gradients of the loss with respect to the weights using chain rule in the forward passthe network computes the prediction for given input samplea... |
15,553 | feed-forward neural networks batch gradient descent the original gradient descent is referred to as the batch gradient descent (bgdtechnique the name is derived from the amount of data used to compute the gradient--in this casethe entire batch the bgd technique essentially leverages the entire dataset available to com... |
15,554 | feed-forward neural networks is greater than but smaller than the entire dataset common batch sizes are etc number in the range of powers of is recommended (but not necessary)as it suits best from computation perspective with mbgdthe updates are less frequent than sgd but more frequent than bgdand leverage small batch ... |
15,555 | feed-forward neural networks the update process can be simplified using the following equations firstwe compute an exponentially weighted average of the past gradients as ntwhere nt gnt ethj(thand th th nt the here is hyperparameter that takes values between and nextwe use this exponentially weighted average in the upd... |
15,556 | feed-forward neural networks where is hyperparameter that defines the initial learning rateand gt is the gradient at time for parameter/weight in th we add to the denominator to avoid divide by zero situations adam simplified name for adaptive moment estimationadam is the most popular choice recently for optimizers in... |
15,557 | feed-forward neural networks explore the preceding optimization techniquesand othersin greater detail adagrad and adadelta are popular and highly recommended choices practical implementation with pytorch so farwe have provided brief overview of the essential topics of feedforward neural network we will now implement s... |
15,558 | feed-forward neural networks nextlet' create dummy dataset for our neural network listing - illustrates the creation of toy (dummydataset for the exercise listing - creating toy dataset samples #let' divide the toy dataset into training ( %and rest for validation train_split int(samples* #create dummy classification da... |
15,559 | feed-forward neural networks y_train shapetorch size([ ]y_test shapetorch size([ ] dtype torch float dtype torch float the toy datasetwith , samples each having featuresis divided into train and test let' create class that defines the neural network using pytorch' nn module listing - defines the creation of neural netw... |
15,560 | feed-forward neural networks op self out(opy self final(opreturn the torch nn module provides the essential means to define and train neural networks it contains all the necessary building blocks for creating neural networks of various kindssizesand complexity we will create class for our neural network by inheriting t... |
15,561 | feed-forward neural networks to get more accurate predictions for our given problemwe would need to train the network-- to backpropagate the loss and update the weights with respect to the loss function fortunatelypytorch provides these essential building blocks in an extremely easy to use and intuitive way listing - i... |
15,562 | feed-forward neural networks #caculate loss loss loss_function(output_datalabels#backpropogate loss backward(#update weights optimizer step(train_loss +loss item(batch_size print("epoch{loss:{ }format(epoch+ ,train_ loss )loss_across_epochs extend([train_loss]#predict y_test_pred model(x_testa =np where(y_test_pred> ,... |
15,563 | feed-forward neural networks adam_loss train_network(model,adam_optimizer ,loss_function,num_epochs,batch_ size,x_train,y_trainbefore we get into the specifics of listing - let' look at the individual components we defined leveraging pytorch' readily provided building blocks we need to define loss function that will b... |
15,564 | feed-forward neural networks lastlywe need to define the batch size and the number of epochs required to train our model batch size refers to the number of samples within batch in mini-batch update one forward and backward pass for all the batches that cover all samples once is called an epoch finallywe pass all these ... |
15,565 | feed-forward neural networks predictionswe can calculate its deviation from the actual label using the loss function-- loss loss_function(output_datalabelsto backpropagate our losspytorch provides built-in module that does the heavy lifting for computing gradients for the loss with respect to the weights we simply call... |
15,566 | feed-forward neural networks #train network using rmsprop optimizer rmsprp_optimizer tch optim rmsprop(model parameters(lr= alpha= eps= - weight_decay= momentum= centered=trueprint("rmsprop "rmsprop_loss train_network(model,rmsprp_optimizer,loss_ function ,num_epochs,batch_size,x_train,y_train#train network using adam ... |
15,567 | feed-forward neural networks ax plt subplot( ax plot(adam_loss,label="adam"ax plot(sgd_loss,label="sgd"ax plot(rmsprop_loss,label="rmsprop"ax legend(plt xlabel("epochs"plt ylabel("overall loss"plt title("loss across epochs for different optimizers"plt show(output[rmsprop epoch loss: epoch loss: epoch loss: epoch loss: ... |
15,568 | feed-forward neural networks epoch loss: epoch loss: epoch loss: sgd epoch loss: epoch loss: epoch loss: epoch loss: epoch loss: epoch loss: epoch loss: epoch loss: epoch loss: epoch loss: figure - distribution loss across epochs for the network |
15,569 | feed-forward neural networks summary the content in this about feed-forward neural networks will serve as the conceptual foundation for the remainder of the book the key concepts we covered were the overall structure of the neural networkthe inputhiddenand output layersand cost functions and their basis on the princip... |
15,570 | automatic differentiation in deep learning while exploring stochastic gradient descent in we treated the computation of gradients of the loss function xl(xas black box in this we open the black box and cover the theory and practice of automatic differentiationas well as explore pytorch' autograd module that implements ... |
15,571 | automatic differentiation in deep learning numerical differentiation numerical differentiationin its basic formfollows from the definition of derivative/gradient it used to estimate the derivative of mathematical function derivate of with respect to more specifically defines the rate of change of with respect to simpl... |
15,572 | automatic differentiation in deep learning is technique that helps in achieving for estimating very high order integration using only few series of values the approximation errors for forward and backward differences are in the order of hthat iso( )--whereas those for central difference and richardson extrapolation are... |
15,573 | automatic differentiation in deep learning symbolic differentiation symbolic differentiation in its basic form is set of symbol rewriting rules applied to the loss function to arrive at the derivatives/gradients consider two of such simple rules dx dx dx and nx dx given function such as ( we can successively apply the... |
15,574 | automatic differentiation in deep learning an example of this is when your loss function involves an if-else clause or for/while loop in sensesymbolic differentiation is differentiating (closed formmathematical expressionit is not differentiating given computational procedure another problem with symbolic differentiati... |
15,575 | automatic differentiation in deep learning getting closed form mathematical expression of the derivate like the one symbolic differentiation gives uswhat we get via automatic differentiation is the evaluation of the derivative for given set of values the third key intuition behind automatic differentiation is that beca... |
15,576 | automatic differentiation in deep learning figure - computational graph along with the input variables (xyand )we will see the variable awhich is an intermediate variable that stores the computed value of ( )and the variable fwhich stores the final value of ( ) -- * in the forward passwe will substitute the values and ... |
15,577 | automatic differentiation in deep learning figure - computational graph with computed values nowwith automatic differentiationwe would want to find the gradients of with regard to the input variables (xyand zrepresented as and in the feed-forward networkessentiallywe find the gradients of the loss function with respect... |
15,578 | automatic differentiation in deep learning nowcoming to our end objectiveto find the gradients of with regard to xy and we already have computed the required gradient with regard to for and ywe can leverage the previously computed values in chain rule as we now have computed all the values required - and essentiallywha... |
15,579 | automatic differentiation in deep learning implementing automatic differentiation let' now consider how automatic differentiation is implemented within pytorch the preceding example was very simplethings would be really complicated as we explore the approach on paper for large functions ( deep learning functionsin mos... |
15,580 | automatic differentiation in deep learning listing - implementing automatic differentition (autogradin pytorch #import required libraries import torch #define ensors torch tensor([ ] torch tensor([- ]ztorch tensor([ ]print("default value for requires_grad for :", requires_grad#set the keyword requires_grad as true (def... |
15,581 | automatic differentiation in deep learning output[default value for requires_grad for xfalse updated value for requires_grad for xtrue final value for function tensor([- ]grad_ fn=gradient value for xtensor([ ]gradient value for ytensor([ ]gradient value for ztensor([- ]the gradient values here match exactly with what ... |
15,582 | automatic differentiation in deep learning generalized term the key takeaway from this is that automatic differentiation enables the computation of gradients for arbitrarily complex loss functions and is one of the key enabling technologies for deep learning you should internalize the concepts of automatic differentiat... |
15,583 | training deep leaning models so farwe have leveraged toy datasets to provide an overview of the earliest implementations of deep learning models in this we will explore few additional important topics around deep learning and implement them in practical example we will delve into the specifics of model performance and ... |
15,584 | training deep leaning models classification metrics the model development process typically starts by formulating clear problem definition this basically involves defining the input and the output of the model and the impact (usefulnesssuch model can deliver an example of such problem definition is the categorization ... |
15,585 | training deep leaning models categorizing non-allergen-free product as an allergen-free product is significantly more as compared to categorizing an allergen-free product as non-allergen-free product accuracy does not capture this and hence would be poor choice in this case an alternative set of metrics is precision an... |
15,586 | training deep leaning models precision and recall are often visualized using pr curvewhich plots precision on the axis and recall on the axis (see figure - different values of precision and recall can be obtained by varying the decision threshold on the score or the probability the model produces--for instance implying... |
15,587 | training deep leaning models the true positive rate measures the fraction of true positives with respect to the actual positivesand the true negative rate measures the fraction of true negatives with respect to the actual negatives (see figure - the roc curve plots the true positive rate on the axis and the false posit... |
15,588 | training deep leaning models figure - true positive and false positive rates |
15,589 | training deep leaning models figure - roc curve egression metrics performance metrics for regression are fairly straightforward when compared to metrics for classification the most common metric that can be universally applied to most use cases is the mean squared error (msedepending on the use casea few other metrics ... |
15,590 | training deep leaning models predicted values the end result is positive numberas we take square of the disagreement essentiallythe square operation is valuable because larger differences are penalized more in use cases where you wouldn' want the model to penalize large difference more heavilymse would not be the ideal... |
15,591 | training deep leaning models mathematicallywe can define mape as mape yi ^ = yi while being highly interpretablemape suffers when dealing with small differences the percentage differences of small deviations often result in large mapewhich could lead to misleading results supposefor examplethat we are predicting the nu... |
15,592 | training deep leaning models plitting data for trainingvalidations and testing once the data for building the model has been procuredit needs to be split into data for trainingparameter tuningand go-live testing conceptuallythe available data is to be used for three distinct purposes the first purpose is to train the m... |
15,593 | training deep leaning models the second key point to internalize is that each of the three sets-traininghyperparameter tuningand go-live testing--need to be true representative of the underlying population of data splitting the datasets should take this into consideration for examplethe distribution of examples across ... |
15,594 | training deep leaning models establishing the baseline with standard choices the best place to start the modelling process is with baseline model with standard choices (based on literature or part experienceof architecture and algorithms--for instanceusing convolutional neural networks (cnnsfor images or long short-ter... |
15,595 | training deep leaning models analysis of overfitting and underfitting the ideal goal of the iterative cycle of model improvement is to develop model where the performance over the training set and validation set is nearly equal to the established performance limit (proxy for bayes errorfigure - illustrates this final ... |
15,596 | training deep leaning models figure - overfitting and underfitting hyperparameter tuning tuning the hyperparameters of the model (such as learning rate or momentumcan be done manuallyvia grid search (where in grid is defined over small set of values)or via random search (where the values of hyperparameters are drawn a... |
15,597 | training deep leaning models through each possible combinationand the combination of the hyperparameters with the best performance is the final choice with grid searchthere is possibility of not having the best possible combination of hyperparametersas the permutations are limited to the provided grid or are computatio... |
15,598 | training deep leaning models we can transform to be vector of values [ that isif it will be transformed to [ following this transformationwe can generate least squares model using the preceding formula under the hoodwe are approximating the given data with second order polynomial (degree equationand the least squares a... |
15,599 | training deep leaning models regularizing the model from the previous exampleis easy to see that while fitting modelsa central problem is to get the capacity of the model exactly right so that one neither overfits nor underfits the data regularization can be simply seen as any modification to the model (or its trainin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.