Basics of Machine Learning Series
What are Skewed Classes?
Skewed classes basically refer to a dataset, wherein the number of training example belonging to one class out-numbers heavily the number of training examples beloning to the other.
Consider a binary classification, where a cancerous patient is to be detected based on some features. And say only \(1\ %\) of the data provided has cancer positive. In a setting where having cancer is labelled 1 and not cancer labelled 0, if a system naively gives the prediction as all 0’s, still the prediction accuracy will be 99%.
% naive prediction ignoring features
def predict_cancer(x):
return 0
Therefore, it can be said with conviction that the accuracy metrics or mean-squared error for skewed classes, is not a proper indicator of model performance. Hence, there is a need for a different error metric for skewed classes.
Precision/Recall
Note: \(y = 1\) is ther rarer class among the two.
In a binary classification, one of the following four scenarios may occur,
- True Positive (TP): the model predicts 1 and the actual class is 1
- True Negative (TN): the model predicts 0 and the actual class is 0
- False Positive (FP): the model predicts 1 but the actual class is 0
- False Negative (FN): the model predicts 0 but the actual class is 1
Then precision and recall can be defined as follows,
Precision defines of all the predictions \(y=1\), which ones are correct.
Recall defines of all the actual \(y=1\), which ones did the model predict correctly.
Now, if we evaluate a scenario where the classifier predicts all 0’s then the recall of the model will be 0, which then points out the inability of the system.
In case of skewed classes, it’s not possible for the classifiers to cheat the evaluation metrics of recall and precision. Also, it is important to note that precision and recall metrics work better if \(y=1\), denotes the presence of the rarer class.
The Tradeoff
By changing the threshold value for the classifier confidence, one can adjust the precision and recall for the model.
For example, in a logistic regression the threshold is generally at 0.5. If one increases it, we can be sure that of all the predictions made more will be correct, hence, high precision. But there are also higher chances of missing the positive cases, hence, the lower recall.
Similary, if one decreases the threshold, then the chances of false positives increases, hence low precision. Also, there is lesser probability of missing the actual cases, hence high recall.
A precision-recall tradeoff curve may look like one among the following,
F Score
Given two pairs of precision and recall, how to choose the better pair. One of the options would be to choose the one which higher average. That is not the ideal solution as the pair with \((precision=0.02 and recall= 1)\) has a better mean than the pair \((precision=0.5 and recall= 0.4)\).
Enter \(F\,Score\) or \(F_1\,Score\), which is the harmonic mean of precision and recall, defined as,
The above formula has advantage over the average method because, if either precision or recall is small, the the numerator product \(P*R\) will weigh the F-Score low and consequently lead to choosing the better pair of precision and recall. So,
- if \(P=0\) or \(R=0\), then \(F_1=0\)
- if \(P=1\) and \(R=1\), then \(F_1=1\)
One reasonable way of automatically choosing threshold for classifier is to try a range of them on the cross-validation set and pick the one that gives the highest F-Score.
Sensitivity/Specifivity
Apart from precision and recall, sensitivity and specifivity are among the most used error metrics in classfication.
- Sensitivity or True Positive Rate (TPR) is another name for recall and is also called hit rate
- Specifivity (SPC) or True Negative Rate
Using Large Datasets
Although, its been stated here that for a high bias problem in the model, gathering more and more data will not help the model improve.
But under certain conditions, getting a lot of data and training on a certain type of training algorithm can be an effective way to improve the learning algorithm’s performance.
The following are the conditions that should be met for the above statement to hold true,
- The features, \(x\), must have sufficient information to predict \(y\) accurately. One way to test this would be to check if human expert can make a confident predition using the features.
- Using a learning algorithm with a large number of parameters to learn (e.g. logistic regression, linear regression, neural network with many hidden units etc.). What this truly accomplishes is that these algorithms are low bias algorithm due to the large number of learnable parameters.
In such settings, where the problem of high bias is removed by the virtue of highly parametrized learning algorithms, a large dataset ensures the low variance. Hence, under the listed settings a large number of dataset is almost always going to help improve the model performance.
It’s not who has the best algorithm that wins, it’s who has the most data.
REFERENCES:
Machine Learning: Coursera - Error Metrics for Skewed Classes
Machine Learning: Coursera - Trading off Precision and Recall
Machine Learning: Coursera - Data for Machine Learning
Sensitivity and Specifivity - Wikipedia


WITNESS LIST Appropriations-S/C on Emoluments Committee March 12, 1997-1:30P Emoluments On: Antilley, ALice (Parks and Wildlife) Bollinger, Rob (State Auditor) Elkins, James (Health Department) Furr, Colonel Randy (Adjutant General) Gilbert, Don (MHMR) Herncir, Charles (State Auditor) Marty, General Wayne (Adjutant General) Rickard, Frances (Historical Commission) Robinson, Steve (Youth Commission) Scott, Wayne (Dept.of Crim. Justice) Scruggs, William (Parks and Wildlife)


ScaleExp → Tone.SignalBase
Performs an exponential scaling on an input signal. Scales a NormalRange value [0,1] exponentially to the output range of outputMin to outputMax.
new
Tone.ScaleExp
([outputMin][, outputMax][, exponent])
outputMin =
0
{number}
outputMax =
1
{number}
exponent =
2
{number}
The output value when the input is 0.
The output value when the input is 1.
The exponent which scales the incoming signal.
code
var scaleExp = new Tone.ScaleExp(0, 100, 2);
var signal = new Tone.Signal(0.5).connect(scaleExp);
members
.exponent
{number}
Instead of interpolating linearly between the min
and
max
values, setting the exponent will interpolate between
the two values with an exponential curve.
.min
{number}
The minimum output value. This number is output when the value input value is 0.
.max
{number}
The maximum output value. This number is output when the value input value is 1.
methods


