Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "function"


The Go Compiler Needs to Be Smarter

  • Whether you use Rust, Swift, C, C++… you expect a good optimizing compiler to basically inline the call to the ‘sum’ function and then to figure out that the answer can be determined at compile time and to optimize the ‘fun’ function to something trivial.
  • That is, you have compile-time constants but if you have a variable that is set once in the life of your program, and never change, Go will still treat it as if it could change.
  • This could be done at compile-time but then your binary would crash or worse when run on a processor that does not support popcnt.
  • In a language with just-in-time compilation like Java or C#, the processor is detected at compile-time so no check is needed.
  • In less fanciful languages like C or C++, the programmer needs to check what the processor supports themselves.

save | comments | report | share on


What does the keyword “yield” do in Python?

  • As the programming language Python develops over time, added functionality improves both its usability and performance.
  • Python has become (if not) the foremost language in the Data Science and its handling of big data sets is amongst one of the reasons why.
  • Large data-sets are inherent to the problem in fields like Bioinformatics, Finance and broadly Machine Learning, so efficient and effective Memory Handling is required as a standard.
  • Given the advent of Big Data, large data sets are incredibly prevalent these days so memory-efficient coding is a must for Data Scientists and Machine Learning practitioners alike.
  • The article above highlights key benefits to using Generators and an example is shown in which a Generator is clearly favoured to not using one as its shown to greatly enhance memory handling when faced with large data sets.

save | comments | report | share on


What does the keyword “yield” do in Python?

  • As the programming language Python develops over time, added functionality improves both its usability and performance.
  • Python has become (if not) the foremost language in the Data Science and its handling of big data sets is amongst one of the reasons why.
  • Large data-sets are inherent to the problem in fields like Bioinformatics, Finance and broadly Machine Learning, so efficient and effective Memory Handling is required as a standard.
  • Given the advent of Big Data, large data sets are incredibly prevalent these days so memory-efficient coding is a must for Data Scientists and Machine Learning practitioners alike.
  • The article above highlights key benefits to using Generators and an example is shown in which a Generator is clearly favoured to not using one as its shown to greatly enhance memory handling when faced with large data sets.

save | comments | report | share on


Logistic Regression from Scratch

  • To test our model we will use “Breast Cancer Wisconsin Dataset” from the sklearn package and predict if the lump is benign or malignant with over 95% accuracy.
  • The sigmoid function g(z) takes features and weights z as an input and returns a result between 0 and 1.
  • We will use this function in our model to calculate loss and also in the Gradient Descent part of the model training.
  • We use the chain rule when we need to find a derivative of a function that contains another function and so on.
  • In our case, we have a loss function that contains a sigmoid function that contains features and weights.
  • The last function in the chain rule is what contains in z — our features and weights.
  • After a train-test split model predicted malignant and benign lumps with 97% and 95% accuracy, which is a decent result.

save | comments | report | share on


Logistic Regression from Scratch

  • To test our model we will use “Breast Cancer Wisconsin Dataset” from the sklearn package and predict if the lump is benign or malignant with over 95% accuracy.
  • The sigmoid function g(z) takes features and weights z as an input and returns a result between 0 and 1.
  • We will use this function in our model to calculate loss and also in the Gradient Descent part of the model training.
  • We use the chain rule when we need to find a derivative of a function that contains another function and so on.
  • In our case, we have a loss function that contains a sigmoid function that contains features and weights.
  • The last function in the chain rule is what contains in z — our features and weights.
  • After a train-test split model predicted malignant and benign lumps with 97% and 95% accuracy, which is a decent result.

save | comments | report | share on


Logistic Regression from Scratch

  • To test our model we will use “Breast Cancer Wisconsin Dataset” from the sklearn package and predict if the lump is benign or malignant with over 95% accuracy.
  • The sigmoid function g(z) takes features and weights z as an input and returns a result between 0 and 1.
  • We will use this function in our model to calculate loss and also in the Gradient Descent part of the model training.
  • We use the chain rule when we need to find a derivative of a function that contains another function and so on.
  • In our case, we have a loss function that contains a sigmoid function that contains features and weights.
  • The last function in the chain rule is what contains in z — our features and weights.
  • After a train-test split model predicted malignant and benign lumps with 97% and 95% accuracy, which is a decent result.

save | comments | report | share on


The Essential dplyr

  • In this article, we’ll look at some of the most time-saving dplyr functions and learn how to use them to look at and manipulate datasets.
  • We’re going to look at the functions in the dplyr package by performing some preliminary data manipulation on an air quality dataset for Mexico City.
  • Let’s use it to compare the mean contaminant concentrations for the first four months in 2020 with the same months in previous years.
  • To do this, we’ll use filter to get the parameter and months we want, and then we’ll arrange the results by the month and then the mean.
  • Let’s use one of the join dplyr functions to add this information to our main dataset.
  • Play around with the dataset we’ve looked at today or use one of the datasets that comes with dplyr to get comfortable with these functions.

save | comments | report | share on


The Next-Gen Xbox Store Has Leaked - And Xbox Owners Will Love It

  • Ahead of official news from Microsoft, what appears to be a next-gen revamp of the Xbox Store for consoles has leaked online.
  • Following the leak, multiple outlets were given a hands-on test of the new Xbox Store layout, confirming the leak’s authenticity.
  • The pre-release build is relatively limited and has background glitches and content dead ends, but it gives a general sense of where Microsoft is heading the Xbox Store update.
  • From what we’ve seen, Microsoft is trying to strike a happy medium between the overbearing functionality of existing iterations and a more intuitive browsing experience defined by sleek graphics, animations, and a more defined visual identity with a bolder font and visuals.
  • We could be looking at the visual identity set to define Microsoft’s push into the next-gen.
  • There’s a suggestion that Microsoft could push out the updated app to the Xbox Insider Program sooner rather than later.

save | comments | report | share on


iMessage for Windows: A labor of love that will never see light of day (2018)

  • For someone that had never developed a modern iOS/macOS application (despite having more than a decade of experience with C and C++), there were a lot of false starts trying to figure out just where this well-hidden functionality that would allow one to achieve the holy grail of iMessage: the ability to send an arbitrary message to any number of recipients on or off of the iMessage network – previously contacted or otherwise – with that elusive blue bubble.
  • I found out that internally macOS determines which network to send a message on via the sms:// or imessage:// destination prefix (bizarrely, even when specifying onService:@"iMessage" in specific API calls), but try as I might, I couldn’t figure out a way to determine a priori if a given phone number was on the iMessage network or not – at least, not with the APIs that I’d discovered by dumping MessagesKit and other private frameworks.

save | comments | report | share on


Stranger Things, JavaScript Edition

  • We will look at some code snippets with surprising results, and we will do an explanation of what is going on, so that we can better understand our beloved programming language.
  • So that now explains the values we saw initially, the parseInt function result is being altered by the redix parameter which determines the base for the conversion.
  • For that the original expression changed a bit, let’s look at it ([![]] + [][[]]) which evaluates to the string falseundefined.
  • So basically we force an undefined value and concatenate it to the false string we know how to get, and the rest is history.
  • JavaScript is an amazing language, full of tricks and weirdness, and I hope this article brings you some clarity into some of these interesting topics and that next time you encounter something like this, you know what exactly what is happening.

save | comments | report | share on