Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
I have the following input dataset ID Var1 Var1 11 A 23 11 B 121 11 A 23 12 A 32 12 B 158 12 A 32 12 B 158 13 A 87 13 B 567 I want to remove the repetitive records by ID variable and get the following output. ID Var1 Var1 11 A 23 11 B 121 12 A 32 12 B 158 13 A 87 13 B 567 Please suggest the best way to do it.
... View more
I have a dataset with five variables I would like to use to display the data on a graph. The data is grouped by the first variable (p) and sub-grouped by the second variable (i) along the x-axis. The fourth variable (nor) determines the height of the point along the y-axis. The fifth variable (mnor) is the mean of the nor values for each subgroup. I want to replace the circle with a unique symbol determined by the third variable (date), so that the graph is easier to interpret the results from different days the data was collected. I have been able to replace the point with the date but would prefer a symbol to minimize clutter. I've included a sample code below. The first graph is my original graph without including the date variable, and the second graph is replacing the points with the date value. data samp;
input p$ i date: date9. nor mnor;
format date date9.;
datalines;
A 0 16May2024 1.230 1.000
A 0 23May2024 0.770 1.000
A 1 16May2024 0.014 0.021
A 1 23May2024 0.028 0.021
B 0 16May2024 1.576 1.504
B 0 23May2024 1.432 1.504
B 1 16May2024 0.064 0.071
B 1 23May2024 0.078 0.071
C 0 16May2024 0.432 0.510
C 0 23May2024 0.588 0.510
C 1 16May2024 0.011 0.009
C 1 23May2024 0.007 0.009
;
title "Example Graph 1";
proc sgplot data = samp noborder;
scatter x = p y = nor /
markerattrs = (symbol=CircleFilled) group = i groupdisplay = cluster;
highlow x = p low = mnor high = mnor / nofill type = bar barwidth = 0.4 group = i groupdisplay = cluster;
xaxis type = discrete labelattrs = (size = 9) display = (nolabel);
yaxis labelattrs = (size = 9) display = (nolabel) grid;
run;
title "Example Graph 2";
proc sgplot data = samp noborder;
scatter x = p y = nor /
markercharattrs = (weight = bold) markerchar = date group = i groupdisplay = cluster;
highlow x = p low = mnor high = mnor / nofill type = bar barwidth = 0.4 group = i groupdisplay = cluster;
xaxis type = discrete labelattrs = (size = 9) display = (nolabel);
yaxis labelattrs = (size = 9) display = (nolabel) grid;
run;
... View more
SAS compute sessions have always been heavily depending on good disk I/O performance. In this blog I am covering some typical choices for configuring the SASWORK storage for SAS compute sessions.
... View more
Hello In a typical SAS 9.x environment, users often create datasets etc. that can be permanently stored on a physical disk. (Local, shared etc.) Moving to SAS Viya 4 on AWS I am exploring the options where a user can get the same experience and store the data on some form of permanent storage disk. (Content server, database excluded). This could be a storage on AWS itself. Wondering if somebody can enlighten me about the options available.
... View more