Questions
stringlengths
5
360
Answers
stringlengths
6
2.23k
What featur e selection strategies are available for picking the appr opriate variables for cr eating effective pr ediction models?
When utilizing a dataset in data science or machine learning techniques, it's possible that not all of the variables are required or relevant for the model to be built. To eliminate duplicating models and boost the efficiency of our model, we need to use smarter feature selection approaches. The three primary strategie...
Will reclassifying categorical variables as continuous variables impr ove the pr edictive model?
Yes! A categorical variable has no particular category ordering and can be allocated to two or more categ ories. Ordinal variables are comparable to categorical variables because they have a defined and consistent ordering. Treating the categorical value as just a continuous variable should result in stronger predictio...
How will you handle missing values in your data analysis?
After determining which variab les contain missing values, the impact of missing values may be determined. If the data analyst can detect a pattern in these missing values, there is a potential to uncover useful information. If no patterns are detected, the missing numbers can be disregarded or replaced with default pa...
What is the ROC Curve, and how do you make one?
The ROC (Receiver Operating Characteristic) curve depicts the difference between false-positive and true-positive rates at various thresholds. The curve is used as a surrogate for a sensitivity-specificity trade-of f. Plotting values of true-positive rates (TPR or sensitivity) against false- positive rates (FPR or (1-s...
What ar e the differ ences between the Test and V alidation sets?
The test set is used to evaluate or test the trained model's performance. It assesses the model's prediction ability . The validation set is a subset of the training set used to choose parameters to avoid overfitting the model.
What exactly does the kernel trick mean?
Kernel function s are extended dot product functions utilized in high- dimensional feature space to compute the dot product of vector s xx and yy. A linear classifier uses the Kernel trick approach to solve a non-linear issue by chan ging linearly inseparable data into separable data in higher dimensions.
Recognize the differ ences between a box plot and a histogram.
Box plots and histograms are visualizations for displaying data distributions and communicating information effectively . Histograms are examples of bar charts that depict the frequency of numerical variable values and may calculate probability distributions, variations, and outliers. Boxplots communicate various data ...
How will you balance/corr ect data that is unbalanced?
Unbalanced data can be corrected or balanced using a variety of approaches. It is possible to expand the sample size for minority groups, and the number of samples can be reduced for classes with many data points. The following are some of the methods used to balance data: Utilize the proper assessment metrics: It's cr...
Random for est or many decision tr ees: which is better?
Because random forests are an ensemble approach that guarantees numerous weak decision trees learn forcefully , they are far more robust,accurate, and less prone to overfitting than multiple decision trees.
What criteria do we use to determine the statistical importance of an instance?
The statistical significance of insight is determined by hypothesis testing. The null and alternate hypotheses are provided, and the p-value is computed to explain further . We considered a null hypothesis true after computing the p-value, and the values were calculated. The alpha value, which indicates importance, is ...
What ar e the applications of long-tail distributions?
A long-tailed distribution is when the tail progressively diminishes as the curve progresses to the finish. The usage of long-tailed distributions is exemplified by the Pareto princ iple and the product sales distribution, and it's also famous for classification and regression dif ficulties
What is the definition of the central limit theor em, and what is its application?
The central limit theorem asserts that when the sample size changes without changing the form of the popula tion distribution, the normal distribution is obtained. The central limit theorem is crucial since it is commonly utilized in hypothesis testing and precisely calculating confidence intervals.
In statistic s, what do we understand by observational and experimental data?
Data from observational studies, in which variables are examined to see a link, is referred to as observat ional data. Experimental data comes from investigations in which specific factors are kept constant to examine any disparity in the results.
What does mean imputation for missing data means? What are its disadvantages?
Mean imputatio n is a seldom-used technique that involves replacing null values in a dataset with the data's mean. It's a terrible approach since it removes any accountability for feature correlation. This also indicates that the data will have low variance and a higher bias, reducing the model's accuracy and narrowing...
What is the definition of an outlier , and how do we recogn ize one in a dataset?
Data points that differ significantly from the rest of the dataset are called outliers. Depend ing on the learning process, an outlier can significantly reduce a model's accuracy and ef ficiency . Two strategies are used to identify outliers: Interquartile range (IQR) Standard deviation/z-score
In statistics, how ar e missing data tr eated?
In Statistics, there are several options for dealing with missing data: Missing values prediction Individual (one-of-a-kind) value assignment Rows with missing data should be deleted Imputation by use of a mean or median value Using random forests to help fill in the blanks
What is exploratory data analysis, and how does it differ from other types of data analysis?
Investigating data to comprehend it better is known as explo ratory data analysis. Initial investigations are carried out to identify patterns, detect anomalies, test hypotheses, and confirm correct assumptions.
What is selection bias, and what does it imply?
The phenomenon of selection bias refers to the non-random selection of individual or grouped data to undertake analysis and better understand model functionality . If proper randomization is not performed, the sample will not correctly represent the population.
What ar e the many kinds of statistical selection bias?
As indicated below , there are dif ferent kinds of selection bias: Protopathic bias Observer selection Attrition Sampling bias Time intervals
What is the definition of an inlier?
An inlier is a data point on the same level as the rest of the dataset. As opposed to an outlier , finding an inlier in a dataset is more challenging because it requires external data. Outliers diminish model accuracy , and inliers do the same. As a result, they're also eliminated if found in the data. This is primaril...
Describe a situation in which the median is superior to the mean.
When some outliers might skew data either favorably or negatively , the median is preferable since it offers an appropriate assessment in this instance.
Could you pr ovide an example of a r oot cause analysis?
As the name implies, root cause analysis is a problem-solving technique that identifies the problem's fundamental cause. For instance, if a city's greater crime rate is directly linked to higher red-colored shirt sales, this indicates that the two variables are positively related. However , this does not imply that one...
What does the term "six sigma" mean?
Six sigma is a quality assurance approach frequently used in statistics to enhance procedures and function ality while working with data. A process is called six sigma when 99.99966 percent of the model's outputs are defect- free.
What is the definition of DOE?
In statistics, DOE stands for "Design of Experiments." The task design specifies the data and varies when the independent input factors change.
Which of the following data types does not have a log-normal or Gaussian distribution?
There are no log-normal or Gaussian distributions in exponential distributions, and in reality , these distributions do not exist for categorical data of any kind. Typical examp les are the duration of a phone call, the time until the next earthquake, and so on.
What does the five-number summary mean in Statistics?
As seen below , the five-number summary is a measure of five entities that encompass the complete range of data: Upper quartile (Q3) High extreme (Max) Median Low extreme (Min) The first quartile (Q1)
What is the definition of the Par eto principle?
The Pareto princ iple, commonly known as the 80/20 rule, states that 80% of the results come from 20% of the causes in a given experiment. The observation that 80 percent of peas originate from 20% of pea plants on a farm is a basic example of the Pareto principle. Probability Data scientists and machine learning engin...
How do you distinguish between the Bernoulli and binomial distributions?
The Bernoulli distribution simulates one trial of an experiment with just two possible outcomes, whereas the binomial distribution simulates n trials.
Descr ibe how a probability distribution might be non-normal and provide an example.
The probability distribution is not normal if most observations do not cluster around the mean, creat ing the bell curve. A uniform probability distribution is an example of a non-normal probability distribution, in which all values are equally likely to occur within a particular range.
How can you tell the differ ence between correlation and covariance?
Give a specific example. Covariance can be any numeric value, but correlation can only be between -1 (strong negative correlation) and 1 (strong positive correlation) (strong direct correlation). As a result, a link between two variables may appear to have a high covariance but a low correlation value.
How are the Central Limit Theor em and the Law of Large Numbers different?
The Law of Large Numbers states that a "sample mean" is an unbiased estimator of the population mean and that the error of that mean decreases as the sample size grows. In contrast, the Central Limit Theorem states that as a sample size n grows large, the normal distribution can approximate its distribution.
What is the definition of an unbiased estimator? Give a layperson an example.
An accurate statistic used to estimate a population parameter is an unbiased estimator . An example is using a sample of 1000 voters in a political poll to assess the overall voting population, and there is nothing like an utterly objective estimator .
Assume that the chance of finding a particular object X at location A is 0.6 and that finding it at location B is 0.8. What is the likelihood offinding item X in places A or B?
Let us begin by defining our probabilities: P(Item at location A) = P(A) = 0.6 P(Item at location B) = P(B) = 0.8 We want to understand how likely it is that item X will be found on the internet in this city. The likeliho od that item X is at location A or location B may be calculat ed from the question. We can describ...
Assume you have a deck of 500 cards with numbers rang ing from 1 to 500. What is the likelihood of each following card being larger than the previously drawn card if all the cards are mixed randomly , and you are asked to choose thr ee cards one at a time?
Consider this a sample space problem, with all other specifics ignored. We may suppose that if someone selects three distinct numbered unique cards at random without replacement, there will be low , medium, and high cards. Let's pretend we drew the numb ers 1, 2, and 3 to make things easier . In our case, the winnin g ...
Assume you have one function, which gives a random number between a minimum and maximum value, N and M. Then take the output of that function and use it to calculate the total value of another random number generator with the same minimum value N. How would the resulting sample distribution be spread? What would the se...
Let X be the first run's outcome, and Y be the second run's result. Because the integer output is "random" and no other information is provided, we may infer that any integers betw een N and M have an equal chan ce of beingchosen. As a result, X and Y are discrete uniform random variables with N & M and N & X limits, r...
An equilate ral triangle has three zebras seated on each corner . Each zebra chooses a direction at random and only sprints along the triangle's outline to either of the triangle's opposing edges. Is there a chance that none of the zebras will collide?
Assume that all of the zebras are arranged in an equilateral triangle. If they're sprinting down the outline to either edge, they have two alternatives for going in. Let's compute the chances that they won't collide, given that the scenario is random. In reality , there are only two options. The zebras will run in eith...
You contact three rando m pals in Seattle and ask them if it's raining on their own. Each of your pals has a two-thirds probability of giving you the truth and a one-third risk of deceiving you by lying. "Yes," all three of your buddies agree, it is raining. What are the chances that it's raining in Seattle right now?
According to the outcome of the Frequentist method, if you repeat the trials with your friends, there is one occurrence in which all three of your friends lied inside those 27 trials. However , becau se your friends all provided the same response, you're not interested in all 27 trials, which would include occurrences ...
You are handed a neutral coin, and you are to toss the coin until it lands on either Heads Heads T ails (HHT) or Heads T ails T ails (HTT). Is it more probab le that one will appear first? If so, which one and how 13. You are handed a neutral coin, and you are to toss the coin until it lands on either Heads Heads T ail...
This question needs a little memory . Given that we have to predict the number of heads out of some trials, we may deduce that it's a binomial distribution problem at first look. As a result, for each test, we'll employ a binomial distribution with n trials and a probability of success of p. The probability for success...
null
Given the two circumstances, we may conclude that both sequences need H to come first. The chance of HHT is now equal to 1/2 after H occurs. What is the reason behind this? Because all you need for HHT in this circumstance is one H. Because we are flipping the coin in series until we observe a string of HHT or HTT in a...
Under what circumstances does the inverse of a diagonal matrix
If all diagonal elements are non-zero, the inversion of a square diagonal matrix exists. If this is the case, the inverse is derived by substituting the reciprocal of each diagonal element.
What does Ax = bAx=b stand for? When does Ax = b have a unique solution?
Ax = b is a set of linear equations written in matrix form, in which: A is the order m x n coefficien t matrix, and x is the order n x 1 incognite variables vector . The constants create the vector b, which has the order m x 1. If and only if the system Ax = b has a unique solution. n rank[A|b] = n rank[A|b] = n n rank...
What is the process for diagonalizing a matrix?
To obtain the diagonal matrix D of an nxn matrix A, we must do the following: Determine A's characteristic polynomial. To get the eigenvalues of A, find the roots of the characteristic polynomial. Find the corresponding eigenvectors for each of A's eigenvalues. The matrix is not diagonalizable if the total number of ei...
Find the definition of positive definite, negative definite, positive semi-definite, and negative semi-definite matrices?
A positi ve defin ite matrix (PsDM) is a symmetric matrix M in which the number ztMz is positive for each non-zero column vector z. A symm etric matrix M is a positive semi-definite matrix if the number ztMz is positive or zero for every non-zero column vector z. Negative semi- definite matrices and negative definite m...
How does Linear Algebra relate to br oadcasting?
Broadcasting is a technique for easing element-by-element operations based on dime nsion constraints. If the relevant dimensions in each matrix (rows versus rows, columns versus columns) match the following conditions, we say two matrices are compatible for broadcasting. The measurements are the same, or one of the dim...
What is an Orthogonal Matrix?
An orthogonal matrix is a square matrix with columns and rows of orthonormal unit vectors, such as perpendicular and length or magnitude. It's formally defined as follows: Q^t Q = Q Q^t = IQt, Q=QQ,   t=I Where Q stands for the orthogonal matrix, Qt for the transpose of Q, and I for the identity matrix. W e can observe...
What exactly is Python?
Python is a general-purpose, high-level, interpreted programming language. The correct tools/libraries may be used to construct practically any application because it is a general-purpose language. Python also has features like objects, modules, threads, exception handling, and automated memory management, which aid in...
What ar e the advantages of Python?
Python is a general-purpose programming language with a simple, easy-to- learn syntax that prioritizes readability and lowers program maintenancecosts. Furthermore, the language is scriptable, open-source, and enables third-party packages, promoting modularity and code reuse. Its high-level data structures, along with ...
What is the definition of dynamically typed language?
We must first learn about typing before comprehending a dynamically typed language. In computer languages, typing refers to type-checking. Because these languages don't allow for "type-coercion," "1" + 2 will result in a type error in a strongly-typed language like Python (implicit conversion of data types). On the oth...
What is the definition of an Interpreted Language?
The sentences in an Interpreted language are executed line by line. Interpreted languages include Python, JavaScript, R, PHP, and Ruby , to name just a few. An interpreted language program executes straight from the source code without a compilation phase.
What is the meaning of PEP 8, and how significant is it?
Python Enhancement Proposal (PEP) is an acronym for Python Enhancement Proposal. A Python Extension Protocol (PEP) is an official design document that provides information to the Python community or describes a new feature or procedure for Python. PEP 8 is particularly important since it outlines the Python code style ...
What is the definition scope in Python?
In Python, each object has its scope. In Python, a scope is a block of code in which an object is still releva nt. Namespaces uniquely identify all the objects in a program. On the other hand, these namespaces have a scope set for them , allowing you to utilize their objects without any prefix. The following are a few ...
What is the meaning of pass in Python?
In Python, the pass keyword denotes a null operation. It is commonly used to fill in blank blocks of code that may execute during runtime but has not yet been written. We may encounter issues during code execution if we don't use the pass statement in the following code.
How does Python handle memory?
The Python Memory Manager is in charge of memory management in Python. The memory allotted by the manager is in the form of a Python- only private heap area. This heap holds all Python objects, and because it is private, it is unavailable to the programmer . Python does, however , haveseveral basic API methods for work...
What are namespaces in Python? What is their purpose?
In Python, a namespace ensures that object names are uniqu e and used without conflict. These namespaces are implemented in Python as dictionaries with a 'name as key' and a corresponding 'object as value.' Due to this, multiple namespaces can use the same name and map it to a different object. Here are a few instances...
What is Python's Scope Resolution?
Objects with the same name but distinct functions exist inside the same scope. In certain instances, Python's scope resolution kicks in immediately . Here are a few examples of similar behavior: Many functions in the Python modules 'math' and 'cmath' are shared by both - log10(), acos(), exp(), and so on. It is importa...
Explain the definition of decorators in Python?
Decorators in Python are simp ly functions that add functionality to an existing Python function without affecting the function's structure. In Python, they are represented by the name @decorator name and are invoked from the bottom up. The elegance of decorators comes in the fact that, in addition to adding functional...
What are the definitions of dict and list comprehensions?
Python comprehensions, like decorators, are syntactic sugar structures that aid in the construction of chang ed and filtered lists, dictionaries, and sets from a given list, dictionary , or set. Using comprehensions saves a lot of effort and allow s you to write less verbose code (containing more lines of code). Consid...
What is the definition of lambda in Python? What is the purpose of it?
In Python, a lambda function is an anonymous function that can take any number of parameters but only have one expression. It's typically utilized when an anonym ous function is required for a brief time. Lambda functions can be applied in two dif ferent ways: To assign lambda functions to a variable, do the following:...
In Python, how do you make a copy of an object?
The assignment statement (= operator) in Python doesn't duplicate objects. Instead, it establishes a connec tion between the existing object and the name of the target variable. In Python, we must use the copy module to make copies of an object. Furthermore, the copy module provides two options for producing copies of ...
What are the definitions of pickling and unpickling?
Serialization out of the box is a feature that comes standard with the Python library . Serializing an object means converting it into a format that can be saved to be de-serialize d later to return to its original state. The pickle module is used in this case.Pickling In Python, the serialization process is known as p...
What is PYTHONPATH?
PYTHONPATH is an environme nt variable that allows you to specify extra directories in which Python will look for modules and packa ges. This is especially important if you want to keep Python libraries that aren't installed in the global default location.
What ar e the functions help() and dir() used for?
Python's help() method displays modules, classes, functions, keywords, and other objects. If the help() method is used without an argument, an interactive help utility is opened on the console. The dir() function attempts to return a correct list of the object's attributes and methods. It reacts differently to various ...
How can you tell the differ ence between.py and.pyc files?
The source code of a program is stored in.py files. Meanwhile, the bytecode of your program is stored in the .pyc file. After compiling the.py file, we obtain bytecode (source code). For some of the files you run, .pyc files are not produced. It's solely there to hold the files you've imported—the python interpreter ch...
What does the computer interpret in Python?
Python is not an interpreted or compiled language. The imple mentation's attribute is whether it is interpreted or compiled. Python is a bytecode (a collection of interpreter -readable instructions) that may be interpreted differently . The source code is saved with the extension .py. Python generates a set of instruct...
In Python, how are arguments delivered by value or reference?
Pass by value: The real object is copied and passed. Changing the value of the object's duplicate does not af fect the original object's value. Pass via reference: The real object is supplied as a reference. The value of the old object will change if the value of the new object is changed. Arguments are supplied by ref...
What exactly are Pandas/Python Pandas?
Pandas are a Python open-source toolkit that allows for high-p erformance data manipulation. Pandas get its name from "panel data," which refers to econometrics based on multidimensional data. It was created by Wes McKinney in 2008 and may be used for data analysis in Python. It can conduct the five major processes nec...
What are the different sorts of Pandas Data Structures?
Pandas provide two data structures, Series and DataFrames, which the panda's library supports. Both of these data structures are based on the NumPy framew ork. A series is a one-dimensional data structure in pandas, whereas a DataFrame is two-dimensional.
How do you define a series in Pandas?
A Series is a one-dimensional array capable of holding many data types. The index refers to the row labels of a series. We can quickly turn a list, tuple, or dictionary into a series by utilizing the 'series' function. Multiple columns are not allowed in a Series.
How can the standard deviation of the Series be calculated?
The Pandas std() method is used to calculate the standard deviation of a collection of values, a DataFrame, a column, and a row . Series.std( skipna=None, axis=None, ddof=1, level=None, numeric_only=None, **kwar gs)
How do you define a DataFrame in Pandas?
A DataFrame is a pandas data structure that uses a two-dimensional array with labeled axes (rows and columns). A DataFrame is a typical way to store data with two indices, namely a row index, and a column index. It has the following characteristics: Columns of heterogeneous kinds, such as int and bool, can be used, and...
What distinguishes the Pandas Library from other libraries?
The following are the essential aspects of the panda's library: Alignment of Data, Efficient Memory, Time Series, Reshapin, Join and merge
What is the purpose of reindexing in Pandas?
DataFrame is reindexed to adhere to a new index with optional filling logic. It inserts NA/NaN in areas where the values are missing from the precedingindex. Unless the new index is provided as identical to the current one, the value of the copy becomes False. It returns a new object, and it is used to modify the DataF...
Can you explain how to use categorical data in Pandas?
Categorical data is a Pandas data type that correlates to a categorical statistical variab le. A categorical variable has a restricted number of potential values, usually fixed . Gender , place of origin, blood type, socioeconomic status, observation time, and Likert scale rating s are just a few examples. Categorical ...
In Pandas, how can we make a replica of the series?
The following syntax can be used to make a replica of a series: Series.copy(deep=T rue) pandas.Series.copy The statements above create a deep copy , which contains a copy of the data and the indices. If we set deep to False, neither the indices nor the data will be copied.
How can I rename a Pandas DataFrame's index or columns?
You may use the .rename method to change the values of DataFrame'scolumns or index values.
What is the correct way to iterate over a Pandas DataFrame?
By combining a loop with an iterrows() function on the DataFrame, you may iterate over the rows of the DataFrame.
How Do I Remove Indices, Rows, and Columns from a Pandas Data Frame?
You must perform the followin g if you wish to delete the index from the DataFrame: Dataframe's Index Reset To delete the index name, run del df.index.name. Reset the index and drop the duplicate values from the index column to remove duplicate index values. With a row , you may remove an index. Getting Rid of a Column...
What is a NumPy array in Pandas?
Numerical Python (Numpy) is a Python module that allows you to do different numerical computations and handle multidimensional and single- dimensional array items. Numpy arrays are quicker than regular Python arrays for computations.
What is the best way to transform a DataFrame into a NumPy array?
We can convert Pandas DataFrame to NumPy arrays to conduct various high-level mathe matical procedu res. The DataFrame.to NumPy() method is used. The DataFrame.to_numpy() function is used to the DataFrame which returns the numpy ndarray . DataFrame.back to_the numpy(dtype=None, copy=False).
What is the best way to convert a DataFrame into an Excel file?
Using the to excel() method, we can export the DataFrame to an excel file. We must mentio n the destination filename to write a single object to an excel file. If we wish to write too many sheets, we must build an ExcelW riter object with the destination filename and the sheet in the file that we want to write to.
What is the meaning of Time Series in panda?
Time series data is regarded as an important source of information for developing a strategy that many organizations may use. It contains a lot of facts about the time, from the traditional banking business to the education industry . Time series forecastin g is a machine learning model that deals with T ime Series dat...
What is the meaning of Time Offset?
The offset defines a range of dates that meet the DateOffset's requirements. We can use DateOffsets to advance dates forward to make them legitimate.
How do you define Time periods?
The Time Periods reflect the length of time, such as days, years, quarters, and months. It's a class that lets us convert frequencies to periods.
What exactly is Numpy?
NumPy is a Python-based array processing program. It inclu des a high- performance multidimensional array object and utilities for manipulating them. It is the most important Python module for scientific computing. An N-dimensional array object with a lot of power and sophisticated broadcasting functions.
What is the purpose of NumPy in Python?
NumPy is a Python module that is used for Scientific Com puting. The NumPy package is used to carry out many tasks. A multidimensional array called ndarray (NumPy Array) holds the same data type values. These arrays are indexed in the same way as Sequences are, starting at zero.
What does Python's NumPy stand for?
NumPy (pronou nced /nmpa/ (NUM-py) or /nmpi/ (NUM-pee)) is a Python library that adds support for huge, multi-dimensional arrays and matrices, as well as a vast number of high-level mathematical functions to work on these arrays.
Wher e does NumPy come into play?
NumPy is a free, open-source Python library for numerical computations. A multi-dimensional array and matrix data structures are included in NumPy , and it may execute many operations on arrays, including trigonometric, statistical, and algebraic algorit hms. NumPy is a Numeric and Numarray extension.
Installation of Numpy into Windows?
Step 1:Install Python on your Windows 10/8/7 computer . To begin, go to the official Python download website and download the Python executable binaries for your W indows machine. Step 2: Install Python using the Python executable installer . Step 3: Download and install pip for W indows 10/8/7. Step 4: Install Numpy i...
What is the best way to import NumPy into Python?
Import NumPy as np
How can I make a one-dimensional(1D)array?
Num=[1,2,3] Num = np.array(num) Print(“1d array : “,num)
How can I make a two-dimensional (2D)array?
Num2=[[1,2,3],[4,5,6]] Num2 = np.array(num2) Print(“\n2d array : “,num2)
How do I make a 3D or ND array?
Num3=[[[1,2,3],[4,5,6],[7,8,9]]] Num3 = np.array(num3) Print(“\n3d array : “,num3)
What is the best way to use a shape in a 1D array?
If num=[1,2,3], print('nshape of 1d',num.shape) if not defined.
What is the best way to use shape in a 2D array?
If not added, num2=[[1,2,3],[4,5,6]] print('nshape of 2d',num2.shape)
What is the best way to use shape in 3D or Nd Array?
Num3=[[[1,2,3],[4,5,6],[7,8,9]]] if not added Print(‘\nshpae of 3d ‘,num3.shape)
What is the best way to identify the data type of a NumPy array?
Print(‘\n data type num 1 ‘,num.dtype) Print(‘\n data type num 2 ‘,num2.dtype) Print(‘\n data type num 3 ‘,num3.dtype)
Can you print 5 zeros?
Arr = np.zeros(5) Print(‘single arrya’,arr)
Print zeros in a two-row, three-column format?
Arr2 = np.zeros((2,3)) Print(‘\nprint 2 rows and 3 cols : ‘,arr2)
Is it possible to utilize eye() diagonal values?
Arr3 = np.eye(4) Print(‘\ndiaglonal values : ‘,arr3)
Is it possible to utilize diag() to create a square matrix?
Arr3 = np.diag([1,2,3,4]) Print(‘\n square matrix’,arr3)