per-instance state More...
#include <McaspLocal.h>
Data Fields | |
| uint16_t | instNum |
| Mcasp_DriverState | devState |
| Bool | isDataBufferPayloadStructure |
| Mcasp_HwSetup | mcaspHwSetup |
| Bool | enablecache |
| Bool | stopSmFsXmt |
| Bool | stopSmFsRcv |
| Mcasp_ChannelObj | XmtObj |
| Mcasp_ChannelObj | RcvObj |
| Mcasp_HwObj | hwInfo |
| Mcasp_SerializerStatus | serStatus [Mcasp_NUMSERIALIZERS] |
| uint32_t | retryCount |
| Bool | loopJobMode |
| Bool | pscPwrmEnable |
| void * | prcmHandle |
per-instance state
| Mcasp_DriverState Mcasp_Object_s::devState |
stores the current state of the driver
| Bool Mcasp_Object_s::enablecache |
Submitted buffers are in cacheable memory
| Mcasp_HwObj Mcasp_Object_s::hwInfo |
McASP handle for initial port configuration
| uint16_t Mcasp_Object_s::instNum |
Preserve instance number in port
| Bool Mcasp_Object_s::isDataBufferPayloadStructure |
Input request is a flat data buffer or a payload * structure
| Bool Mcasp_Object_s::loopJobMode |
Variable to check if the loop job mode is enabled or not
| Mcasp_HwSetup Mcasp_Object_s::mcaspHwSetup |
Hw parmas to configure mcasp
| void* Mcasp_Object_s::prcmHandle |
Handle to the prcm instance to be used to switch on the instance
| Bool Mcasp_Object_s::pscPwrmEnable |
Option to enable or disable the PSC control in the driver
| Mcasp_ChannelObj Mcasp_Object_s::RcvObj |
Holds receive channel to the McASP.
| uint32_t Mcasp_Object_s::retryCount |
The retry count value to be used when waiting for the TX empty to be * set
| Mcasp_SerializerStatus Mcasp_Object_s::serStatus[Mcasp_NUMSERIALIZERS] |
Holds status information for both the serializers. *
| Bool Mcasp_Object_s::stopSmFsRcv |
Status of stoping state m/c for RCV
| Bool Mcasp_Object_s::stopSmFsXmt |
Status of stoping state m/c for XMT
| Mcasp_ChannelObj Mcasp_Object_s::XmtObj |
Holds transmit channel to the McASP.


Robert Moreno: "You will need to ask Luis Enrique what happened"
After releasing a statement last night, Moreno spoke today about the continuing fallout from his sacking as Spain's head coach
by Joan TuraFollowing Robert Moreno's statement last night, the now-former Spain coach was spotted by media outlets and spoke his silence on the matter.
When asked what had happened with Luis Enrique, amid reports the returning coach didn't want Moreno to continue as his assistant, Moreno admitted he didn't know what the truth was. "You'd need to ask Luis Enrique. I think the best thing for all sides is that it remains between us. If the other wants to talk, let them talk. I don't have anything to say because I don't think it would be good for anybody."
When asked about the understanding tone of his statement, Moreno said: "That's how I am. I expressed my feelings. I'm just sorry I couldn't explain anything else. I honestly think that statement says everything. I don't feel betrayed."
"I've already started to get some calls from teams. It's incredible to see people value your work. But for now, I want to relax for a few days with my family."


BADLAV is a registered non-profit organization committed to provide
disaster response and preparedness services to the vulnerable
communities in both crisis and non-crisis situations.
Mission:
To provide immediate, effective and sustainable support for the
victims of natural disasters.
Vision : We envision a safer and disaster resilient India.
CORE VALUES :
- All members of our organization are driven by their passion for
disaster management.
- We are committed to be open and transparent about what we do and
how we do it.
- We value honesty, mutual respect and professionalism in all aspects
of relationships within us and between our organization and our
partners.
WHAT WE DO :
DISASTER RESPONSE:
Rapid Response, respond immediately to families affected by natural
disasters with food, water and essential items and also work towards
rehabilitation of the affected families. Our emergency responses are
timely at appropriate scale and scope, providing high quality
programs effectively for the most vulnerable survivors and their
families.
- Rescue & Medical Assistance,
- Relief - Distribution of Food, Water, Relief Kit, Hygiene Kit and
Educational Kits,
- Rehabilitation - Focusing on WASH & LIVELIHOODS.
DISASTER PREPAREDNESS : In non-crisis situation, we actively engage with vulnerable
communities and train them to cope with emergencies. With our
following programs, we are preparing the vulnerable communities to
manage disasters better and minimize the impact of natural disasters.
- Community Managed Disaster Risk Reduction Program,
- Comprehensive School Safety Program for Children
Why Disaster Management:
India is one of the most disaster prone countries in the world, 23 out
of 29 states are multi-disaster prone regions. Over 40 million hectare
of land has been identified as flood prone. About 57% of the total
area is vulnerable to earthquake of varying intensities. The Indian
Ocean is one among the six key cyclone-prone regions of the world.
The coriander coastal line is more prone, about 80% of the total
cyclones generated in the region hit here.
Every year millions of Indians were affected by natural disasters.
These disasters leave people traumatized by the death of family,
friends and their lives devastated by their loss of livelihood. The
impact is high and it has been increasing dramatically in the last few
decades in terms of number of people affected and the length of time
they are affected for. This trend is expected to keep rising in coming
years.
To deal with disasters, there is an urgent need of local institution,
which can play a pro-active role in disaster management. This
resulted in the establishment of Rapid Response, a registered Indian
charity dedicated to provide disaster response and preparedness
activities across India