Decision Tree vs Linear Regression

Decision Tree can be used for implementing regression as well as classification models, however , Linear Regression can be used for regression problem only. Decision tree can be used for regression, even when there is non linear relationships between the features and the output variable. However, Linear Regression works really nicely when there is linear relationship…

Read More

Using torchvision transforms for data augmentation

Transforms are common image transformations. torchvision transforms are used to augment the data with scaling, rotations, mirroring, cropping etc. Transforms are common image transformations.  Let us create some possible transforms like RandomRotation , Resize, RandomResizedCrop etc. Below is the code to use transforms for the training, validation, and testing sets transforms.Compose([transforms.Resize(224),transforms.CenterCrop(64),transforms.ToTensor()]) Most neural networks expect the…

Read More