Skip to main content

Posts

Showing posts from September, 2020

Percentage Problems on overall percentage change - Module [ 1 ]

                                            Module -1  Let us discuss , if the problems is based on percentage change. 1. If the salary of person increased by 10% and then decreased by 10% , what is the overall percentage change in the salary? Ans :                     Let us assume the salary of person is 100% , then it is increased by 10% so it becomes 110%. Now it is decreased by 10% from 110 that is 11, so                     110 - 11 = 99                    Initial salary is 100% , now the salary is 99% that is 1% change in the percentage.   2. If the cost price of an article is 100 , while selling he increased the cost price by 20% and then decreased 20% . what ...

Variable Declaration in Python

                                          Variables Variables is a container which stores the values in it. Every values in Python has a datatype. Datatypes in Python are numbers, list, tuple, strings, dictionary etc. Rules for Python Variables A Variable name can contain alpha-numeric characters and underscores (A - Z , a - z, _). A Variable name can start with number or underscore character, but can' t start with a number. Variable name should not be keywords. Keywords are some specific names that are used in Python for some specific function. Variable names in Python are case sensitive. (Height, height, HEIGHT are different). Variable Declaration Here we didn't defined data type , as we know Python is dynamically typed so not required to define explicitly.     Multiple Variable Declaration           We can declare multipl...

Basic Concepts in time and work

                               Time and Work Time and Work is a another important concepts in aptitude. Pipes and cistern is an application of time and work. Time and Work is directly proportional , where if work increases, time also increases. Work and person is directly proportional, where if  work increases , persons also increases. Time and Person is inversely proportional , where if person increases ,time decreases. Formulas : If `A` completes work in `n` days , then the work completed in one day is 1/n th part of work. If `A` completes 1/n th work in one day, then total work completed in `n` days. Let us assume `A` completes the work in `n` days and `B` completes the work in `m` days .Let us take work as only one unit, the amount of work done in one day by `A` is 1/n similarly for `B` is 1/m. So in how many days the work is completed if they work together then ,A + B = 1/n + 1/m. Problem...

Python Introduction

 Introduction  Python is developed by Guido Van Rossum and released in 1991. Python is high level, interpreted, general purpose programming language. It is one of the top five most used languages in the world. Currently there are 8.2 million developers who code in Python. Python is one of the most preferred languages in the field of Data Science and Artificial Intelligence. Key Features Python is an interpreted language, unlike compiled languages like Java, C, C++, C#, Go etc., Python codes are executed directly even before compiling.  Python is Dynamically typed, no need to mention type of variable before assigning. Python handles it without raising any error. Python codes can be executed on different software or operating systems without changing it. Python supports both Functional and Object oriented programming as it supports creating classes and objects. Python has high number of modules and frameworks support. Python is free and Open Source, which means it is availa...

Percentage to fraction Conversions

                                         Module - 1 The best practice,  while solving the problems on percentage is to calculate 50% , 10% and 1%. Examples :  1. For 500 Ans : For 50% is                          50/100 * 500 = 250              For 25% is                         25/100 * 500 = 125             For 10% is                         10/100 * 500 = 50             For 1% is                          1/100 * 500 = 5 Simple ways is   For 50% , value is...

Percentages Introduction

                                    Percentage This is most important topic which helps to solve in profit and loss, simple interest , compound interest etc. As name says per cent means per 100. It means we need to calculate everything per hundred. The value between 0 to 100 . % is the symbol is used to denote percentages. In Exams sometimes you will be asked to calculate percentage but options will be given in fractions and vice versa. Let us solve some problems converting percentage into fractions and vice versa. 1. Represent 25%  into fraction. Ans :             This means 25 is out of 100.  The percentage value is should be divided by 100.                                  25/100 = 1/4            ...

Importance of data preprocessing in machine learning

                          Data  Preprocessing Data Preprocessing is a technique that is used to convert the raw data into a clean data set. In other words, whenever the data is gathered from different sources it is collected in raw format which is not feasible for the analysis. Need of Data Preprocessing Inaccurate data There are many reasons for missing data such as data is not continuously collected, a mistake in data entry, technical problems with bio-metrics and much more. The presence of noisy data The reasons for the existence of noisy data could be a technological problem of gadget that gathers data, a human mistake during data entry and much more. Inconsistent data  The   presence of inconsistencies are due to the reasons such that existence of duplication within data, human data entry, containing mistakes in codes or names, i.e., violation of data constraints and much more. Steps Involved ...

