13 skills found
erdogant / Pcapca: A Python Package for Principal Component Analysis.
sayantann11 / All Classification Templetes For MLClassification - Machine Learning This is ‘Classification’ tutorial which is a part of the Machine Learning course offered by Simplilearn. We will learn Classification algorithms, types of classification algorithms, support vector machines(SVM), Naive Bayes, Decision Tree and Random Forest Classifier in this tutorial. Objectives Let us look at some of the objectives covered under this section of Machine Learning tutorial. Define Classification and list its algorithms Describe Logistic Regression and Sigmoid Probability Explain K-Nearest Neighbors and KNN classification Understand Support Vector Machines, Polynomial Kernel, and Kernel Trick Analyze Kernel Support Vector Machines with an example Implement the Naïve Bayes Classifier Demonstrate Decision Tree Classifier Describe Random Forest Classifier Classification: Meaning Classification is a type of supervised learning. It specifies the class to which data elements belong to and is best used when the output has finite and discrete values. It predicts a class for an input variable as well. There are 2 types of Classification: Binomial Multi-Class Classification: Use Cases Some of the key areas where classification cases are being used: To find whether an email received is a spam or ham To identify customer segments To find if a bank loan is granted To identify if a kid will pass or fail in an examination Classification: Example Social media sentiment analysis has two potential outcomes, positive or negative, as displayed by the chart given below. https://www.simplilearn.com/ice9/free_resources_article_thumb/classification-example-machine-learning.JPG This chart shows the classification of the Iris flower dataset into its three sub-species indicated by codes 0, 1, and 2. https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-flower-dataset-graph.JPG The test set dots represent the assignment of new test data points to one class or the other based on the trained classifier model. Types of Classification Algorithms Let’s have a quick look into the types of Classification Algorithm below. Linear Models Logistic Regression Support Vector Machines Nonlinear models K-nearest Neighbors (KNN) Kernel Support Vector Machines (SVM) Naïve Bayes Decision Tree Classification Random Forest Classification Logistic Regression: Meaning Let us understand the Logistic Regression model below. This refers to a regression model that is used for classification. This method is widely used for binary classification problems. It can also be extended to multi-class classification problems. Here, the dependent variable is categorical: y ϵ {0, 1} A binary dependent variable can have only two values, like 0 or 1, win or lose, pass or fail, healthy or sick, etc In this case, you model the probability distribution of output y as 1 or 0. This is called the sigmoid probability (σ). If σ(θ Tx) > 0.5, set y = 1, else set y = 0 Unlike Linear Regression (and its Normal Equation solution), there is no closed form solution for finding optimal weights of Logistic Regression. Instead, you must solve this with maximum likelihood estimation (a probability model to detect the maximum likelihood of something happening). It can be used to calculate the probability of a given outcome in a binary model, like the probability of being classified as sick or passing an exam. https://www.simplilearn.com/ice9/free_resources_article_thumb/logistic-regression-example-graph.JPG Sigmoid Probability The probability in the logistic regression is often represented by the Sigmoid function (also called the logistic function or the S-curve): https://www.simplilearn.com/ice9/free_resources_article_thumb/sigmoid-function-machine-learning.JPG In this equation, t represents data values * the number of hours studied and S(t) represents the probability of passing the exam. Assume sigmoid function: https://www.simplilearn.com/ice9/free_resources_article_thumb/sigmoid-probability-machine-learning.JPG g(z) tends toward 1 as z -> infinity , and g(z) tends toward 0 as z -> infinity K-nearest Neighbors (KNN) K-nearest Neighbors algorithm is used to assign a data point to clusters based on similarity measurement. It uses a supervised method for classification. The steps to writing a k-means algorithm are as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/knn-distribution-graph-machine-learning.JPG Choose the number of k and a distance metric. (k = 5 is common) Find k-nearest neighbors of the sample that you want to classify Assign the class label by majority vote. KNN Classification A new input point is classified in the category such that it has the most number of neighbors from that category. For example: https://www.simplilearn.com/ice9/free_resources_article_thumb/knn-classification-machine-learning.JPG Classify a patient as high risk or low risk. Mark email as spam or ham. Keen on learning about Classification Algorithms in Machine Learning? Click here! Support Vector Machine (SVM) Let us understand Support Vector Machine (SVM) in detail below. SVMs are classification algorithms used to assign data to various classes. They involve detecting hyperplanes which segregate data into classes. SVMs are very versatile and are also capable of performing linear or nonlinear classification, regression, and outlier detection. Once ideal hyperplanes are discovered, new data points can be easily classified. https://www.simplilearn.com/ice9/free_resources_article_thumb/support-vector-machines-graph-machine-learning.JPG The optimization objective is to find “maximum margin hyperplane” that is farthest from the closest points in the two classes (these points are called support vectors). In the given figure, the middle line represents the hyperplane. SVM Example Let’s look at this image below and have an idea about SVM in general. Hyperplanes with larger margins have lower generalization error. The positive and negative hyperplanes are represented by: https://www.simplilearn.com/ice9/free_resources_article_thumb/positive-negative-hyperplanes-machine-learning.JPG Classification of any new input sample xtest : If w0 + wTxtest > 1, the sample xtest is said to be in the class toward the right of the positive hyperplane. If w0 + wTxtest < -1, the sample xtest is said to be in the class toward the left of the negative hyperplane. When you subtract the two equations, you get: https://www.simplilearn.com/ice9/free_resources_article_thumb/equation-subtraction-machine-learning.JPG Length of vector w is (L2 norm length): https://www.simplilearn.com/ice9/free_resources_article_thumb/length-of-vector-machine-learning.JPG You normalize with the length of w to arrive at: https://www.simplilearn.com/ice9/free_resources_article_thumb/normalize-equation-machine-learning.JPG SVM: Hard Margin Classification Given below are some points to understand Hard Margin Classification. The left side of equation SVM-1 given above can be interpreted as the distance between the positive (+ve) and negative (-ve) hyperplanes; in other words, it is the margin that can be maximized. Hence the objective of the function is to maximize with the constraint that the samples are classified correctly, which is represented as : https://www.simplilearn.com/ice9/free_resources_article_thumb/hard-margin-classification-machine-learning.JPG This means that you are minimizing ‖w‖. This also means that all positive samples are on one side of the positive hyperplane and all negative samples are on the other side of the negative hyperplane. This can be written concisely as : https://www.simplilearn.com/ice9/free_resources_article_thumb/hard-margin-classification-formula.JPG Minimizing ‖w‖ is the same as minimizing. This figure is better as it is differentiable even at w = 0. The approach listed above is called “hard margin linear SVM classifier.” SVM: Soft Margin Classification Given below are some points to understand Soft Margin Classification. To allow for linear constraints to be relaxed for nonlinearly separable data, a slack variable is introduced. (i) measures how much ith instance is allowed to violate the margin. The slack variable is simply added to the linear constraints. https://www.simplilearn.com/ice9/free_resources_article_thumb/soft-margin-calculation-machine-learning.JPG Subject to the above constraints, the new objective to be minimized becomes: https://www.simplilearn.com/ice9/free_resources_article_thumb/soft-margin-calculation-formula.JPG You have two conflicting objectives now—minimizing slack variable to reduce margin violations and minimizing to increase the margin. The hyperparameter C allows us to define this trade-off. Large values of C correspond to larger error penalties (so smaller margins), whereas smaller values of C allow for higher misclassification errors and larger margins. https://www.simplilearn.com/ice9/free_resources_article_thumb/machine-learning-certification-video-preview.jpg SVM: Regularization The concept of C is the reverse of regularization. Higher C means lower regularization, which increases bias and lowers the variance (causing overfitting). https://www.simplilearn.com/ice9/free_resources_article_thumb/concept-of-c-graph-machine-learning.JPG IRIS Data Set The Iris dataset contains measurements of 150 IRIS flowers from three different species: Setosa Versicolor Viriginica Each row represents one sample. Flower measurements in centimeters are stored as columns. These are called features. IRIS Data Set: SVM Let’s train an SVM model using sci-kit-learn for the Iris dataset: https://www.simplilearn.com/ice9/free_resources_article_thumb/svm-model-graph-machine-learning.JPG Nonlinear SVM Classification There are two ways to solve nonlinear SVMs: by adding polynomial features by adding similarity features Polynomial features can be added to datasets; in some cases, this can create a linearly separable dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/nonlinear-classification-svm-machine-learning.JPG In the figure on the left, there is only 1 feature x1. This dataset is not linearly separable. If you add x2 = (x1)2 (figure on the right), the data becomes linearly separable. Polynomial Kernel In sci-kit-learn, one can use a Pipeline class for creating polynomial features. Classification results for the Moons dataset are shown in the figure. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-machine-learning.JPG Polynomial Kernel with Kernel Trick Let us look at the image below and understand Kernel Trick in detail. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-with-kernel-trick.JPG For large dimensional datasets, adding too many polynomial features can slow down the model. You can apply a kernel trick with the effect of polynomial features without actually adding them. The code is shown (SVC class) below trains an SVM classifier using a 3rd-degree polynomial kernel but with a kernel trick. https://www.simplilearn.com/ice9/free_resources_article_thumb/polynomial-kernel-equation-machine-learning.JPG The hyperparameter coefθ controls the influence of high-degree polynomials. Kernel SVM Let us understand in detail about Kernel SVM. Kernel SVMs are used for classification of nonlinear data. In the chart, nonlinear data is projected into a higher dimensional space via a mapping function where it becomes linearly separable. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-machine-learning.JPG In the higher dimension, a linear separating hyperplane can be derived and used for classification. A reverse projection of the higher dimension back to original feature space takes it back to nonlinear shape. As mentioned previously, SVMs can be kernelized to solve nonlinear classification problems. You can create a sample dataset for XOR gate (nonlinear problem) from NumPy. 100 samples will be assigned the class sample 1, and 100 samples will be assigned the class label -1. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-graph-machine-learning.JPG As you can see, this data is not linearly separable. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-non-separable.JPG You now use the kernel trick to classify XOR dataset created earlier. https://www.simplilearn.com/ice9/free_resources_article_thumb/kernel-svm-xor-machine-learning.JPG Naïve Bayes Classifier What is Naive Bayes Classifier? Have you ever wondered how your mail provider implements spam filtering or how online news channels perform news text classification or even how companies perform sentiment analysis of their audience on social media? All of this and more are done through a machine learning algorithm called Naive Bayes Classifier. Naive Bayes Named after Thomas Bayes from the 1700s who first coined this in the Western literature. Naive Bayes classifier works on the principle of conditional probability as given by the Bayes theorem. Advantages of Naive Bayes Classifier Listed below are six benefits of Naive Bayes Classifier. Very simple and easy to implement Needs less training data Handles both continuous and discrete data Highly scalable with the number of predictors and data points As it is fast, it can be used in real-time predictions Not sensitive to irrelevant features Bayes Theorem We will understand Bayes Theorem in detail from the points mentioned below. According to the Bayes model, the conditional probability P(Y|X) can be calculated as: P(Y|X) = P(X|Y)P(Y) / P(X) This means you have to estimate a very large number of P(X|Y) probabilities for a relatively small vector space X. For example, for a Boolean Y and 30 possible Boolean attributes in the X vector, you will have to estimate 3 billion probabilities P(X|Y). To make it practical, a Naïve Bayes classifier is used, which assumes conditional independence of P(X) to each other, with a given value of Y. This reduces the number of probability estimates to 2*30=60 in the above example. Naïve Bayes Classifier for SMS Spam Detection Consider a labeled SMS database having 5574 messages. It has messages as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/naive-bayes-spam-machine-learning.JPG Each message is marked as spam or ham in the data set. Let’s train a model with Naïve Bayes algorithm to detect spam from ham. The message lengths and their frequency (in the training dataset) are as shown below: https://www.simplilearn.com/ice9/free_resources_article_thumb/naive-bayes-spam-spam-detection.JPG Analyze the logic you use to train an algorithm to detect spam: Split each message into individual words/tokens (bag of words). Lemmatize the data (each word takes its base form, like “walking” or “walked” is replaced with “walk”). Convert data to vectors using scikit-learn module CountVectorizer. Run TFIDF to remove common words like “is,” “are,” “and.” Now apply scikit-learn module for Naïve Bayes MultinomialNB to get the Spam Detector. This spam detector can then be used to classify a random new message as spam or ham. Next, the accuracy of the spam detector is checked using the Confusion Matrix. For the SMS spam example above, the confusion matrix is shown on the right. Accuracy Rate = Correct / Total = (4827 + 592)/5574 = 97.21% Error Rate = Wrong / Total = (155 + 0)/5574 = 2.78% https://www.simplilearn.com/ice9/free_resources_article_thumb/confusion-matrix-machine-learning.JPG Although confusion Matrix is useful, some more precise metrics are provided by Precision and Recall. https://www.simplilearn.com/ice9/free_resources_article_thumb/precision-recall-matrix-machine-learning.JPG Precision refers to the accuracy of positive predictions. https://www.simplilearn.com/ice9/free_resources_article_thumb/precision-formula-machine-learning.JPG Recall refers to the ratio of positive instances that are correctly detected by the classifier (also known as True positive rate or TPR). https://www.simplilearn.com/ice9/free_resources_article_thumb/recall-formula-machine-learning.JPG Precision/Recall Trade-off To detect age-appropriate videos for kids, you need high precision (low recall) to ensure that only safe videos make the cut (even though a few safe videos may be left out). The high recall is needed (low precision is acceptable) in-store surveillance to catch shoplifters; a few false alarms are acceptable, but all shoplifters must be caught. Learn about Naive Bayes in detail. Click here! Decision Tree Classifier Some aspects of the Decision Tree Classifier mentioned below are. Decision Trees (DT) can be used both for classification and regression. The advantage of decision trees is that they require very little data preparation. They do not require feature scaling or centering at all. They are also the fundamental components of Random Forests, one of the most powerful ML algorithms. Unlike Random Forests and Neural Networks (which do black-box modeling), Decision Trees are white box models, which means that inner workings of these models are clearly understood. In the case of classification, the data is segregated based on a series of questions. Any new data point is assigned to the selected leaf node. https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-classifier-machine-learning.JPG Start at the tree root and split the data on the feature using the decision algorithm, resulting in the largest information gain (IG). This splitting procedure is then repeated in an iterative process at each child node until the leaves are pure. This means that the samples at each node belonging to the same class. In practice, you can set a limit on the depth of the tree to prevent overfitting. The purity is compromised here as the final leaves may still have some impurity. The figure shows the classification of the Iris dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-classifier-graph.JPG IRIS Decision Tree Let’s build a Decision Tree using scikit-learn for the Iris flower dataset and also visualize it using export_graphviz API. https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-machine-learning.JPG The output of export_graphviz can be converted into png format: https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-output.JPG Sample attribute stands for the number of training instances the node applies to. Value attribute stands for the number of training instances of each class the node applies to. Gini impurity measures the node’s impurity. A node is “pure” (gini=0) if all training instances it applies to belong to the same class. https://www.simplilearn.com/ice9/free_resources_article_thumb/impurity-formula-machine-learning.JPG For example, for Versicolor (green color node), the Gini is 1-(0/54)2 -(49/54)2 -(5/54) 2 ≈ 0.168 https://www.simplilearn.com/ice9/free_resources_article_thumb/iris-decision-tree-sample.JPG Decision Boundaries Let us learn to create decision boundaries below. For the first node (depth 0), the solid line splits the data (Iris-Setosa on left). Gini is 0 for Setosa node, so no further split is possible. The second node (depth 1) splits the data into Versicolor and Virginica. If max_depth were set as 3, a third split would happen (vertical dotted line). https://www.simplilearn.com/ice9/free_resources_article_thumb/decision-tree-boundaries.JPG For a sample with petal length 5 cm and petal width 1.5 cm, the tree traverses to depth 2 left node, so the probability predictions for this sample are 0% for Iris-Setosa (0/54), 90.7% for Iris-Versicolor (49/54), and 9.3% for Iris-Virginica (5/54) CART Training Algorithm Scikit-learn uses Classification and Regression Trees (CART) algorithm to train Decision Trees. CART algorithm: Split the data into two subsets using a single feature k and threshold tk (example, petal length < “2.45 cm”). This is done recursively for each node. k and tk are chosen such that they produce the purest subsets (weighted by their size). The objective is to minimize the cost function as given below: https://www.simplilearn.com/ice9/free_resources_article_thumb/cart-training-algorithm-machine-learning.JPG The algorithm stops executing if one of the following situations occurs: max_depth is reached No further splits are found for each node Other hyperparameters may be used to stop the tree: min_samples_split min_samples_leaf min_weight_fraction_leaf max_leaf_nodes Gini Impurity or Entropy Entropy is one more measure of impurity and can be used in place of Gini. https://www.simplilearn.com/ice9/free_resources_article_thumb/gini-impurity-entrophy.JPG It is a degree of uncertainty, and Information Gain is the reduction that occurs in entropy as one traverses down the tree. Entropy is zero for a DT node when the node contains instances of only one class. Entropy for depth 2 left node in the example given above is: https://www.simplilearn.com/ice9/free_resources_article_thumb/entrophy-for-depth-2.JPG Gini and Entropy both lead to similar trees. DT: Regularization The following figure shows two decision trees on the moons dataset. https://www.simplilearn.com/ice9/free_resources_article_thumb/dt-regularization-machine-learning.JPG The decision tree on the right is restricted by min_samples_leaf = 4. The model on the left is overfitting, while the model on the right generalizes better. Random Forest Classifier Let us have an understanding of Random Forest Classifier below. A random forest can be considered an ensemble of decision trees (Ensemble learning). Random Forest algorithm: Draw a random bootstrap sample of size n (randomly choose n samples from the training set). Grow a decision tree from the bootstrap sample. At each node, randomly select d features. Split the node using the feature that provides the best split according to the objective function, for instance by maximizing the information gain. Repeat the steps 1 to 2 k times. (k is the number of trees you want to create, using a subset of samples) Aggregate the prediction by each tree for a new data point to assign the class label by majority vote (pick the group selected by the most number of trees and assign new data point to that group). Random Forests are opaque, which means it is difficult to visualize their inner workings. https://www.simplilearn.com/ice9/free_resources_article_thumb/random-forest-classifier-graph.JPG However, the advantages outweigh their limitations since you do not have to worry about hyperparameters except k, which stands for the number of decision trees to be created from a subset of samples. RF is quite robust to noise from the individual decision trees. Hence, you need not prune individual decision trees. The larger the number of decision trees, the more accurate the Random Forest prediction is. (This, however, comes with higher computation cost). Key Takeaways Let us quickly run through what we have learned so far in this Classification tutorial. Classification algorithms are supervised learning methods to split data into classes. They can work on Linear Data as well as Nonlinear Data. Logistic Regression can classify data based on weighted parameters and sigmoid conversion to calculate the probability of classes. K-nearest Neighbors (KNN) algorithm uses similar features to classify data. Support Vector Machines (SVMs) classify data by detecting the maximum margin hyperplane between data classes. Naïve Bayes, a simplified Bayes Model, can help classify data using conditional probability models. Decision Trees are powerful classifiers and use tree splitting logic until pure or somewhat pure leaf node classes are attained. Random Forests apply Ensemble Learning to Decision Trees for more accurate classification predictions. Conclusion This completes ‘Classification’ tutorial. In the next tutorial, we will learn 'Unsupervised Learning with Clustering.'
ml-jku / EVAOne Initialization to Rule them All: Fine-tuning via Explained Variance Adaptation
TanayGhanshyam / Crispy Octo GuideWe have come a long way since I was a child in the 1960s when all I wanted for Christmas was a slinky and some Rock’Em – Sock’Em Robots. Now imagine we have traveled ten years into the future, and it is Christmas 2031. Alexa has replaced kids’ parents and Santa Claus. Every toy is connected to the Internet and looks like a robot version of the animal it represents. Clean thermonuclear Christmas trees will be providing us with radiant, gamma-ray energy for all our holiday needs. Pogo sticks have also made a comeback, but they are solar-powered and can leap entire city blocks. And while I am busy pretending to be the Ghost of Christmas Future, I thought it would also be fun to ask the Office of the CTO team about their predictions for futuristic, technical toys. So, I posed these two questions: What cool TECHNICAL toy or gadget would you like Santa to bring you this year in 2021? As a participating member of the Office of the CTO, what cool TECHNICAL toy or gadget (that has not yet been invented) would you like Santa to bring you in 10 years from now in 2031? christmas wishlist for the octo team overlay You know what? We just might see I see a sneak preview of some of these magical tech toys of the future in just a few weeks at the CES 2022 conference. In the meantime, take a look at the wish list from all of our Extreme technical gurus: Marcus Burton – Wireless and Cloud Architect Christmas Wish 2021: Is a Tesla Cybertruck an option? I’ll even take a prototype. That will scratch several technology itches at the same time. Think about it…EV, autonomous driving, AI, 5G probably, cloud-connected, mobile-first, and all the best in materials sciences and mechanical engineering applied to trucks. What more could an outdoorsy tech guy want? Christmas Wish 2031: I’m kinda thinking that while everyone else has their brain slurped out in the metaverse (with VR!), I will prefer to go to the actual mountains. But you know, I have a wife and kids, so I have to think about safety. So here’s my wish: a smart personal device that has a full week of battery life (using ultra-thin silicon wafers) with rapid solar charging, LEO satellite connectivity (for sending “eat your heart out” 3D pics to my friends from the “there’s no 6G here” wilderness), and ultra-HD terrain feature maps for modern navigation. Carla Guzzetti – VP, Experience, Messaging & Enablement Christmas Wish 2021: I want this: Meeting Owl Pro – 360-Degree, 1080p HD Smart Video Conference Camera, Microphone, and Speaker Christmas Wish 2031: I want a gadget where we can have virtual meetings without the need for a wearable! Who wants to wear heavy goggles all day? Doug McDonald – Director of Product Management Christmas Wish 2021: As a technologist often looking for a balance between screen time and health and fitness I hope Santa brings me the Aura Strap. The Aura strap adds additional IoT sensory capabilities to compliment your Apple smartwatch. Bioelectrical impedance analysis is the cutting-edge science behind the AURA Strap. This innovation provides a way to truly see how your body changes over the course of a day. Their body composition analysis includes fat, muscle mass, minerals, and hydration; providing personalized insights that improve the results of your workouts, diet, and your lifestyle as a whole. Christmas Wish 2031: Hopefully, this innovation will be here sooner. Still, in the spirit of my first wish from Santa, I also hope to have a service engine warning light for me. The concept is utilizing advancements in biomedical sensory devices to pinpoint potential changes in your physical metrics that may help in seeking medical attention sooner than later if variances in health data occur. I spoke about this concept in the Digital Diagnosis episode of the Inflection Points podcast from the Office of the CTO. Ed Koehler – Principal Engineer Christmas Wish 2021: My answers are short and sweet. I want a nice drone with high-resolution pan, tilt, and zoom (PTZ) cameras. Christmas Wish 2031: In ten years, I want a drone that I can sit inside and fly away! Puneet Sehgal – Business Initiatives Program Manager Christmas Wish 2021: I have always wanted to enjoy the world from a bird’s eye view. Therefore, my wish is for Santa to bring me a good-quality drone camera this year. It is amazing how quickly drones have evolved from commercial /military use to becoming a personal gadget. Christmas Wish 2031: In 2031, I wish Santa could get me a virtual reality (VR) trainer to help me internalize physical motion by looking at a simulation video while sending an electrical impulse to mimic it. It will open endless possibilities, and I could become an ice skater, a karate expert, or a pianist – all in one. Maybe similar research is already being done, but we are far away from something like this maturing for practical use. So, who knows – it’s Santa after all and we are talking 2031! Tim Harrison – Director of Product Marketing, Service Provider Christmas Wish 2021: This year, I would love to extend my audio recording setup and move from a digital 24 channel mixer to a control surface that integrates with my DAW (digital audio workstation) and allows me to use my outboard microphone pre-amps. I’ve been looking at an ICON QCon Pro G2 plus one QCon EX G2 extender to give me direct control over 16 channels at once (I use 16 channels just for my drum kit). Christmas Wish 2031: Ten years from now, I sincerely hope to receive an anti-gravity platform. First, I’ll be old, and climbing stairs will have become more challenging for these creaky old bones. Secondly, who hasn’t hoped for a REAL hoverboard? Once we know what gravity is “made of,” we can start making it easier to manipulate objects on earth and make space more habitable for human physiology. Either that or a puppy. Puppy sitting Divya Balu Pazhayannur – Director of Business Initiatives Christmas Wish 2021: I’m upgrading parts of my house over the holidays and browsing online for kitchen and laundry appliances. If you had told me that I would be spending three hours reading blogs on choosing the right cooktop for me, I would not have believed you. Does it have the right power, is it reliable, is it Wi-Fi enabled, can you talk to it – I’m kidding on that last one. Having said that, I’d love to get the Bosch Benchmark Gas Stovetop. Although I can’t speak to my appliance, its minimalist look has me writing it down on my wish list for Santa. I’ll even offer him some crispy dosas in exchange. Christmas Wish 2031: Apart from flying cars and personal robot assistants, I’d love to get the gift of better connectivity. I miss my family and friends in India, and it would be amazing to engage with them through holographic technology. I imagine it would allow for a much higher level of communication than today’s ‘talking head’ approach. Although do I want my family sitting with me in my living room? Still – I’d like to think a holograph would be just fantastic. Yury Ostrovsky – Sr. Technology Manager Christmas Wish 2021: I believe 2022 will be the year of VR toys. Virtual Reality is already popular, but I believe more applications will be developed in this area. We might see radio waves coming from different sources (Wi-Fi, LTE, 5G, BT, etc.) and visualize propagation in real-time. Christmas Wish 2031: “Prediction is very difficult, especially if it’s about the future” – Niels Bohr Kurt Semba – Principal Architect Christmas Wish 2021: The Crown from Neurosity. It helps you get and stay in a deep focus to improve your work and gaming results. Christmas Wish 2031: A non-evasive health device that can quickly look deep into your body and cells and explain why you are not feeling well today. Jon Filson – Senior Producer, Content Christmas Wish 2021: I want a large rollable TV by LG. In part because I watch a lot of football. And while I have a Smart TV, I still can’t get it to connect to my Bluetooth speaker … so while I love it, I want it to work better, and isn’t that so often the way with tech? But more than that, I don’t like and have never liked that rooms have to be designed around TVs. They are big, which is fine, but they are often in the way, which is less so. They should disappear when not in use. It’s $100,000 so I don’t expect it any time soon. But it’s an idea whose time has come. Christmas Wish 2031: I cheated on this one and asked my 12-year-old son Jack what he would want. It’s the portal gun, from Rick and Morty, a show in which a crazed scientist named Rick takes his grandson Morty on wacky adventures in a multi-verse. That last part is important to me. Kids today are already well into multi-verses, while we adults are just struggling to make one decent Metaverse. The next generation is already way ahead of us digitally speaking, it’s clear. Alexey Reznik – Senior UX Designer Christmas Wish 2021: This awesome toy: DJI Mavic 2 Pro – Drone Quadcopter UAV with Hasselblad Camera 3-Axis Gimbal HDR 4K Video Adjustable Aperture 20MP 1″ CMOS Sensor, up to 48mph, Gray Christmas Wish 2031: Something along these lines: BMW Motorrad VISION NEXT 100 BMW Motorcycle Michael Rash – Distinguished Engineer – Security Christmas Wish 2021: Satechi USB-C Multiport MX Adapter – Dual 4K HDMI. Christmas Wish 2031: A virtual reality headset that actually works. Alena Amir – Senior Content and Communications Manager Christmas Wish 2021: With conversations around VR/AR and the metaverse taking the world by storm, Santa could help out with an Oculus Quest. Purely for research purposes of course! Christmas Wish 2031: The 1985 movie, Back to the Future, was a family favorite and sure we didn’t get it all exactly right by 2015 but hey, it’s almost 2022! About time we get those hoverboards! David Coleman – Director of Wireless Christmas Wish 2021: Well, it looks like drones are the #1 wish item for 2021, and I am no exception. My wife and I just bought a home in the mountains of Blue Ridge, Georgia, where there is an abundance of wildlife. I want a state-of-the-art drone for bear surveillance. Christmas Wish 2031: In ten years, I will be 71 years old, and I hope to be at least semi-retired and savoring the fruits of my long tech career. Even though we are looking to the future, I want a time machine to revisit the past. I would travel back to July 16th, 1969, and watch Apollo 11 liftoff from Cape Kennedy to the moon. I actually did that as a nine-year-old kid. Oh, and I would also travel back to 1966 and play with my Rock’Em – Sock’Em Robots. Rock'em Sock'em Robots To summarize, our peeps in the Office of the CTO all envision Christmas 2031, where the way we interact as a society will have progressed. In 2021, we already have unlimited access to information, so future tech toys might depend less on magical new technologies and more on the kinds of experiences these new technologies can create. And when those experiences can be shared across the globe in real-time, the world gains an opportunity to learn from each other and grow together in ways that would never have been possible.
tommasocerruti / DetllmDeterministic-mode checks for LLM inference: measure run/batch variance, generate repro packs, and explain why outputs differ.
jddeguia / Compare Forecast ModelsEnergy production of photovoltaic (PV) system is heavily influenced by solar irradiance. Accurate prediction of solar irradiance leads to optimal dispatching of available energy resources and anticipating end-user demand. However, it is difficult to do due to fluctuating nature of weather patterns. In the study, neural network models were defined to predict solar irradiance values based on weather patterns. Models included in the study are artificial neural network, convolutional neural network, bidirectional long-short term memory (LSTM) and stacked LSTM. Preprocessing methods such as data normalization and principal component analysis were applied before model training. Regression metrics such as mean squared error (MSE), maximum residual error (max error), mean absolute error (MAE), explained variance score (EVS), and regression score function (R2 score), were used to evaluate the performance of model prediction. Plots such as prediction curves, learning curves, and histogram of error distribution were also considered as well for further analysis of model performance. All models showed that it is capable of learning unforeseen values, however, stacked LSTM has the best results with the max error, R2, MAE, MSE, and EVS values of 651.536, 0.953, 41.738, 5124.686, and 0.946, respectively.
Aayushi-2808 / Cervical Cancer Detection Using ML# Cervical_cancer_detection_using_ML # Introduction According to World Health Organisation (WHO), when detected at an early stage, cervical cancer is one of the most curable cancers. Hence, the main motive behind this project is to detect the cancer in its early stages so that it can be treated and managed in the patients effectively. # Flow of project is as explained below: This project is divided into 5 parts: 1. Data Cleaning 2. Exploratory Data Analysis 3. Baseline model: Logistic Regression 4. Ensemble Models: Bagging with Decision Trees, Random forest and Boosting 5. Model Comparison and results # Refer below for References: Link to basic information regarding cervical cancer : https://www.cdc.gov/cancer/cervical/basic_info/index.htm The dataset for tackling the problem is supplied by the UCI repository for Machine Learning. Link to Dataset : https://archive.ics.uci.edu/ml/datasets/Cervical+cancer+%28Risk+Factors%29 The dataset contains a list of risk factors that lead up to the Biopsy examination. The generation of the predictor variable is taken care of in part 2 (Exploratory data analysis) of this report. We will try to predict the 'biopsy' variable from the dataset using Logistic Regression, Random Forest, Bagging with Decision Trees and Boosting with XGBoost Classifier. # Results: Based on our Base model and The Ensemble Models we used, we observed - 1. After the entire process of training, hyperparameter tuning and tackling class imbalance was complete , we obtained the results as depicted through the graphics. 2. We observe that Bagging and Random Forest gives the highest accuracy and precision of 97.09 and 80% resp. 3. Plotting the Confusion matrix showed us that Random Forest using upsampling and class weights gives us 2 false positives and 3 false negatives with auc of 0.87 # Why random forest is the best model?? 1. So as we see, while comparing all of our models,RF has maximum f1_score and accuracy along with Bagging i.e. 76.2 n 97.09% resp. 2. And it also produces the same amount of false negatives with a recall of 72.73% just like all the other models. 3. But we still consider RF better coz of its added advantage that, the decision trees are decorrelated as compared to bagging leading to lesser variance and greater ability to generalize. # Conclusion: On observing the feature importance of the best model i.e random forest, we can see that the most important features are Schiller, Hinselmann, HPV, Citology, etc. This also makes sense because Schiller and Hinselmann are actually the tests used to detect cervical cancer. # Problems Faced: A major problem encountered while training the model was that it had too little data to train. On collaborating with all the hospitals in India, we can have enough data points to train a model with a higher recall, thus making the model better. # Scope of Improvement As next steps I would want to do exactly that, to deploy the model and refine it. We may also modify the number of the predictor variables, as it may well turn out that there are other predictors which may not be present in our current dataset. This can only be found by practical implementation of our predictions.
Mamtapriya / Linear Regression Of Data Driven BatteryMachine-learning approach In this work, author has developed data-driven models that accurately predict the cycle life of commercial lithium iron phosphate (LFP)/ graphite cells using early-cycle data, with no prior knowledge of degradation mechanisms. To build an early-prediction model, a feature-based approach is used. Features, such as initial discharge capacity, charge time, and cell can temperature, are generated and used in a regularized linear framework and proposed from domain knowledge of lithium-ion batteries. Several features are calculated based on the discharge voltage curve to capture the electrochemical evolution of individual cells during cycling. For the Q(V), the discharge voltage curves of each cell, summary statistics such as minimum, mean, and variance are determined. The change in voltage curves between two cycles is captured by each summary statistic. Three alternative models have been studied due to the great predictive potential of features based on Q100-10(V). (1) variance of ΔQ100-10(V), (2) additional candidate features obtained during discharge and (3) features from additional data streams such as temperature and internal resistance. Data is collected from the first 100 cycles in every case. These three models are proposed to examine the cost–benefit of collecting more data streams as well as the accuracy limits of prediction. The training data (41 cells) are used to choose model features and coefficient values, while the primary testing data (43 cells) are used to evaluate model performance. The model is then tested using a secondary testing dataset (40 cells) that has been generated after the development of the model. The prediction performance is measured using two metrics: root-mean-square error (RMSE), which is measured in cycles, and average percentage error, which is explained in the ‘Machine-Learning model creation’ selection. In short, the data is first separated into training and test sets. The elastic net is then used to train the model on the training set, resulting in a linear model with downselected features and coefficients. The model is then applied to both the primary and secondary test sets. The elastic net prediction and data processing are done in MATLAB, while the classification is done in Python with the NumPy, pandas, and sklearn tools.
adityadj98 / Computational Methods In Pricing And Model Calibration Columbia UniversityThis course focuses on computational methods in option and interest rate, product’s pricing and model calibration. The first module will introduce different types of options in the market, followed by an in-depth discussion into numerical techniques helpful in pricing them, e.g. Fourier Transform (FT) and Fast Fourier Transform (FFT) methods. We will explain models like Black-Merton-Scholes (BMS), Heston, Variance Gamma (VG), which are central to understanding stock price evolution, through case studies and Python codes. The second module introduces concepts like bid-ask prices, implied volatility, and option surfaces, followed by a demonstration of model calibration for fitting market option prices using optimization routines like brute-force search, Nelder-Mead algorithm, and BFGS algorithm. The third module introduces interest rates and the financial products built around these instruments. We will bring in fundamental concepts like forward rates, spot rates, swap rates, and the term structure of interest rates, extending it further for creating, calibrating, and analyzing LIBOR and swap curves. We will also demonstrate the pricing of bonds, swaps, and other interest rate products through Python codes. The final module focuses on real-world model calibration techniques used by practitioners to estimate interest rate processes and derive prices of different financial products. We will illustrate several regression techniques used for interest rate model calibration and end the module by covering the Vasicek and CIR model for pricing fixed income instruments.
agconti / BlueBookThis IPython Notebook contains a quantitative pricing model created for Fast Iron in the Kaggle competition 'Blue Book for Bulldozers'. The model predicts the sale price of a particular piece of heavy equipment so that Fast Iron can create a 'Blue Book' to enable customers to valuate their heavy equipment fleet at auction. Here python is used as a medium to apply supervised and unsupervised machine learning techniques to explain 88.90% of the variance observed in the training set and score an RMSLE of 0.745 when predicting values on the test set. In this competition 590 data scientists created predictive models based on a 'training dataset', provided by Fast Iron, and then used those models to predict sale prices on a 'test set' to compete for a $10,000 dollar award for the team or individual with the most accurate model. The model and methods used for my entry, which scored in the upper 20%, is shown in BlueBook.ipynb.
areyesan / ML WNIDSSince the beginning of the pandemic, the internet traffic has been considerably increased. Daily tasks such as working meetings or classes lectures were moved to remote modal- ity, and this transition involved the adoption of digital plat- form for different kind of transaction, in which, for most of the cases, personal/sensitive information is being requesting and/or sharing. Wireless network connection is turning in the most popular internet access connectivity protocol, and as the traffic also increased the number of security flaws are being revealed by intruders, making this protocol vulnera- ble. That is one of the reasons why it is important to im- plement systems capable to automate the detection of vul- nerabilities accurately in a network. Therefore, in this work, we propose a Machine Learning (ML) approach for the de- velopment of a Intrusion Detection System(IDS) for wireless networks that have be both characteristics: accurate and ex- plainable. To achieve those characteristics, we implemented a variety of feature selection methods, including feature im- portance, chi-square analysis, variance correlation analysis and explainable artificial intelligence. Our ML based IDS achieves an accuracy of 99.81% for multi-class classification with a reduced set of features. An description of the feature selection output is provided for better explanation of the pre- dicted outputs.
houssem71 / Forecasting Next Day S Returns In Stock Market The aim of this project is to forecast the next day's returns of a tunisian company using daily stock data from Tunisia Stock Exchange market . At the beginning, we performed ordinary tasks such as preprocessing and wrangling where we found these two major points: 1-we can create two new attributes capable of reducing the dimensionality of market data. 2-the data is a time series indexed by the dates of each trading operation, to eliminate the time dependency, we have introduced a new variable which is the 'current profit' which is shifted by a period of the next day return . 3- thanks to the calculation of the kurtosis and skewness coefficients, we found that we do not need to make distribution transformations. Then , we did a dimensionality reduction thanks to the PCA method , which forms the cornerstone of this project . This technique needs to determine the value of its hyperparameter which is the number of principal components that will allow the explanation of the maximum variance of all the variables. To do this, we have recourse to the analysis by factor and precisely the eigenvalues criterion . This criterion allows each time the code is run to determine the optimal number of factors (those with eigenvalues >1) and finally we arrived at a number equal to 6 factors and which explain 95.5% of the variance. Finally, we predicted the value of 'next day return' thanks to a linear regression model, it is true that it is quite basic but the goal was to master the technique of PCA and FA. we can improve the result in future projects by applying, for example, another model such as XGBoost .
cryaa / KPCA In High Frequency Trading• Partition trading time series data into 30 minutes intervals by picking the mean transaction price and volumes in each interval and compute the log-return (aka ’U sequence’) and write it into a corresponding csv file: JNJ_1004_1015_2010_HFT_30min_.csv • Visualize the high frequency data with PCA by using 2 or 3 PCs: you need to calculate the variance explained ratios for your visualization. • Identify outliers in your PCA analysis • Visualize it by using KPCA and compare its results with those of PCA (you need to at least try two kernels)