Function Decorators in Python

Next, let’s look at an example of decorating a function. Assume we have a simple function that returns a sum of two integers: def sum_up(n, m):return n + m Then we can run it like so: print(sum_up(3, 7)) Output: 10 Now, assume we want to log what is happening in this part of our codebase … Read more

Cloud Native Data Pipelines using ArgoWorkflow

Leveraging containers and Kubernetes to scale your data engineering pipelines Whether you are a data engineer, platform engineer, data scientist, or ML engineer, when working with data, we all are faced with the challenge of creating pipelines. Despite the eclectic disparities between our data processing goals, one aspect remains constant “we need the ability to … Read more

tsbox 0.3.1: extended functionality

[This article was first published on cynkra, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. The tsbox package provides a set of tools that are agnostic towards existing … Read more

Categories R Tags ExcerptFavorite

How To Iterate Over Keys and Values in Python Dictionaries

Iterating over both keys and values Now in case you need to iterate over both keys and values in one go, you can call items(). The method will return a tuple containing the key value pairs in the form (key, value). for key, value in my_dict.items():print(f’Key: {key}, Value: {value}’)# OutputKey: a, Value: 1Key: b, Value: … Read more

Automating Machine Learning Using FLAML

Using FLAML for Automating Machine Learning Process Photo by Pietro Jeng on Unsplash Machine Learning is a process where we try to solve real-life business problems using a different set of algorithms. Creating a Machine Learning model is easy but selecting which model performs the best for our data in terms of generalization and performance … Read more

Common mistakes we Data Scientists make

DISCLAIMER I am a data scientist and have made all these mistakes, but I have had the privilege of sitting on the managerial, project lead and developer side of the fence, and here are some tips to getting your stakeholders (i.e. anyone involved in the project team or has an interest in the success of … Read more

Categories R Tags ExcerptFavorite

Fast and {furrr}-ious: real time economic monitoring using R

Mango’s ‘Meet-Up’ at Big Data London on 22nd September features guest speaker Adam Hughes, Data Scientist for The Bank of England, whose remit involves working with incredibly rich datasets, feeding into strategic decision-making on monetary policy. You can read about Adam’s incredibly interesting data remit and his team’s journey through Covid-19, in this short Q&A. Can … Read more

Categories R Tags ExcerptFavorite

Functions That Generate a Multi-index in Pandas and How to Remove the Levels

Introduction In this article, we will look at what a multiindex is, where and when to use it, functions that generate a multiindex, and how to collapse it into a single index. But first, let’s get some basic definitions out of the way. An index is a column in a DataFrame that ‘uniquely’ identifies each … Read more

Applications are open: 2022 summer school on stats methods for ling and psych

[This article was first published on Shravan Vasishth’s Slog (Statistics blog), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. ShareTweet  Applications are now open for the sixth SMLP … Read more

Categories R Tags ExcerptFavorite

{emayili} Rendering R Markdown

[This article was first published on R – datawookie, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. In a previous post I documented a new feature in {emayili}, … Read more

Categories R Tags ExcerptFavorite

Beautiful Maps with MazamaSpatialPlots

Many of us have become addicted to The NY Times COVID maps — maps of US state or county level data colored by cases, vaccinations, per capita infections, etc. While recreating maps like these in R is possible, it is disappointingly difficult. The just released MazamaSpatialPlots R package takes a first stab at remedying this … Read more

Categories R Tags ExcerptFavorite

Will You Switch From PyCharm to DataSpell — the Latest Data Science IDE from JetBrains?

Review of the key features for the DataSpell IDE Photo by Nick Fewings on Unsplash Among the common Python IDEs, PyCharm is my favorite for several reasons, just to name a few: 1). PyCharm gives me a more coherent user experience because I used to use AndroidStudio a lot; 2). Great auto-completion intelligence for high … Read more

Creating Successful R User Groups in Abuja, Nigeria

[This article was first published on R Consortium, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Bilikisu Aderinto, Founder/Organizer of the Abuja R User Group and R-Ladies Abuja, … Read more

Categories R Tags ExcerptFavorite

RTutor: Insurance and the Church

Finally an RTutor problem set about insurance! It is about time given that Ulm University is ranked worldwide as the 2nd best non-business school for research in Risk, Management and Insurance and Actuarial Sciences: Source: The UNL Global Research Rankings of Actuarial Science and Risk Management & Insurance I know that is some blatant advertisement … Read more

Categories R Tags ExcerptFavorite

What Is The Difference Between predict() and predict_proba() in scikit-learn?

The predict_proba() method In the context of classification tasks, some sklearn estimators also implement the predict_proba method that returns the class probabilities for each data point. The method accepts a single argument that corresponds to the data over which the probabilities will be computed and returns an array of lists containing the class probabilities for … Read more

How to Identify Outliers-Grubbs’ Test in R

[This article was first published on Methods – finnstats, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. How to Identify Outliers, The Grubbs’ Technique is a statistical test … Read more

Categories R Tags ExcerptFavorite

The Advantages of Code-First Data Science

[This article was first published on RStudio Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. RStudio has worked with hundreds of different data science teams, and we’ve … Read more

Categories R Tags ExcerptFavorite

Does 100 m equal 1 km ?

[This article was first published on r.iresmi.net, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Climbing or not climbing ? Photo : Alexis Martín In trail running or … Read more

Categories R Tags ExcerptFavorite

The Statsomat Apps with R and Python

[This article was first published on R-posts.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. The Statsomat project and site (https://statsomat.com) was launched at the beginning of 2021 … Read more

Categories R Tags ExcerptFavorite

LA R Expands Beyond California

[This article was first published on R Consortium, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. R Consortium talks to LA R Users founder Szilard Pafka about how … Read more

Categories R Tags ExcerptFavorite

How to create fast and accurate scatter plots with lots of data in python

datashaderis a great library to visualize larger datasets. The main improvement comes from the rasterization process: matplotlib will create a circle for every data point and then, when you’re displaying your data, it will have to figure out which pixels on your canvas each point occupies. Typically, each point will occupy multiple pixels. Instead, datashader … Read more

The fastest way to fetch BigQuery tables

As a Data Engineer, I wanted to fetch as quickly as possible tables from BigQuery. I also needed to fetch these tables as pandas DataFrames. So I considered a lot of alternatives, I have tested and benchmarked many implementations using multiple frameworks, and I will show you in this article a tool I have built … Read more

Learning Path: Introduction to R

[This article was first published on Mirai Solutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Enhance your data science toolkit with our “Introduction to R” learning path: … Read more

Categories R Tags ExcerptFavorite

Combining Python and R for FIFA Football World Ranking Analysis

(i) Relationship between FIFA rankings and monetary values of national teams (Linear Regression in Python) We wanted to determine how a national team’s FIFA points are affected by the average monetary value of the players in the squad. The data for the squad lineups (based on recent tournaments like UEFA Euro 2020, Copa America 2021, … Read more

RObservations #12: Making a Candlestick plot with the ggplot2 and tidyquant packages

[This article was first published on r – bensstats, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Candlestick plots are something you see regularly when dealing with stocks. … Read more

Categories R Tags ExcerptFavorite

Register now! PSI Scientific Meeting: Generating Insights through Modern Applications of Data Visualisation

[This article was first published on R Consortium, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. ShareTweet Upcoming event: PSI Scientific Meeting: Generating Insights through Modern Applications of Data … Read more

Categories R Tags ExcerptFavorite

Finding the Eras of MTV’s The Challenge Through Clustering

[This article was first published on R | JLaw’s R Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Since 1998, MTV’s The Challenge (formerly the Real World/Road … Read more

Categories R Tags ExcerptFavorite

Netting income

[This article was first published on R on OSM, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. For fundamental equity investors, the financial statement is the launchpad for … Read more

Categories R Tags ExcerptFavorite

Animating Network Evolutions with gganimate

[This article was first published on schochastics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. People regularly ask me if it is possible to animate a network evolution … Read more

Categories R Tags ExcerptFavorite

Empowering Docker using Tkinter GUI

Afterwards, a Dockerfile should be created and contain the following code. In this Dockerfile, we set the base of the Docker image to a slim version of Python 3.8.12. Afterwards, we update the package information and install Tkinter. The last two lines run the command /app/tkinter_app.py with Python. Code to create a Dockerfile. Build Docker … Read more

Percent Change of Bond Price using Duration and Convexity in R

#========================================================# # Quantitative ALM, Financial Econometrics & Derivatives  # ML/DL using R, Python, Tensorflow by Sang-Heon Lee  # # https://kiandlee.blogspot.com #——————————————————–# # Bond Modified Duration Calculation #========================================================# graphics.off()  # clear all graphs rm(list = ls()) # remove all files from your workspace library(derivmkts) # price, yield, duration, convexity #——————————————————- # Input #——————————————————- C   – 0.05       # coupon rate y   – 0.03       # YTM m   – 5          # maturity freq   – 1       # payment frequency PA  – 1          # principal amount cpn – C*PA       # annual coupon amount # P0 : initial price(P0),  # D and C : duration and convexity     P0 – bondpv(cpn, m, y, PA, freq)     D  – duration(P0, cpn, m, PA, freq, modified = TRUE)     C  – convexity(P0, cpn, m, PA, freq)          cat(paste0(         “P0        = “, P0, “\n”,          “Duration  = “, D,  “\n”,         “Convexity = “, C,  “\n”)) # % price change using # 1) full calculation  # 2) approximation with D  # 3) approximation with D and C          Pd – bondpv(cpn, m, y+0.0001, PA, freq)     per_ch_P_full   – (Pd – P0)/P0      per_ch_P_app_D  – –D*0.0001     per_ch_P_app_DC – –D*0.0001 + 0.5*C*(0.0001)^2          cat(paste0(         “% bond price change \n”,          “full                        = “,          round(per_ch_P_full*100,8), “%\n”,          “with duration               = “,          round(per_ch_P_app_D*100,8), “%\n”,         “with duration and convexity = “,          round(per_ch_P_app_DC*100,8), “%\n”))      Favorite

Categories R Tags ExcerptFavorite

Gold-Mining Week 2 (2021)

[This article was first published on R – Fantasy Football Analytics, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Favorite

Categories R Tags ExcerptFavorite

Ogive curve in R

[This article was first published on Methods – finnstats, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Ogive curve in R, It is a graph plotted for the … Read more

Categories R Tags ExcerptFavorite

5 Advanced Tips on Python Sequences

Notes from Fluent Python by Luciano Ramalho. Photo by David Clode on Unsplash “66% of data scientists are applying Python daily.” — src If you’re in that 66%, this post is for you. We’re going to cover the major takeaways from chapter 2 of Fluent Python by Luciano Ramalho, which covers sequences e.g. lists, tuples, … Read more

Mastering Outlier Detection in Python

Outlier detection, also known as anomaly detection, is a common task for many data science teams. It is the process of identifying data points that have extreme values compared to the rest of the distribution. Outlier detection has a wide range of applications including data quality monitoring, identifying price arbitrage in finance, detecting cybersecurity attacks, … Read more

Nonlinear Market Forecasting using ‘Stealth Curves’

[This article was first published on R-posts.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. In 2001, I was fortunate to discover a ‘market characteristic’ that transcends virtually … Read more

Categories R Tags ExcerptFavorite

Download recently published book – Learn Data Science with R

[This article was first published on R-posts.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Learn Data Science with R is for learning the R language and data … Read more

Categories R Tags ExcerptFavorite

Tidy Parallel Processing in R with furrr

[This article was first published on business-science.io, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Parallel processing in the tidyverse couldn’t be easier with the furrr package. If … Read more

Categories R Tags ExcerptFavorite

Drawing the wrong conclusion about subgroups: a comparison of Bayes and frequentist methods

In the previous post, I simulated data from a hypothetical RCT that had heterogeneous treatment effects across subgroups defined by three covariates. I presented two Bayesian models, a strongly pooled model and an unpooled version, that could be used to estimate all the subgroup effects in a single model. I compared the estimates to a … Read more

Categories R Tags ExcerptFavorite

How do you use Shiny to communicate to 8 million people?

[This article was first published on RStudio Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don’t. Data visualization is fundamentally an act of communication. While many discussions focus … Read more

Categories R Tags ExcerptFavorite