How to prevent overfitting and underfitting

          OVERFITTING AND UNDERFITTING Overfitting It will perform well on its training data, poorly on new unseen data.     Handling Overfitting :  Cross-validation  This is done by splitting your dataset into ‘test’ data and ‘train’ data. Build the model using the ‘train’ set. The ‘test’ set is used for in-time validation. This way you know what the expected output is and you will easily be able to judge the accuracy of your model. Regularization  This is a form of regression, that regularizes or shrinks the coefficient estimates towards zero. This technique discourages learning a more complex model. Early stopping  When training a learner with an iterative method, you stop the training process before the final iteration. This prevents the model from memorizing the dataset. Pruning  This technique applies to decision trees.  Pre-pruning: Stop ‘growing’ the tree earlier before it perfectly classifies the training set...

Practice Problems in Python [ Part - 1 ]

                                            Python 1. Write a program which will find all such numbers which are divisible by 3 but are not a multiple of 7,between 2000 and 3200 (both included). soln :            def filter_numbers():           """           function to filter out numbers by extracting numbers           which is divisible by 3 but not multiple of 7.           """           filtered_list=[]           for i in range(2000, 3201):               if (i%3==0) and (i%7!=0):                   filtered_list.append(str(i))    ...

Hyperparameter Optimization techniques

 Hyperparameters Optimization Techniques  The process of finding most optimal hyperparameters in machine learning algorithms is called hyperparameter optimization.  Common algorithms include:  Grid Search  Random Search Grid search  It is a very traditional technique for implementing hyperparameters. It brute force all combinations then validation technique ensures the trained model gets most of the patterns from the dataset.  The Grid search method is a simpler algorithm to use but it suffers if data have high dimensional space called the curse of dimensionality. This is significant as the performance of the entire model is based on the hyper parameter values specified.  Python Implementation for grid searchCv using Sklearn for KNN algorithms. from  sklearn.model_selection  import  GridSearchCV from  sklearn  import  datasets import  pandas  as  pd from  sklearn.neighbors  import  KNeigh...

Exception - Introduction

                                     Exceptions Errors in Program will stop the execution of program. Error in Python their are two types. Syntax Error Run - Time Error Syntax Error : Syntax Error is error caused by wrong syntax in the program. Run - Time Error : Run time error is also called Exceptions. Exceptions are raised when program is syntactically correct but code resulted in error. In the above example raised the ZeroDivisionError as we are trying to divide a number by 0. Learn Data Science Material which helps to learn concepts in Python, Statistics , Data Visualization, Machine Learning , Deep Learning. And it contains Projects helps to understand the flow of building model , and what are the necessary steps should be taken depending on the data set. Interview Questions helps to crack the interview.  Data Science Material Learn Python from basics t...

Types of Machine Learning

                                   Machine Learning  Machine Learning is an application of artificial intelligence where a computer/machine learns from the past experiences (input data) and makes future predictions. It finds the pattern in the data , based on the pattern it gives the future predictions from the unseen data.   It is a way to understand the data and find the patterns in that. Types of Machine Learning        Supervised Machine Learning An algorithm learns from example data and associated target responses that can consist of numeric values or string labels.  Generally the algorithm should find the pattern how input and output is mapped           Two types of Supervised Learning: Regression:  The problem is regression type when the output variable is real or continuous. Example :  Predicting salar...

Machine Learning

     Machine Learning   Machine Learning is an application of artificial intelligence where a computer/machine learns from the past experiences (input data) and makes future predictions. It finds the pattern in the data , based on the pattern it gives the future predictions from the unseen data.   It is a way to understand the data and find the patterns in that.     Machine Learning Application:  Web Search Engine:  One of the reasons why search engines like google, Bing etc. work so well is because the system has learnt how to rank pages through a complex learning algorithm.  Photo tagging Applications:  Facebook or any other photo tagging application, the ability to tag friends makes it even more happening. It is all possible because of a face recognition algorithm that runs behind the application.  Spam Detector:  Our mail agent like Gmail or Hotmail does a lot of hard work for us in classifying the mails and moving the...

Statistics Introduction

    Statistics is the study of the collection ,analysis, interpretation, presentation, and organisation of data.   It is a way to understand the data and find the patterns in that.     Terminologies in Statistics:   Population  is the whole contains every events in an experiments.   Parameter  is the characteristics of population such as population such as population mean, median etc.   Sample  is a subset of the population.   Statistics  is a characteristics of sample such as sample mean, median etc.   Types of Analysis or data types         Numerical or Q uantitative Quantitative is nothing but variables are expressed in numerical terms. Example : Price , income, etc. Their are two types of data in numerical data type.           Continuous Data Type: A continuous data set is a quantitative data set representing a scale of measurement that can consist of numbers other...