TutorMe homepage

SIGN IN

Start Free Trial

Apoorva H.

Oxford University Graduate

Tutor Satisfaction Guarantee

Machine Learning

TutorMe

Question:

What is the most important preprocessing step for any machine learning algorithm?

Apoorva H.

Answer:

Data analysis - Transforming and processing raw data to : 1. identify discriminating data attributes. 2. remove unwanted influence based on the scales and value range of data attributes. In Machine Learning (ML), each data attribute is termed as a feature. The features are given as inputs to the ML algorithm and hence form the basis for both learning and making future predictions. In order to facilitate learning, it is, therefore, necessary to choose discriminative features. Furthermore, reducing the feature space by getting rid of redundant features can provide better abstractions, thereby improving the algorithm's convergence as well as the generalization capability to make better predictions. Some ML algorithms can be sensitive to data magnitude, by adopting techniques such as data normalization, equal contributions across all features can be ensured.

Computer Science (General)

TutorMe

Question:

What is the worst-case time complexity, Big-O , of the below algorithm in terms of $$\texttt{N}$$, which is even, i.e, $$\texttt{N} = 2^p$$? $$\texttt{int count = 0;}\\ \texttt{for (int i = N; i > 0; i /= 2) }\\ \{ \\ \quad \texttt{for (int j = 0; j < i; j++)} \\ \quad \{ \\ \qquad \texttt{count++;}\\ \quad \} \\ \}$$

Apoorva H.

Answer:

In order to find the time complexity, we need to find the number of times the instruction $$\texttt{count++}$$ is executed. When $$\texttt{i=N}$$, the statement is executed $$\texttt{N}$$ times When $$\texttt{i=N/2}$$, the statement is executed $$\texttt{N/2}$$ times When $$\texttt{i=N/2$^2$}$$, the statement is executed $$\texttt{N/2$^2$}$$ times Therefore, When $$\texttt{i=N/2$^k$}$$, the statement is executed $$\texttt{N/2$^k$}$$ times, where $$k = 0, 1, ..., p$$ . We can verify this for the terminating case of $$\texttt{i=1}$$. When $$\texttt{i=1}$$, $$\texttt{count++}$$ statement is executed 1 time. $$ 1 = \texttt{N}/\texttt{N} = \texttt{N}/2^p$$ Let $$T(\texttt{N})$$ denote the total number of times the instruction $$\texttt{count++}$$ is executed. Then, $$ \begin{align} T(\texttt{N}) &= \texttt{N} + \frac{\texttt{N}}{2}+ \frac{\texttt{N}}{4} + ... + 1 \\ &= \texttt{N} + \frac{\texttt{N}}{2}+ \frac{\texttt{N}}{2^2} + ... + \frac{\texttt{N}}{2^p} \\ &= \texttt{N} \bigg\{1 + \frac{1}{2} + \frac{1}{2^2} + ... + + \frac{1}{2^p} \bigg\} \end{align}$$ The above equation represents the sum of a finite geometric progression (GP) with common ratio $$r= \frac{1}{2}$$ and scale factor, $$a = \texttt{N}$$. Applying the GP sum formula $$a \frac{(1-r^p)}{1-r}$$, we have $$T(\texttt{N}) = \texttt{N} \frac{1-\frac{1}{2^p}}{1-\frac{1}{2}} = \texttt{N} \frac{1-\frac{1}{2^p}}{\frac{1}{2}} = 2 \times \texttt{N} \times (1-\frac{1}{2^p}) < 2 \times \texttt{N}$$. Therefore, the given algorithm performs in O(N).

Algebra

TutorMe

Question:

Three consecutive even integers add up to fifty four. What are the integers?

Apoorva H.

Answer:

An even integer is an integer that is divisible by 2. Examples of even integers are 0, 2, 6, 100 and so on. Consecutive even integers are even integers that occur one after that other. For example, integers 2, 4 and 6 are three consecutive even integers. Now let us try to come up with a pattern that defines any three even consecutive integers. To start off, consider the consecutive integers 4, 6 and 8. We can write 6 and 8 in terms of 4 as follows: 6 = 4+ 2 8 = 4+ 4 Let us now replace 4 with a variable $$n$$, indicating the first even integer. Then the second and third consecutive even integers can be expressed as $$n+2$$ and $$n+4$$ respectively. Therefore, any three consecutive even integers are in the form $$n, n+2$$ and $$n+4 $$. We can now formulate the given problem as : $$n + (n+2) + (n+4) = 54$$ Simplifying: $$3n + 6 = 54$$ $$3n = 48 $$ $$n = 16$$ This implies $$n+2 = 16 + 2 = 18$$ $$n+4 = 16+4 = 20$$ Therefore, the required three even consecutive numbers are 16, 18 and 20

Send a message explaining your

needs and Apoorva will reply soon.

needs and Apoorva will reply soon.

Contact Apoorva

Ready now? Request a lesson.

Start Session

FAQs

What is a lesson?

A lesson is virtual lesson space on our platform where you and a tutor can communicate.
You'll have the option to communicate using video/audio as well as text chat.
You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.

How do I begin a lesson?

If the tutor is currently online, you can click the "Start Session" button above.
If they are offline, you can always send them a message to schedule a lesson.

Who are TutorMe tutors?

Many of our tutors are current college students or recent graduates of top-tier universities
like MIT, Harvard and USC.
TutorMe has thousands of top-quality tutors available to work with you.

Made in California

© 2019 TutorMe.com, Inc.