Skip to main content

Posts

Showing posts from August, 2022

Learn Programming Free By ShivaTutorials.

  Learn Programming and Interview Questions 2022, FREE, FREE, FREE By Shiva Tutorials #Codingclasses , https://youtu.be/RjzeBD4gVc8

Data Science Introduction

Data science is a way to try and discover hidden patterns in raw data. To achieve this goal, it makes use of several algorithms, machine learning(ML) principles, and scientific methods. The insights it retrieves from data lie in forms structured and unstructured. So in a way, this is like data mining. Data science encompasses all- data analysis, statistics, and machine learning. With more practices being labelled into data science. Text Analysis Statistical Analysis Diagnostic Analysis Predictive Analysis Prescriptive Analysis TEXT ANALYSIS:- Text Analysis is also referred to as Data Mining. It is a method to discover a pattern in large data sets using databases or data mining tools. It used to transform raw data into business information. Business Intelligence tools are present in the market which is used to take strategic business decisions. Overall it offers a way to extract and examine data and deriving patterns and finally interpretation of the data. Statistical Analysis It is use...

NumPy in DataScience

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, It is a predefined library of python which is used to perform a mathematical operation using predefined methods. NumPy uses array-type data to perform the operation. it contains array-type data to accept input data. Operation using NumPy:- Using NumPy, a developer can perform the following operations − ⦁    Mathematical and logical operations on arrays. ⦁    Fourier transforms and routines for shape manipulation. ⦁    Operations related to linear algebra. NumPy has in-built functions for linear algebra and random number generation. What is the Difference between NumPy Array and List? 1)  Numpy array has n-th dimensional means it can be one dimension to nth dimension but the list has only 1 or 2 dimension approach. 2) Numpy array is used to contain data of data science to implement multiple functionalities of scipy, NumPy, pandas, and matplotlib ...

SCIPY in Data Science

Scipy is the special library of python which is used to perform an advanced mathematical operation using the different predefined methods. It is the top layer of NumPy because NumPy is used to perform the basic mathematical operation , scipy mostly focus on l inear algebra and other a dvanced mathematical function . SCIPY was written as a SIGH PY word. How do we install scipy in the machine? if you want to install scipy with a core python or python shell then you can use the command python -m pip install scipy. pip install scipy Q)Create Script to write File in Matlab format and load it using scipy library? Matlab is a programming language that is a specialist in scientific programming. If we want to convert application data to Matlab format or Matlab format data to the application means we want to implement read and write operation then we can scipy library io module. 1) savemat():-  It is used to write application data to Matlab format 2) loadmat():-  It is used to read a...

Statistical function in SCIPY

All of the statistics functions are located in the sub-package  scipy.stats  and a fairly complete listing of these functions can be obtained using  info(stats)  function Normal Continuous Random Variable from scipy.stats import norm import numpy as np print(norm.cdf(np.array([1,-1., 0, 1, 3, 4, -2, 6]))) CDF means the Cumulative Distribution Function.   In probability theory and statistics, the cumulative distribution function of a real-valued random variable, or just distribution function of, evaluated at, is the probability that will take a value less than or equal to. To find the median of distribution, we can use the Percent Point Function (PPF), which is the inverse of the CDF. Let us understand by using the following example. from scipy.stats import norm import numpy as np print(norm.ppf(0.8)) To generate a sequence of random variates, we should use the size keyword argument, which is shown in the following example. from scipy.stats import n...

Constant package of SCIPY

It is used to provide a value of the constant in data science mathematical operation, Scipy provide the constant package to get the value of all standard constant. from scipy.constants import pi import scipy from scipy.constants import pi print("sciPy - pi = %.16f" % scipy.constants.pi) #print(scipy.constants.find()) print(scipy.constants.physical_constants["alpha particle mass"]) Another example:- import scipy from scipy.constants import pi print(pi) print(scipy.constants.golden) print(scipy.constants.c) print(scipy.constants.Avogadro) print(scipy.constants.find()) print(scipy.constants.physical_constants["alpha particle mass"]) Unit Categories The units are placed under these categories: Metric Binary Mass Angle Time Length Pressure Volume Speed Temperature Energy Power Force from scipy import constants print(constants.yotta)    #1e+24 print(constants.zetta)    #1e+21 print(constants.exa)      #1e+18 print(constants.peta)     #1000...

What is Interpolation in SCIPY

Interpolation is the process of finding a value between two points on a line or a curve. This tool, interpolation, is not only useful in statistics, but is also useful in science, business, or when there is a need to predict values that fall within two existing data points. scipy.interpolate package will be used for interpolation Without interpolation first we show plot using x and y co-ordinate import numpy as np from scipy import interpolate import matplotlib.pyplot as plt x = np.linspace(0, 4, 12) y = np.cos(x**2/3+4) print(x,y) plt.plot(x, y,’o’) plt.show() 1-D Interpolation he interp1d class in the scipy.interpolate is a convenient method to create a function based on fixed data points, which can be evaluated anywhere within the domain defined by the given data using linear interpolation. Using the interp1d function, we created two functions f1 and f2. These functions, for a given input x returns y. The third variable kind represents the type of interpolatio...

scipy.integrate package in SCIPY

It is used to calculate mathematical integration based formula. Example of Single Integration in SCIPY:-  import scipy.integrate from numpy import exp f= lambda x:x*x i = scipy.integrate.quad(f, 0, 1) print(i) Example of double integration ion SCIPY:- import scipy . integrate from numpy import exp from math import sqrt f = lambda x , y : 16 * x * y g = lambda x : 0 h = lambda y : sqrt ( 1 - 4 * y ** 2 ) i = scipy . integrate . dblquad ( f , 0 , 0.5 , g , h ) print ( i ) Fixed Quad Integration:- from scipy import integrate         def func(x): return 3 * x * * 3         # using scipy.integrate.fixed_quad() method # n is the order of integration gfg = integrate.fixed_quad(func, 1.0 , 2.0 , n = 2 )     print (gfg) scipy.nquad:- from scipy.integrate import nquad def f(x, y, z): return x*y*z I = nquad(f, [[0, 1], [0, 5], [0, 5]]) print(I) ...