Month: July 2024
Azure Capacity Reservations with Automatic Consumption
Solving the ask – Automatic Capacity Reservations
Historically, the setting to use a Capacity Reservations Groups must be defined while the virtual machine is being deployed or changed while the machine is deallocated. While this is still the requirement, the drafted Azure Policy (at the bottom of this document) automates the additional setting to be specified even if it wasn’t specified on the VM Creation process.
For example, some solutions, such as Citrix DaaS hosted on Azure, use automation such as recreation of VMs to handle update management or scalability demands. The update process doesn’t have the ability to add this setting without code changes to their process which requires a significant investment of time per cloud provider to update. If this capacity isn’t available for any reason, the scale out or recreation could fail causing the environment to become unhealthy.
What are Azure Capacity Reservations?
Azure Capacity Reservations are a new feature that allows you to reserve compute resources for your virtual machines (VMs) in a specific region and/or availability zone. By using Azure Capacity Reservations, you can ensure that your VMs have guaranteed access to the resources they need, even during periods of high demand or unexpected events.
Reserved Virtual Machine Instance (RI) to on-demand Capacity Reservation work together. You can apply existing or future RIs to on-demand capacity reservations and receive RI discounts. Available RIs are applied automatically to Capacity Reservation the same way they’re applied to VMs.
Azure Capacity Reservation Group (CRG) is a grouping of Capacity Reservations. VM creation targets the CRG and not the specific Capacity Reservation.
How to create Azure Capacity Reservations?
To get started with Azure Capacity Reservations, you need to follow these steps:
Create a capacity reservation group: A reservation group is a logical container that holds one or more reservations. You can assign VMs to a reservation group to use the reserved resources.
Create a capacity reservation: A reservation is a specific amount of compute resources that you reserve for a certain VM size, region, and availability zone. You can create multiple reservations within a reservation group.
How do I use the Capacity Reservations?
To deploy your virtual machines to the capacity that is created, you need to follow either of these options:
Assign VMs to a reservation group: You can assign existing deallocated VMs or new VMs to a reservation group, either individually or as part of a scale set. The VMs will use the reserved resources from the reservation group, as long as they match the reservation criteria.
Leverage Azure Policy (New as of July 2024):
Using Azure policy, you can deploy a policy per subscription that specifying:
VM SKU
Region
Target Capacity Reservation
Is this a zonal deployment
When VMs are created, this policy will automatically add the virtual machine to the Azure Capacity Reservation Group.
How do I use Azure Policy to set the Capacity Reservation?
With the below parameters set via policy per subscription, VMs of the desired SKU and availability will automatically be added based on:
Region
SKU
Multiple SKUs can be targeted with the policy
Zonal – yes or no
Capacity Reservation ID
The Capacity reservation targeted with the policy will need to match the zonal decision or VM Creations will fail.
Using this functionality, it is now possible to specify a minimum quantity of VM Compute that is guaranteed to be available.
What does this look like in production?
Create Capacity Reservation Group with correct quantities
Create the policy definition
Assign the policy to have VMs automatically added
Create Virtual Machines
Create Capacity Reservations with correct quantities
Create the Capacity Reservation Group to hold the specific Capacity Reservations based on regional or zonal alignment. For each SKU, create a capacity reservation with the minimum amount of compute you wish to be reserved per region or zone. Capacity Reservations can be overallocated. If you reserve 3 nodes of E2s_v4 in zone 1, but attempt to deploy 10 VMs, you are guaranteed to have the 3 available for your consumption and the remaining 7 are subject to normal availability within the zone.
In this example, I have created a Capacity Reservation Groups for regional and another for zonal alignment:
Regional: CRGRG1-WUS3-r
Zonal: CRGRG1-WUS3-z
Create the policy definition
To simplify the experience, I have created a single Azure Policy that is able to be referenced for both scenarios.
An example copy of the policy can be found at the bottom of this article.
Assign the policy to have VMs automatically added
Based on the assignment parameters below:
This example for regional:
allowedLocations
westus3
CapacityReservationID
/subscriptions/########-####-####-####-############/resourceGroups/CRGRG/providers/Microsoft.Compute/capacityReservationGroups/CRGRG1-WUS3-r
listOfCRGSKUs
Standard_E2s_v4
Zonal
False
Based on the assignment parameters below (this example for zonal):
allowedLocations
westus3
CapacityReservationID
/subscriptions/########-####-####-####-############/resourceGroups/CRGRG/providers/Microsoft.Compute/capacityReservationGroups/CRGRG1-WUS3-z
listOfCRGSKUs
Standard_E2s_v4
Zonal
True
Create Virtual Machines within the specified context
Based on the above, if a VM is created with the SKU E2s_v4 in availability zone 1, it will automatically be added to CRGRG1-WUS3-z.
Based on the above, if I create a VM with the SKU E2s_v4 without specifying an availability zone, it will automatically be added to CRGRG1-WUS3-r.
The above Azure Policy and assignments added this line of code in the VM Creation template.
“type”: “Microsoft.Compute/virtualMachines”,
“location”: “westus3”,
“properties”: {
“capacityReservation”: {
“capacityReservationGroup”: {
“id”: “/subscriptions/########-####-####-####-############/resourceGroups/CRGRG/providers/Microsoft.Compute/capacityReservationGroups/CRGRG1-WUS3-z”
}
}
An example copy of the policy can be found below:
The below policy is a draft and is based on new functionality. It should not be treated as production ready unless deemed so by the appropriate resources at your organization.
{
“mode”: “All”,
“policyRule”: {
“if”: {
“allOf”: [
{
“field”: “type”,
“equals”: “Microsoft.Compute/virtualMachines”
},
{
“field”: “location”,
“in”: “[parameters(‘allowedLocations’)]”
},
{
“field”: “Microsoft.Compute/virtualMachines/sku.name”,
“in”: “[parameters(‘listOfCRGSKUs’)]”
},
{
“field”: “Microsoft.Compute/virtualMachines/zones”,
“exists”: “[parameters(‘Zonal’)]”
},
{
“field”: “Microsoft.Compute/virtualMachines/capacityReservation.capacityReservationGroup.id”,
“notequals”: “[parameters(‘CapacityReservationID’)]”
}
]
},
“then”: {
“effect”: “modify”,
“details”: {
“roleDefinitionIds”: [
“/providers/Microsoft.Authorization/roleDefinitions/9980e02c-c2be-4d73-94e8-173b1dc7cf3c”
],
“operations”: [
{
“operation”: “addOrReplace”,
“field”: “Microsoft.Compute/virtualMachines/capacityReservation.capacityReservationGroup.id”,
“value”: “[parameters(‘CapacityReservationID’)]”
}
]
}
}
},
“parameters”: {
“allowedLocations”: {
“type”: “Array”,
“metadata”: {
“displayName”: “Specific Region that is covered under this CRG”,
“description”: “The list of locations that resource groups can be created in.”,
“strongType”: “location”
}
},
“listOfCRGSKUs”: {
“type”: “Array”,
“metadata”: {
“displayName”: “Allowed Size SKUs”,
“description”: “The list of size SKUs that can be specified for virtual machines.”,
“strongType”: “VMSKUs”
}
},
“CapacityReservationID”: {
“type”: “String”,
“metadata”: {
“displayName”: “Capacity Reservation ID”,
“description”: “The capacity reservation targets this policy to target. Resource ID should be formatted as: ‘/subscriptions/{SubID}/resourceGroups/{RGName}/providers/Microsoft.Compute/capacityReservationGroups/{CRG Name}.'”
}
},
“Zonal”: {
“type”: “String”,
“metadata”: {
“displayName”: “Is this Zonal?”,
“description”: “If this is Zonal, it will attempt to add to the Zonal Capacity Reservation Groups. If not, it will add to the reginoal Capacity Reservation Groups.”
},
“allowedValues”: [
“true”,
“false”
]
}
}
}
Microsoft Tech Community – Latest Blogs –Read More
!^¿Como marcar a telefono United Colombia?^!
Para marcar atención al cliente de ^United Colombia llame aquí +57 601 580 4990 /+57 601 580 4990 – luego seleccione el idioma en lo que prefiere hablar con la gente de ^United Colombia^ los ejecutivos están abiertos para asistir los clientes de Delta.
Para marcar atención al cliente de ^United Colombia llame aquí +57 601 580 4990 /+57 601 580 4990 – luego seleccione el idioma en lo que prefiere hablar con la gente de ^United Colombia^ los ejecutivos están abiertos para asistir los clientes de Delta. Read More
O365 Exporting files with multiple periods in file name using DoCmd.Transfertext stopped working
We upgraded from access 2013 to office 365 few years ago. And have been using Transfertext to export files in txt, xls, xlsx formats until last week. Many of the exported files have multiple periods in the file names.
All of a sudden we are getting error message to remove multiple periods and exports are aborting.
Few users of the application are on Access 2013 and we don’t see any issue with 2013.
Is there a solution or fix for above issue?
Thanks in Advance
Shiva
We upgraded from access 2013 to office 365 few years ago. And have been using Transfertext to export files in txt, xls, xlsx formats until last week. Many of the exported files have multiple periods in the file names.All of a sudden we are getting error message to remove multiple periods and exports are aborting.Few users of the application are on Access 2013 and we don’t see any issue with 2013. Is there a solution or fix for above issue? Thanks in AdvanceShiva Read More
System and organization controls in XDR?
A recent Service Health post in the Office 365 Admin Center, regarding a problem with Defender XDR, says “This issue impacts tenant admins and users with system and organization controls (SOC) permissions.”
Is this a mistake? Do they mean “security operations center permissions” (i.e., Entra ID roles or RBAC roles) rather than “system and organization controls?” The former would make sense.
Looking for any clarity anyone can provide on this post.
Thanks in advance!
A recent Service Health post in the Office 365 Admin Center, regarding a problem with Defender XDR, says “This issue impacts tenant admins and users with system and organization controls (SOC) permissions.” Is this a mistake? Do they mean “security operations center permissions” (i.e., Entra ID roles or RBAC roles) rather than “system and organization controls?” The former would make sense. Looking for any clarity anyone can provide on this post. Thanks in advance! Read More
Applied Skills Question – Title Plan Duration vs. learn.microsoft.com
Hi TSPP Team,
we have several questions about the new Applied Skills offerings?
* There are discrepancies between course duration in titleplan and the content on learn.microsoft.com.
e.g.
– MS4008, Title Plan Duration 1Day – Link on learn.microsoft.com Duration 1hr39min
– MS4001, Title Plan 1 day – learn.microsoft.com 3h47min
– SC5006, TP: 1day – learn.microsoft.com 3hrs
I think thats not optimal for students when they attend a 1 day ILT course (in EMEA 7 work-hours) and then they see the content is only 1hr 39min.
Thanks for any tips for to sell this stuff for Learning Partners.
Mario
Hi TSPP Team, we have several questions about the new Applied Skills offerings? * There are discrepancies between course duration in titleplan and the content on learn.microsoft.com.e.g.- MS4008, Title Plan Duration 1Day – Link on learn.microsoft.com Duration 1hr39min- MS4001, Title Plan 1 day – learn.microsoft.com 3h47min- SC5006, TP: 1day – learn.microsoft.com 3hrs I think thats not optimal for students when they attend a 1 day ILT course (in EMEA 7 work-hours) and then they see the content is only 1hr 39min. Thanks for any tips for to sell this stuff for Learning Partners.Mario Read More
Need Help for Selling Applied Skills
Hi,
we appreaciate the new offerings for copilot, AI, and more. For our understanding it would be helpful to have a learning path available which course has which content and whats the audience for it.
There are more than 20 new applied skills for copilot and ai. Is our opinion there is much content overlapping, very short new content for 1 day courses, and basics in nearly every course (e.g. responsible AI, what is Copilot, What are LLMs)
e.g. Overlapping content in the MS4004 to 4008, 4012 courses.
Some are only the “legacy” course split up in 4 courses (e.g. AI3002, 3003, 3004) is the same content as AI102.
A big picture about the new applied skills would be helpful to understand and to sell.
What about a poster: “How to successfully learn, plan, apply the copilot solutions”
Overall our students find it very frustrating to have only Click-Thru-Simulations or Demonstration Only Courses.
We are waiting for many months now to get training licenses for Copilot Training. No one is willing to give us a working answer.
It is very difficult to decide which course to offer and which one to skip. You have to check:
* learn.microsoft.com
* PPT Slides (when LDC is down)
* Course Description & Format differences
* GIT-Hub MCT Pages are almost all empty without any content. (besided the template files azuredeploy.json)
Regards,
Mario
Hi, we appreaciate the new offerings for copilot, AI, and more. For our understanding it would be helpful to have a learning path available which course has which content and whats the audience for it. There are more than 20 new applied skills for copilot and ai. Is our opinion there is much content overlapping, very short new content for 1 day courses, and basics in nearly every course (e.g. responsible AI, what is Copilot, What are LLMs) e.g. Overlapping content in the MS4004 to 4008, 4012 courses. Some are only the “legacy” course split up in 4 courses (e.g. AI3002, 3003, 3004) is the same content as AI102. A big picture about the new applied skills would be helpful to understand and to sell.What about a poster: “How to successfully learn, plan, apply the copilot solutions” Overall our students find it very frustrating to have only Click-Thru-Simulations or Demonstration Only Courses. We are waiting for many months now to get training licenses for Copilot Training. No one is willing to give us a working answer. It is very difficult to decide which course to offer and which one to skip. You have to check: * learn.microsoft.com* PPT Slides (when LDC is down)* Course Description & Format differences* GIT-Hub MCT Pages are almost all empty without any content. (besided the template files azuredeploy.json) Regards,Mario Read More
Out-of-date- connecting on-premises exchange servers
Hi
I am getting issues with sending emails. Please find snapshots. I have done Pause Enforcement for 10 days. It is working fine now but I need permanent solutions.
HiI am getting issues with sending emails. Please find snapshots. I have done Pause Enforcement for 10 days. It is working fine now but I need permanent solutions. Read More
Formula for gannt-charts in projects
Hi everyone,
I am trying to make a gannt-chart for projects and I encounter the following problem.
In the picture you see at my company we have different types of projects (full, medium , light , full ctpd). Regarding this there are different types of hours involved every week, so we have made basic scheme for each type of project(see second picture). I would like that Excel returns these rows based on a) the type of project and b) that it starts returning this row from the date (week) the project starts. The conditional formatting between start date and end date is not difficult to format. Secondly return the rows is also not the problem however let the rows start from the start date is difficult.
Does someone has thoughts on this?
Hi everyone, I am trying to make a gannt-chart for projects and I encounter the following problem. In the picture you see at my company we have different types of projects (full, medium , light , full ctpd). Regarding this there are different types of hours involved every week, so we have made basic scheme for each type of project(see second picture). I would like that Excel returns these rows based on a) the type of project and b) that it starts returning this row from the date (week) the project starts. The conditional formatting between start date and end date is not difficult to format. Secondly return the rows is also not the problem however let the rows start from the start date is difficult. Does someone has thoughts on this? Read More
How to plot RGB histogram of an image into a single 3D slice plot?
Hello. Im working on color image encryption and need to plot the histogram for each color channels. I can plot the individual color channel histogram in three 2D plot with this code.
close all;
image = imread(‘peppers.png’);
R = image(:,:,1);
G = image(:,:,2);
B = image(:,:,3);
[Width,Length] = size(image);
subplot(2,2,1); imshow(image);
title(‘Plain Image’)
subplot(2,2,2);
imhist(R);
myHist1 = findobj(gca, ‘Type’, ‘Stem’);
myHist1.Color = [1 0 0];
title(‘Red Channel Plain Histogram’)
subplot(2,2,3);
imhist(G);
myHist2 = findobj(gca, ‘Type’, ‘Stem’);
myHist2.Color = [0 1 0];
title(‘Green Channel Plain Histogram’)
subplot(2,2,4);
imhist(B);
myHist3 = findobj(gca, ‘Type’, ‘Stem’);
myHist3.Color = [0 0 1];
xlim([0 256]);
title(‘Blue Channel Plain Histogram’)
But, i tried to plot them together in a 3D plot like this below (picture from an article i found), but i cant. I tried to find any forum that talks about this, but i can only found slice plots of meshgrid, not from histogram.
If anyone could help, I would appreciate it so much.
Thank you!Hello. Im working on color image encryption and need to plot the histogram for each color channels. I can plot the individual color channel histogram in three 2D plot with this code.
close all;
image = imread(‘peppers.png’);
R = image(:,:,1);
G = image(:,:,2);
B = image(:,:,3);
[Width,Length] = size(image);
subplot(2,2,1); imshow(image);
title(‘Plain Image’)
subplot(2,2,2);
imhist(R);
myHist1 = findobj(gca, ‘Type’, ‘Stem’);
myHist1.Color = [1 0 0];
title(‘Red Channel Plain Histogram’)
subplot(2,2,3);
imhist(G);
myHist2 = findobj(gca, ‘Type’, ‘Stem’);
myHist2.Color = [0 1 0];
title(‘Green Channel Plain Histogram’)
subplot(2,2,4);
imhist(B);
myHist3 = findobj(gca, ‘Type’, ‘Stem’);
myHist3.Color = [0 0 1];
xlim([0 256]);
title(‘Blue Channel Plain Histogram’)
But, i tried to plot them together in a 3D plot like this below (picture from an article i found), but i cant. I tried to find any forum that talks about this, but i can only found slice plots of meshgrid, not from histogram.
If anyone could help, I would appreciate it so much.
Thank you! Hello. Im working on color image encryption and need to plot the histogram for each color channels. I can plot the individual color channel histogram in three 2D plot with this code.
close all;
image = imread(‘peppers.png’);
R = image(:,:,1);
G = image(:,:,2);
B = image(:,:,3);
[Width,Length] = size(image);
subplot(2,2,1); imshow(image);
title(‘Plain Image’)
subplot(2,2,2);
imhist(R);
myHist1 = findobj(gca, ‘Type’, ‘Stem’);
myHist1.Color = [1 0 0];
title(‘Red Channel Plain Histogram’)
subplot(2,2,3);
imhist(G);
myHist2 = findobj(gca, ‘Type’, ‘Stem’);
myHist2.Color = [0 1 0];
title(‘Green Channel Plain Histogram’)
subplot(2,2,4);
imhist(B);
myHist3 = findobj(gca, ‘Type’, ‘Stem’);
myHist3.Color = [0 0 1];
xlim([0 256]);
title(‘Blue Channel Plain Histogram’)
But, i tried to plot them together in a 3D plot like this below (picture from an article i found), but i cant. I tried to find any forum that talks about this, but i can only found slice plots of meshgrid, not from histogram.
If anyone could help, I would appreciate it so much.
Thank you! image processing, histogram, 3d plots MATLAB Answers — New Questions
Plot histogram of a series of images and extract cracks
Dear all,
I’m trying to plot histogram of a series of tomography images to assess the threshold for extracting cracks. I don’t understand why the histogram is not displayed. I would like to select at least the first and the last images to determine the threshold. Here is the code:
Thanks a lot for any help
clear all
close all
clc
a= load(‘tomo_carota_8bit.mat’)
x=a.x_8;
x=double(x);
% clear a
%%
figure,
for ii = 1:size(x, 3)
ii
I = squeeze(x(:,:,ii));
imshow(I, []);
pause(0.1)
end
subplot(3,2,1);
imshow(I,[]);
title(‘Original Grayscale Image’, ‘FontSize’, 15);
subplot(3,2,2);
imhist(I);
title(‘Histogram of original image’);
subplot(3,2,3);
imhist(I);
[counts, grayLevels] = imhist(I);
bar(grayLevels, counts, ‘EdgeColor’, ‘r’, ‘FaceColor’, ‘b’, ‘BarWidth’, 1);
xlim([0, max(I(:))]);
%xlim([0 100])
title(‘Histogram of original image zoomed’);
subplot(3,2,4);
thresholdValue = 85;
thresholdValue1 = 60;
f.InvertHardcopy = ‘off’;
binaryImage1 = I > thresholdValue1;
imshow(binaryImage1, []);
title(‘Binary Image threshold 85’);
f.InvertHardcopy = ‘off’;
binaryImage = I > thresholdValue;
subplot(3,2,5);
imshow(binaryImage, []);
title(‘Binary Image threshold 60’);
figure (1)Dear all,
I’m trying to plot histogram of a series of tomography images to assess the threshold for extracting cracks. I don’t understand why the histogram is not displayed. I would like to select at least the first and the last images to determine the threshold. Here is the code:
Thanks a lot for any help
clear all
close all
clc
a= load(‘tomo_carota_8bit.mat’)
x=a.x_8;
x=double(x);
% clear a
%%
figure,
for ii = 1:size(x, 3)
ii
I = squeeze(x(:,:,ii));
imshow(I, []);
pause(0.1)
end
subplot(3,2,1);
imshow(I,[]);
title(‘Original Grayscale Image’, ‘FontSize’, 15);
subplot(3,2,2);
imhist(I);
title(‘Histogram of original image’);
subplot(3,2,3);
imhist(I);
[counts, grayLevels] = imhist(I);
bar(grayLevels, counts, ‘EdgeColor’, ‘r’, ‘FaceColor’, ‘b’, ‘BarWidth’, 1);
xlim([0, max(I(:))]);
%xlim([0 100])
title(‘Histogram of original image zoomed’);
subplot(3,2,4);
thresholdValue = 85;
thresholdValue1 = 60;
f.InvertHardcopy = ‘off’;
binaryImage1 = I > thresholdValue1;
imshow(binaryImage1, []);
title(‘Binary Image threshold 85’);
f.InvertHardcopy = ‘off’;
binaryImage = I > thresholdValue;
subplot(3,2,5);
imshow(binaryImage, []);
title(‘Binary Image threshold 60’);
figure (1) Dear all,
I’m trying to plot histogram of a series of tomography images to assess the threshold for extracting cracks. I don’t understand why the histogram is not displayed. I would like to select at least the first and the last images to determine the threshold. Here is the code:
Thanks a lot for any help
clear all
close all
clc
a= load(‘tomo_carota_8bit.mat’)
x=a.x_8;
x=double(x);
% clear a
%%
figure,
for ii = 1:size(x, 3)
ii
I = squeeze(x(:,:,ii));
imshow(I, []);
pause(0.1)
end
subplot(3,2,1);
imshow(I,[]);
title(‘Original Grayscale Image’, ‘FontSize’, 15);
subplot(3,2,2);
imhist(I);
title(‘Histogram of original image’);
subplot(3,2,3);
imhist(I);
[counts, grayLevels] = imhist(I);
bar(grayLevels, counts, ‘EdgeColor’, ‘r’, ‘FaceColor’, ‘b’, ‘BarWidth’, 1);
xlim([0, max(I(:))]);
%xlim([0 100])
title(‘Histogram of original image zoomed’);
subplot(3,2,4);
thresholdValue = 85;
thresholdValue1 = 60;
f.InvertHardcopy = ‘off’;
binaryImage1 = I > thresholdValue1;
imshow(binaryImage1, []);
title(‘Binary Image threshold 85’);
f.InvertHardcopy = ‘off’;
binaryImage = I > thresholdValue;
subplot(3,2,5);
imshow(binaryImage, []);
title(‘Binary Image threshold 60’);
figure (1) threshold, imhist, imshow MATLAB Answers — New Questions
How does the Spacecraft Dynamics block work?
In Simulink (Aerospace Blockset) there is a Spacecraft Dynamics block. How does he work? I can’t look inside it (Look Under Mask option is inactive). The description page shows the equations that are used in the block, but the numbers given are clearly not given in full (it seems to me). https://www.mathworks.com/help/aeroblks/getting-started-with-the-spacecraft-dynamics-block.html
In addition, the equations themselves raise some questions, for example, the PDEs are given. Simulink can now solve PDEs in real time?
I want to understand how this block works in order to learn how to write my own to suit my own needs.In Simulink (Aerospace Blockset) there is a Spacecraft Dynamics block. How does he work? I can’t look inside it (Look Under Mask option is inactive). The description page shows the equations that are used in the block, but the numbers given are clearly not given in full (it seems to me). https://www.mathworks.com/help/aeroblks/getting-started-with-the-spacecraft-dynamics-block.html
In addition, the equations themselves raise some questions, for example, the PDEs are given. Simulink can now solve PDEs in real time?
I want to understand how this block works in order to learn how to write my own to suit my own needs. In Simulink (Aerospace Blockset) there is a Spacecraft Dynamics block. How does he work? I can’t look inside it (Look Under Mask option is inactive). The description page shows the equations that are used in the block, but the numbers given are clearly not given in full (it seems to me). https://www.mathworks.com/help/aeroblks/getting-started-with-the-spacecraft-dynamics-block.html
In addition, the equations themselves raise some questions, for example, the PDEs are given. Simulink can now solve PDEs in real time?
I want to understand how this block works in order to learn how to write my own to suit my own needs. aerospace blockset, spacecraft dynamics, simulink MATLAB Answers — New Questions
question about how the function pca() calculates the covariance matrix internally
I was puzzled by the output of pca() when using mean centering or not. I am using Matlab 2024a.
pca.m uses the internal function c = ncnancov(x,Rows,centered) which seems to provide the covariance matrix of x
however,
1) it uses the formula for the population covariance, i.e. it calculates x’*x/n not x’*x/(n-1) – what is the rationale behind that?
2) it does not mean center x. This is surprising because without mean centering x the formula x’*x/n (or x’*x/(n-1) for that matter) does NOT provide the covariance matrix
The second point causes the call [coeff,score,latent]=pca(D, ‘Algorithm’,’eig’,’Centered’,’off’) to produce different coeff, and latent from the call [coeff,score,latent]=pca(D, ‘Algorithm’,’eig’). The scores will obviosuly be different but coeff and latent should not be affected by mean centering as can be shown by comparing the output of:
load(‘Data_Table8p1.mat’);
Dm = D-mean(D);
[coeff,eigValues] = eig(cov(D));
[eigValues, idx] = sort(diag(eigValues), ‘descend’); % sort
coeff = coeff(:, idx);
score = D/coeff’; % get scores of mean centered data
with:
[coeff_m,eigValues_m] = eig(cov(Dm));
[eigValues_m, idx] = sort(diag(eigValues_m), ‘descend’); % sort
coeff_m = coeff_m(:, idx);
score_m = Dm/coeff_m’; % get scores of mean centered data
Probably I am missing something, but the internal function ncnancov() as used in pca is unclear to me. Any explanation is much appreciated!I was puzzled by the output of pca() when using mean centering or not. I am using Matlab 2024a.
pca.m uses the internal function c = ncnancov(x,Rows,centered) which seems to provide the covariance matrix of x
however,
1) it uses the formula for the population covariance, i.e. it calculates x’*x/n not x’*x/(n-1) – what is the rationale behind that?
2) it does not mean center x. This is surprising because without mean centering x the formula x’*x/n (or x’*x/(n-1) for that matter) does NOT provide the covariance matrix
The second point causes the call [coeff,score,latent]=pca(D, ‘Algorithm’,’eig’,’Centered’,’off’) to produce different coeff, and latent from the call [coeff,score,latent]=pca(D, ‘Algorithm’,’eig’). The scores will obviosuly be different but coeff and latent should not be affected by mean centering as can be shown by comparing the output of:
load(‘Data_Table8p1.mat’);
Dm = D-mean(D);
[coeff,eigValues] = eig(cov(D));
[eigValues, idx] = sort(diag(eigValues), ‘descend’); % sort
coeff = coeff(:, idx);
score = D/coeff’; % get scores of mean centered data
with:
[coeff_m,eigValues_m] = eig(cov(Dm));
[eigValues_m, idx] = sort(diag(eigValues_m), ‘descend’); % sort
coeff_m = coeff_m(:, idx);
score_m = Dm/coeff_m’; % get scores of mean centered data
Probably I am missing something, but the internal function ncnancov() as used in pca is unclear to me. Any explanation is much appreciated! I was puzzled by the output of pca() when using mean centering or not. I am using Matlab 2024a.
pca.m uses the internal function c = ncnancov(x,Rows,centered) which seems to provide the covariance matrix of x
however,
1) it uses the formula for the population covariance, i.e. it calculates x’*x/n not x’*x/(n-1) – what is the rationale behind that?
2) it does not mean center x. This is surprising because without mean centering x the formula x’*x/n (or x’*x/(n-1) for that matter) does NOT provide the covariance matrix
The second point causes the call [coeff,score,latent]=pca(D, ‘Algorithm’,’eig’,’Centered’,’off’) to produce different coeff, and latent from the call [coeff,score,latent]=pca(D, ‘Algorithm’,’eig’). The scores will obviosuly be different but coeff and latent should not be affected by mean centering as can be shown by comparing the output of:
load(‘Data_Table8p1.mat’);
Dm = D-mean(D);
[coeff,eigValues] = eig(cov(D));
[eigValues, idx] = sort(diag(eigValues), ‘descend’); % sort
coeff = coeff(:, idx);
score = D/coeff’; % get scores of mean centered data
with:
[coeff_m,eigValues_m] = eig(cov(Dm));
[eigValues_m, idx] = sort(diag(eigValues_m), ‘descend’); % sort
coeff_m = coeff_m(:, idx);
score_m = Dm/coeff_m’; % get scores of mean centered data
Probably I am missing something, but the internal function ncnancov() as used in pca is unclear to me. Any explanation is much appreciated! pca, cov, matlab MATLAB Answers — New Questions
Issue with retention policy with adaptive scope
Dear community,
We created an adaptive scope and a retention policy about two weeks ago. If I check the scope details on the Purview portal, the adaptive scope shows 9602 users, but the policy shows only ~9150 users. I tried to investigate the issue, but I haven’t found an error message or a list of users missing from the policy. I must find a way to list out the users who are not covered by the policy.
What I have done in a nutshell is:
– Get-ComplianceRetentionPolicy does not see this policy. We have a few other policies with static scope, and they appear on the output, but the one we want to check is not.
– I collected all the mailboxes and checked the InPlaceHolds, but there is no such policy either. This is weird since we should have 9150 users covered by this policy.
– I checked a user who has this policy with the “Policy lookup” feature on the Purview portal, and it showed that the user is covered by the policy.
I googled, Copiloted, and ChatGPTd my question, but I still have no clue what to do.
The main question is: How can I query a list of users missing from a retention policy with adaptive scope?
Thank you for your help in advance!
Dear community,We created an adaptive scope and a retention policy about two weeks ago. If I check the scope details on the Purview portal, the adaptive scope shows 9602 users, but the policy shows only ~9150 users. I tried to investigate the issue, but I haven’t found an error message or a list of users missing from the policy. I must find a way to list out the users who are not covered by the policy.What I have done in a nutshell is: – Get-ComplianceRetentionPolicy does not see this policy. We have a few other policies with static scope, and they appear on the output, but the one we want to check is not.- I collected all the mailboxes and checked the InPlaceHolds, but there is no such policy either. This is weird since we should have 9150 users covered by this policy.- I checked a user who has this policy with the “Policy lookup” feature on the Purview portal, and it showed that the user is covered by the policy.I googled, Copiloted, and ChatGPTd my question, but I still have no clue what to do. The main question is: How can I query a list of users missing from a retention policy with adaptive scope? Thank you for your help in advance! Read More
Summing an inventory list
I am new to access, but I am creating a simple inventory database for work. So far, I have a list of machines and locations feeding a parts info list. Then I made a form to easily input new parts and update the table. Now, I want to show the total quantity for each part. The Key is different, but the part name is the same for some parts so I would like the parts grouped by the Key number. I’ve used the report wizard, but it just shows every transaction not a summary. In my most recent attempt, I got it more condensed, but every part is doubled and not updating.
I am new to access, but I am creating a simple inventory database for work. So far, I have a list of machines and locations feeding a parts info list. Then I made a form to easily input new parts and update the table. Now, I want to show the total quantity for each part. The Key is different, but the part name is the same for some parts so I would like the parts grouped by the Key number. I’ve used the report wizard, but it just shows every transaction not a summary. In my most recent attempt, I got it more condensed, but every part is doubled and not updating. Read More
MS Universal Print Windows Sockets Error | error=10053
Hello,
I am trying to share queue made in MyQ solution into Universal Print but unfortunately after doing so I receive following error MS Universal Print Windows Sockets Error | error=10053, there is so sign of queue in Azure side and in MyQ status of queue is “Printer is being created in Azure”. Outbound connection to all necessary endpoints is allowed. Tls 1.2 is on. Any ideas what could be wrong?
Hello,I am trying to share queue made in MyQ solution into Universal Print but unfortunately after doing so I receive following error MS Universal Print Windows Sockets Error | error=10053, there is so sign of queue in Azure side and in MyQ status of queue is “Printer is being created in Azure”. Outbound connection to all necessary endpoints is allowed. Tls 1.2 is on. Any ideas what could be wrong? Read More
Issue with coauthoring in pages – The file (SharePoint Page) is locked for shared use by “User”
We have a custom SPFx web part added to our SharePoint pages. When users enter the required information and click on ‘Save as draft’ or ‘Submit for approval’ (with Power Automate enabled for the approval process), the information should save to the respective columns (page properties) in Site Pages, using REST API for data storage. Until yesterday, it worked fine, but since the rollout of coauthoring on site pages, we are encountering an error: “The file (SharePoint Page) is locked for shared use by ‘User’,” even though the user encountering the error is the one who edited the page.
We have a custom SPFx web part added to our SharePoint pages. When users enter the required information and click on ‘Save as draft’ or ‘Submit for approval’ (with Power Automate enabled for the approval process), the information should save to the respective columns (page properties) in Site Pages, using REST API for data storage. Until yesterday, it worked fine, but since the rollout of coauthoring on site pages, we are encountering an error: “The file (SharePoint Page) is locked for shared use by ‘User’,” even though the user encountering the error is the one who edited the page. Read More
Sharepoint list Status column
I have a sharepoint list with a status column. It has “not Started”, ” In Work”, “In Transit”, and “Complete”. I need a way to lock them in order so a step is not skipped. Any ideas on how I can do this?
I have a sharepoint list with a status column. It has “not Started”, ” In Work”, “In Transit”, and “Complete”. I need a way to lock them in order so a step is not skipped. Any ideas on how I can do this? Read More
Prompt to help me to find available slots for a meeting
Hello,
I try this prompt
Please identify two available time slots before the end of August 2024 for a 1-hour meeting with X and Y.
The slots should align with their working hours, respective time zones, and avoid any scheduling
conflicts.
However, the outcomes are not always consistent, and I typically have two types of responses:
-I have two time slots as options, but not everyone is available, or the time zone check was not considered.
Based on the available information, I have identified two potential time slots for a 1-hour meeting with X and Y before the end of August 2024:
* Thursday, August 10th at 9:00 AM CEST (X’s local time), which corresponds to Thursday,
August 10th at 3:00 AM EDT (Y’s local time)
* Tuesday, August 22nd at 4:00 PM CEST (X’s local time), which corresponds to Tuesday,
August 22nd at 10:00 AM EDT (Y’s local time).
– I received this
I’m sorry, but I couldn’t find specific availability information for X and Y before the end of August 2024.
To identify two available time slots for a 1-hour meeting, I recommend using the scheduling feature within Microsoft 365
to view their calendars and find slots that align with your working hours and time zones. If you need assistance with
scheduling or using the features, please let me know how I can help further.
Could you suggest a rewording of the Prompt or help me understand the answers?
Thanks
Matthieu
Hello, I try this prompt Please identify two available time slots before the end of August 2024 for a 1-hour meeting with X and Y. The slots should align with their working hours, respective time zones, and avoid any scheduling conflicts.However, the outcomes are not always consistent, and I typically have two types of responses:-I have two time slots as options, but not everyone is available, or the time zone check was not considered.Based on the available information, I have identified two potential time slots for a 1-hour meeting with X and Y before the end of August 2024:* Thursday, August 10th at 9:00 AM CEST (X’s local time), which corresponds to Thursday, August 10th at 3:00 AM EDT (Y’s local time)* Tuesday, August 22nd at 4:00 PM CEST (X’s local time), which corresponds to Tuesday, August 22nd at 10:00 AM EDT (Y’s local time).- I received this I’m sorry, but I couldn’t find specific availability information for X and Y before the end of August 2024. To identify two available time slots for a 1-hour meeting, I recommend using the scheduling feature within Microsoft 365 to view their calendars and find slots that align with your working hours and time zones. If you need assistance with scheduling or using the features, please let me know how I can help further.Could you suggest a rewording of the Prompt or help me understand the answers?Thanks Matthieu Read More
Combine two queries
I need to combine these two queries to receive one result:
Here is the first query
with cte as (
select ID,
assessmentdate,
Jurisdiction,
name,
studentid,
submitdate,
count(*) over (partition by studentid) as dup_count
from tblTest
)
Select m.assessmenttype, Count(m.studentid) As referredforassessment
From tblProfile m
Inner Join cte s on
m.studentid = s.studentid
Where dup_count > 1
and s.SubmitDate between ’06/01/2024′ and ’06/30/2024′
and countyid = 6
Group by assessmenttype
Order by assessmenttype
Here are the results from this query:
assessmenttype
referredforassessment
2
3
3
1
7
1
Here is the second query:
select assessmenttype,
SUM(CASE WHEN referredforassessment = 1 THEN 1 ELSE 0 END) as referredforassessment
from tblProfile
where SUBMITDATE >= ’06/01/2024′ and SUBMITDATE < ’06/30/2024′ and countyid = 6
Group By assessmenttype
order by assessmenttype
Here are the results from the second query:
assessmenttype
referredforassessment
2
2
4
1
Here are my desired results:
assessmenttype
referredforassessment
2
5
3
1
4
1
7
1
I need to combine these two queries to receive one result: Here is the first query with cte as (
select ID,
assessmentdate,
Jurisdiction,
name,
studentid,
submitdate,
count(*) over (partition by studentid) as dup_count
from tblTest
)
Select m.assessmenttype, Count(m.studentid) As referredforassessment
From tblProfile m
Inner Join cte s on
m.studentid = s.studentid
Where dup_count > 1
and s.SubmitDate between ’06/01/2024′ and ’06/30/2024′
and countyid = 6
Group by assessmenttype
Order by assessmenttype Here are the results from this query:assessmenttypereferredforassessment233171 Here is the second query:select assessmenttype,
SUM(CASE WHEN referredforassessment = 1 THEN 1 ELSE 0 END) as referredforassessment
from tblProfile
where SUBMITDATE >= ’06/01/2024′ and SUBMITDATE < ’06/30/2024′ and countyid = 6
Group By assessmenttype
order by assessmenttype Here are the results from the second query: assessmenttypereferredforassessment2241 Here are my desired results: assessmenttypereferredforassessment25314171 Read More
Getting the Most Filled Out Cells to the Top – Sort and Filter
I am new to Excel and learning how everything works, but I need to figure out how to get the rows with the most filled-in cells to the top of my sheet.
For more information – we keep track of our inventory in an excel document. I assign order numbers and customer names to the correct product as we get orders. Once the item has shipped I add the ship date to one of the columns and then have to move the whole row to a different sheet. I just need to figure out how to get the rows that have shipped to the top of the sheet each day so I can move them all at once to the new sheet.
I am new to Excel and learning how everything works, but I need to figure out how to get the rows with the most filled-in cells to the top of my sheet. For more information – we keep track of our inventory in an excel document. I assign order numbers and customer names to the correct product as we get orders. Once the item has shipped I add the ship date to one of the columns and then have to move the whole row to a different sheet. I just need to figure out how to get the rows that have shipped to the top of the sheet each day so I can move them all at once to the new sheet. Read More