Categories
Development System & Network

Bottleneck identification using iostat, vmstat, mpstat

I am doing some Apache and MySQL performance tests, then upgrading a single component and running tests again to see where the bottlenecks are. I have a local used server warehouse (Tams in Lindon UT) that is loaning me about 20 processors tomorrow to do these tests on to compare more cores vs higher clock […]

Categories
Development

Multiple conditional statements with groupby in pandas

I have a dataset similar to the following. date,score 3/1/16,0.6369 5/1/16,-0.2023 6/1/16,0.04 7/1/16,0.0772 9/1/16,-0.4215 12/1/16,0.2960 15/1/16,0.25 15/1/16,0.7684 I want to apply the following conditions on the score. Con1: if the score is >.05, count that as positive for that date Con2: if the score is -0.05<=score <=.05, count that as neutral for that date Con3: […]

Categories
Development System & Network

Bottleneck identification using iostat, vmstat, mpstat

I am doing some Apache and MySQL performance tests, then upgrading a single component and running tests again to see where the bottlenecks are. I have a local used server warehouse (Tams in Lindon UT) that is loaning me about 20 processors tomorrow to do these tests on to compare more cores vs higher clock […]

Categories
Development

How to implement this rotation strategy in r?

I am doing factor analysis of 7 time-series and 3 factors. I want to impose the following rotation strategy: 1) the second and third factors don’t load on the 1M series (second and third factor orthogonal to the 1M series) 2) the third factor has the smallest variance in the subsample January 2002-August 2008 This […]

Categories
Development

In R, how can I use argmax function by row and count the variable number?

I have the raw dataset. The below is sample of raw data: sentiment pos neu neg likes_count 1 1 0 0 5 2 0.2 0.3 0.5 6 3 0.3 0.3 0.4 6 4 0 0 1 3 5 0.2 0.7 0.1 1 In this raw data of sentiment, “pos” refers to probability of positivity in […]

Categories
Development

Adding to an SVG Map

I have found a map of the UK that I have now personalised. Codepen:- https://codepen.io/scottYg55/pen/pooOvWq I now need to add Republic Of Ireland to the map to so it looks like this image:- https://www.intersystemsuki.com/wp-content/uploads/2020/01/map.png. How can I easily do this within the SVG, is there an online generator for example that I could use? Any […]

Categories
Development

Merge the dataset by day or month

I have the raw dataset. The below raw dataset, which is sample data, has time and sentiment(positive, neutral, negative). This raw dataset is : created_time neg_sentiment neu_sentiment pos_sentiment 2015-01-12T23:27:53+0000 0 0 1 2015-01-13T00:36:15+0000 0 0 1 2015-01-13T00:39:37+0000 0.02 0 0.98 2015-01-13T01:26:05+0000 0.41 0.59 0 2015-01-15T16:10:46+0000 0.14 0.02 0.84 2015-02-13T02:38:59+0000 0.86 0.1 0 2015-01-13T21:00:15+0000 1 0 […]

Categories
Development

fit multiple models using caret per factor in R

I am trying to build a machine learning workflow using the caret and caretEnsemble packages in R. I have supplied a sample dataset my actual data is about 8-10 times larger. The code below has comments at specific areas I am stuck, my question is how do I: Modify the entire workflow to be applied […]

Categories
Development

Python Curve_Fit Exponential / Power / Log Curve – Improve Results

I am trying to fit this data which is asymptotically approaching zero (but never reaching it). I believe the best curve is an Inverse Logistic Function, but open to suggestions. The Key is the decaying “S-curve” shape which is expected. Here is the code I have so far, and the plot image below, which is […]

Categories
Development

Python – How to properly align bar plots to line subplots?

I’m attempting to plot out sample size for my line plots and while the bars are plotting, they’re not plotting at the appropriate place in the x-axis. attacks = 5 idealdata = fullMatrix(attacks, .5) actualdata = trueDataM(attacks, ‘crit_50’) fig, axs = plt.subplots(attacks+1, sharex=True, sharey=True) axs2 = [ax.twinx() for ax in axs] fig.text(0.5, 0.04, ‘State’, ha=’center’) […]