# Dijkstra's Shortest Path Algorithm

Jan 8, 2007

Here it is, the long lasted algorithm I promised.., -- delete previous map
exec dbo.uspdijkstrainitializemap

-- create a new map
exec dbo.uspdijkstraaddpath 'a', 'b', 4
exec dbo.uspdijkstraaddpath 'a', 'd', 1
exec dbo.uspdijkstraaddpath 'b', 'a', 74
exec dbo.uspdijkstraaddpath 'b', 'c', 2
exec dbo.uspdijkstraaddpath 'b', 'e', 12
exec dbo.uspdijkstraaddpath 'c', 'b', 12
exec dbo.uspdijkstraaddpath 'c', 'f', 74
exec dbo.uspdijkstraaddpath 'c', 'j', 12
exec dbo.uspdijkstraaddpath 'd', 'e', 32
exec dbo.uspdijkstraaddpath 'd', 'g', 22
exec dbo.uspdijkstraaddpath 'e', 'd', 66
exec dbo.uspdijkstraaddpath 'e', 'f', 76
exec dbo.uspdijkstraaddpath 'e', 'h', 33
exec dbo.uspdijkstraaddpath 'f', 'i', 11
exec dbo.uspdijkstraaddpath 'f', 'j', 21
exec dbo.uspdijkstraaddpath 'g', 'd', 12
exec dbo.uspdijkstraaddpath 'g', 'h', 10
exec dbo.uspdijkstraaddpath 'h', 'g', 2
exec dbo.uspdijkstraaddpath 'h', 'i', 72
exec dbo.uspdijkstraaddpath 'i', 'f', 31
exec dbo.uspdijkstraaddpath 'i', 'j', 7
exec dbo.uspdijkstraaddpath 'i', 'h', 18
exec dbo.uspdijkstraaddpath 'j', 'f', 8

-- resolve route
exec dbo.uspdijkstraresolve 'a', 'i'This is the outputFromToCost
----------
ab 4
bc 6
cj18
jf26
fi37

Peter Larsson
Helsingborg, Sweden

ADVERTISEMENT

## EXPERT: Implement Dijkstra's Algorithm -&> Need Lots Of Help Implementing!

Jan 9, 2008

This is such a complex question and I'm 99.9% sure it requires usage of Dijkstra's algorithm in order to determine the shortest path. :(I have tried to build this myself (yes, I've viewed enough examples on the web, but since they dont exactly do what I want AND I'm rather new to this advanced SQL AND my boss would really like this asap I feel forced to call upon the community)Basically I need a query which analyzes the relationships between 2 persons and returns the shortest path(S!) I have provided the data that is required to perform any tests below. The example I provide match with the given data.I know for sure that such a query has been written before since for example LinkedIN uses something similar...so if anyone has this off the shelf for me great!If not, I would really really appreciate it if someone could provide a completely worked out example. I'll even give special thanks to that person on our future website :)So, many thanks ahead for whoever takes up this challenge! :)CASE:-----------------------------------------------------------------------------I have tables with friend relationships and tables with userdata.Lets say im logged in as Peter (usercode 5).Now if I (as user Peter) view the profile of Andre (usercode 51), I want to determine the relationship that exists between me and Andre.When the users would have a direct relationship, eg. between Peter (5) and John (6)  I want returned:col1 col2 col3     col4 5     Peter 6     JohnWhen the users would have a indirect relationship, witch EXACTLY 1 person in between, like between John (6) and Jack (48).So I can go from John to Jack in exactly 2 steps via multiple persons, in this case I want the following rows returned (max 4):col1 col2 col3     col4 col5     col6 6     John 11     Hans 48     Jack6     John 15     Hans 48     JackWhen the users would have a indirect relationship, witch MORE than 1 persons in between, like between Peter (5) and Andre (48), I want returned:col1 col2 col3     col4 col5     col6 col7    col85     Peter 11     Hans 48     Jack 51     AndreIn any case when there are multiple paths from person A to person B, I only want the shortest paths returned to a maximum of 4Since this query will be called may times by different users at the same time concurrency issues also need to be taken into account (e.g. usage of temp tables)with the entire query the maximum amount of steps that should be checked is 6, so maximum 6 persons in between 2 persons.So if a viewed user is more than 6 steps away from the viewing user I want no results returned.E.g. when Peter (5) views the profile of Simon (7), no relationship exists through any other person, and an empty dataset should be returned.-----------------------------------------------------------------------------I have the following tables and data:CREATE TABLE [dbo].[tblFriends](    [UserCodeOwner] [int] NOT NULL,    [UserCodeFriend] [int] NOT NULL,    [createdate] [datetime] NOT NULL CONSTRAINT [DF_tblFriends_createdate]  DEFAULT (getdate())) ON [PRIMARY]CREATE TABLE [dbo].[tblUserData](    [UserID] [uniqueidentifier] NOT NULL,    [UserCode] [int] IDENTITY(1,1) NOT NULL,    [UserName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,    [DisplayName] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,) ON [PRIMARY] INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (5,'peter',':-D Peter ;-)') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (6,'john','J ;-)') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (7,'simon','Simon :-D') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (11,'hans','Hans :-)') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (15,'Jane','Jane3') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (28,'jean','jean') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (48,'Jack','Jack') INSERT INTO tblUserdata (UserCode,UserName,DisplayName) VALUES (51,'Andre','Andre') INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (5,11) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (5,6) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (6,11) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (6,5) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (6,15) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (7,28) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (11,6) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (11,5) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (11,15) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (11,48) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (15,6) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (15,11) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (15,48) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (28,7) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (48,11) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (48,51) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (48,15) INSERT INTO tblFriends (UserCodeOwner,UserCodeFriend) VALUES (51,48)

## Help: Shortest Path In Sql

Jun 4, 2007

Hello to all,
help, help,...
i have with this problem since 3 weeks, until now i cann't resolve this problem. Maybe can somebody help me. I am hopeless.
i have a data table ValidRelationship, i will check if there is a relationship between two members by this table.
datas in the table ValidRelationship:
IDMember                 IDOtherMember           IDType

3700
3726
10000

3726
3700
10000

3742
3672
10000

3672
3742
10000

3422
3548
10000

3548
3422
10000

3548
3717
10000

3717
3548
10000

3675
3695
10000

3695
3675
10000
I will give two member and check their Relationship with a sql query. but it can be that this two member have no relationship. So i define here that man should search processor <= 6 . To better describe i use a example: max. Result of this query is: 1-2-3-4-5-6. If this is a relationship between 1-7 is 1-2-3-4-5-6-7, but i will give a answer that  this is no relationship between 1-7. because processor > 6.
But my problem is: this query executing is too slow. if i habe two member no relationship, the time of this complete sql query to execute is more than 1 minutes. Is my algorithm wrong, or where is the problem, why this executing is so slow? How can i quickly get the relationships between two member, if my algorithms is not right? The following Query is only to processor = 3, but it works too slowly, so i don't write remaining processors.
declare @IDM int;
declare @IDO int;
set @IDM = 3418;
set @IDO = 4270
select top 1 IDMember
from v_ValidRelationships
where IDMember = @IDM
and @IDO in (select a.IDOtherMember from v_ValidRelationships as a where a.IDMember = @IDM)

select top 1 a.IDMember, b.IDMember
from v_ValidRelationships as a, v_ValidRelationships as b
where a.IDMember = @IDM
and b.IDMember in (select c.IDOtherMember from v_ValidRelationships as c where c.IDMember = @IDM)
and @IDO in (select d.IDOtherMember from v_ValidRelationships as d where d.IDMember = b.IDMember )

select top 1 a.IDMember, b.IDMember, e.IDMember
from v_ValidRelationships as a, v_ValidRelationships as b, v_ValidRelationships as e
where a.IDMember = @IDM
and b.IDMember in (select c.IDOtherMember from v_ValidRelationships as c where c.IDMember = @IDM) and e.IDMember in (select f.IDOtherMember from v_ValidRelationships as f where f.IDMember = b.IDMember)
and @IDO in (select d.IDOtherMember from v_ValidRelationships as d where d.IDMembe = e.IDMember)

If someone has a idea, please help me. Thank a million
Best Regards
Shasha

## Path Finding Algorithm In SQL

Dec 22, 2007

I am on this project that will search an optimal route for user from starting point to his/her destination on a map in my SQL Server 2005. I hv create two versions to test out the performance of the path finding algorithm. I have a few classes, which are:

PriorityQueue class which is implemented as List() object and plus codes to sort them in order
PathNode class which are instances for the nodes of the search tree with information on heuristics value
DataSource class which stores data retrieved from the SQL Server 2005 into the RAM for faster execution of the path finding
PathFinding class which implements the path searching algorithm (based on A* algorithm), with PriorityQueue as the openlist, List() object as the closedlist, PathNode as the nodes in both the list to store information and lastly retrieve data from DataSource object that loads the whole table from SQL Server 2005In the first version, i simply use SELECT query to retrieve every correspondent nodes data from the SQL Server 2005 which makes the performance very low which i hv used SQL Server Profiler to check. Next, i use the current version to load all the data into my RAM to increase the execution, which has successfulyl achieved <1sec as opppsed to the 1st version ~8secs.

Now, my problem is to port the algorithm part to my SQL Server 2005 as SQL CLR integration to achieved better results withour the need to burden on client PC. My question is how am i going to do this? I tried before, and several erros like i need to serialize my current PathNode class and i did it. Do i need to make all class into UDT compatible? or??

Thank you very much.

## Dijkstra's Algoritm Problem

Mar 5, 2007

I want to make it possible that I can see the path from one user to another and via whom the route went:I want to pass the startnode and the endnode and then retreive the route between them.In case I go from 5 to 15 (see table below), I want to have the following returned:5-6-155-7-15In case I go from 5 to 18 I want to have returned:5-6-15-9-185-7-15-9-18always up to a maximum distance of 6 steps.I have the following table definitiontblFriendsOwnerCode  intFriendCode intthis table contains content like:

5
6

5
11

5
7

6
5

6
12

6
15

6
11

7
15

7
5

9
15

9
18

11
5

11
6

12
6

13
6

15
6

15
7

15
9

18
9
As you can see, I store each relationship twice.I have created the following SP to retreive the info, but dont know how I can get from these results to the results I desire as described above....STORED PROCEDURE
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo
ALTER PROCEDURE [dbo].[myspShortestPath]--shortest path based on algorythm of Dijkstra @ViewingUserCode int, @ViewedUserCode int, @MaxDistance int=100, @MinDistance intASBEGIN
-- Automatically rollback the transaction if something goes wrong.        SET XACT_ABORT ON        BEGIN TRAN        -- SET NOCOUNT ON added to prevent extra result sets from    -- interfering with SELECT statements.    SET NOCOUNT ON;
-- Create a temporary table for storing the estimates as the algorithm runs    CREATE TABLE #UserList    (        UserCode Int NOT NULL,    -- The City Id  UserName nvarchar(50),        Estimate Int NOT NULL,    -- What is the distance to this city, so far?        Predecessor nvarchar(max),    -- The city we came from to get to this city with this distance.  PredecessorCodes nvarchar(max),        Done bit NOT NULL        -- Are we done with this city yet (is the estimate the final distance)?    )
-- Fill the temporary table with initial data    INSERT INTO #UserList (UserCode, UserName, Estimate, Predecessor,PredecessorCodes, Done)    SELECT UserCode, UserName, 2147483647, '', '', 0 FROM tblUserData
-- Set the estimate for the city we start in to be 0.    UPDATE #UserList SET Estimate = 0 WHERE UserCode = @ViewingUserCode    IF @@rowcount <> 1    BEGIN        RAISERROR ('Couldn''t set start user', 11, 1)         ROLLBACK TRAN                RETURN    END
DECLARE @FromUser Int, @CurrentEstimate Int,@FromUserName nvarchar(50)
-- Run the algorithm until we decide that we are finished    WHILE 1=1    BEGIN        -- Reset the variable, so we can detect getting no records in the next step.        SELECT @FromUser = NULL
-- Select the UserCode and current estimate for a city not done, with the lowest estimate.        SELECT TOP 1 @FromUser = UserCode, @FromUserName = UserName, @CurrentEstimate = Estimate        FROM #UserList WHERE Done = 0 AND Estimate < 2147483647                        -- Stop if we have no more unvisited, reachable cities.        IF @FromUser IS NULL BREAK
-- We are now done with this city.        UPDATE #UserList SET Done = 1 WHERE UserCode = @FromUser
-- Update the estimates to all neighbour cities of this one (all the cities        -- there are roads to from this city). Only update the estimate if the new        -- proposal (to go via the current city) is better (lower).        UPDATE #UserList SET #UserList.Estimate = @CurrentEstimate + 1,            --keep the other predecessors as well   #UserList.Predecessor = replace(@FromUserName, ' ', '')+','+#UserList.Predecessor,   #UserList.PredecessorCodes = replace(str(@FromUser), ' ', '')+','+#UserList.PredecessorCodes        FROM #UserList INNER JOIN tblFriends ON #UserList.UserCode = tblFriends.UserCodeFriend        WHERE tblFriends.UserCodeOwner = @FromUser AND (@CurrentEstimate + 1) <= #UserList.Estimate     END
SELECT ud1.UserName AS UserNameFriend,ud1.UserCode, Estimate AS Distance, PredecessorCodes, Predecessor  FROM #UserList    INNER JOIN tblUserData ud1 ON #UserList.UserCode = ud1.UserCode WHERE #UserList.Estimate<=@MaxDistance AND #UserList.Estimate>=@MinDistance ORDER BY Distance ASC        -- Drop the temp table.    DROP TABLE #UserList        COMMIT TRAN
END

## T-SQL (SS2K8) :: How To GROUP BY With Shortest Distance By Account Number

Mar 11, 2014

Given the following example;

declare @CustIfno table (AccountNumber int, StoreID int, Distance decimal(14,10))
insert into @CustIfno values ('1','44','2.145223'),('1','45','4.567834'),
('1','46','8.4325654'),('2','44','7.8754345'),('2','45','1.54654323'),
('2','46','11.5436543'), ('3','44','9.145223'),('3','45','8.567834'),
('3','46','17.4325654'),('4','44','7.8754345'),('4','45','1.54654323'),
('4','46','11.5436543')

How can I show the shortest Distance by AccountID and StoreID. Results would look like this;

AccountNumberStoreID Distance
1 44 2.1452230000
2 45 1.5465432300
3 45 8.5678340000
4 45 1.5465432300

## Subject: BCM Install Error - Logfile &&amp; SQL Path Path &&amp; MSSQL.1?

Apr 16, 2008

When trying to install Business Contact Manager (BCM) for Outlook 2007, the setup failed and I was refered to a log file in my Local Settings/Temp folder. The log actually says that Business Contact Manager was installed sucessfully! BCM is supposed to install SQL Express 2005 as an instance or as instance if SQL Express is already installed. There is an MSSMLBIZ instance in Services..

Who can I send the Log File to for analysis and the fix feedback?

When I first went into Computer Management and clicked on Services and Applications in the left panel, the error message appeared "Snap-in failed to intialize. Name: SQL Server Configuration Manager CLSID:{CA9F8727-31DF-41D2-975C-887D84903967} This message diappeared when I clicked on Services and Applications again. Under Services, there are 3 SQL services - one is an application that was uninstalled 3-4 weeks ago and I disabled this service. The other 2 are: SQL Server (MSSMLBIZ) and the other one is SQL Server (SQLEXPRESS) When I tried to start either of the last 2, the message appeared: Services "Could not start the SQL Server (MSSMLBIZ) service on Local Computer. Error 3: The system cannot find the path specified. Under Program Files/Microsoft SQL Server/MSSGL.1 folder is mostly empty. So, it seems like the Path in the Registry is not valid and that nothing is being installed in the MSSQL.1 folder. If so, how do I fix this?

How do I get the BCM SQL instance to install and run properly? what do the messages in Services mean and how do I resolve these.

Thank you!

Gary

## SQL Server Not Starting - Tempdb Path Updated To Wrong Path

Oct 4, 2007

After updating TempDB path to a wrong path (without file name only folder name) the service is not starting. How can i sovle this and start the service

thanks

Leena

## Algorithm

May 22, 2002

Does any have a algorithm that can divide A into B without using the divide
sign (/) or the multiplication sign ( * ).

## What Is The Best Algorithm To Use?

Nov 24, 2006

I am new to DM and I am not sure which algorithm would be best to use.

I am trying to build a custom comparitor application that companies can use to compare themselves against other companies based on certain pieces of information. I need to group a company with 11 other companies based on 6 attributes. I need the ability to apply weightings to each of the 6 attributes and have those taken into consideration when determining which 10 other companies each company is grouped with. Each group must contain 11 members, the company for the user logged in and 10 other companies that it will be compared against.

At first I thought that clustering would be a good fit for this but I can not see a way to mandate that each cluster contain exactly 11 members, I cannot see a way to weight the inputs, and I think each company can only be in one cluster at a time which do not meet my requirements.

Any help will be greatly appreciated!

## Algorithm

Jun 8, 2006

Well, i have read in claude seidman book about data mining that some algorithm inside in microsoft decision tree are CART, CHAID and C45 algorithm. could anyone explain to me about the tree algorithm and please explain to me how the tree algorithm used together in one case?

thank you so much

## Luhn Algorithm

Dec 11, 2006

Use this to check if Luhn has valid check digitCREATE FUNCTIONdbo.fnIsLuhnValid
(
@Luhn VARCHAR(8000)
)
RETURNS BIT
AS

BEGIN
IF @Luhn LIKE '%[^0-9]%'
RETURN 0

DECLARE@Index SMALLINT,
@Multiplier TINYINT,
@Sum INT,
@Plus TINYINT

SELECT@Index = LEN(@Luhn),
@Multiplier = 1,
@Sum = 0

WHILE @Index >= 1
SELECT@Plus = @Multiplier * CAST(SUBSTRING(@Luhn, @Index, 1) AS TINYINT),
@Multiplier = 3 - @Multiplier,
@Sum = @Sum + @Plus / 10 + @Plus % 10,
@Index = @Index - 1

RETURN CASE WHEN @Sum % 10 = 0 THEN 1 ELSE 0 END
END
Peter Larsson
Helsingborg, Sweden

## BINARY_CHECKSUM Algorithm

Jul 23, 2005

Hello,Do you know if the algorithm for the BINARY_CHECKSUM function in documentedsomewhere?I would like to use it to avoid returning some string fields from theserver.By returning only the checksum I could lookup the string in a hashtable andI think this could make the code more efficient on slow connections.Thanks in advanced and kind regards,Orly Junior

## Algorithm Of The MAX Command In T-SQL

Dec 7, 2007

What kind of algorithm does the MAX command uses? I have a table that I need to get the last value of the Transaction ID and increment it by 1, so I can use it as the next TransID everytime I insert a new record into the table. I use the MAX command to obtain the last TransID in the table in this process. However, someone suggested that there is a problem with this, since if there are multiple users trying to insert a record into the same table, and processing is slow, they might essentially come up with the same next TransID. He came up with the idea of having a separate table that contains only the TransID and using this table to determine the next TransID. Will this really make a difference as far as processing speed is concerned or using a MAX command on the same table to come up with the next TransID enough? Do you have a better suggestion?

Thanks

## Neural Net Algorithm

Sep 15, 2006

Hi,

Would anyone be able to provide a reference paper on the neural net algorithm implemented in SQL Server 2005 to better understand how it works?

Thanxs for any info.

## Clustering Algorithm

Oct 29, 2007

Hi All!

I have few questions regarding Clustering algorithm.

If I process the clustering model with Ks (K is number of clusters) from 2 to n how to find a measure of variation and loss of information in each model (any kind of measure)? (Purpose would be decision which K to take.)

Which clustering method is better to use when segmenting data K-means or EM?

Thanks in advance!

## C# Algorithm/ Libraries

Jan 10, 2006

Hi.

Does anyone know of or where I can find implementation of these C#  algorithm /class libraries:

a) RLS - Recursive Least Square algorithm?

b) MWAR - Multi-resolution Wavelet Auto-regresive algorithm?

c) AR - Autoregresive moving awerage algorithm?

d) EWMA - Exponentially Weighted Moving Average

The .NET framework System.Math class do not seem to have these libraries.

Regards

Shorin

## Which Algorithm Is Best For Perdiction

Jul 12, 2006

Hi

I want to predict which product can be sold together , Pl help me out which algorithm is best either association, cluster or decision and pl let me know how to use case table and nested table my table structure is

Cust_ID
Age
Product
Location
Income

Thanks
Rajesh Ladda

## Problem With AES_256 Algorithm

Feb 14, 2008

hi,
i am using sqlserver2005 as back end for my project.
actually we developing an stand alone web application for client, so we need to host this application in his server. he is not willing to install sql server 2005 edition in his sever so we r going by placing .mdf file in data directory of project.

but before i developed in server2005 i used aes_256 algorithm to encrypt n decrypt the pwd column by using symmetric keys.it is working fine.

but when i took the .mdf file of project n add into my project it is throwing error at creation of symmetric key that
"Either no algorithm has been specified or the bitlength and the algorithm specified for the key are not available in this installation of Windows."

please suggest me a solution

## Developing A New Plug-in Algorithm

Feb 7, 2008

Hi,

i'm making my master thesis about a new plug-in algorithm, with the LVQ Algorithm.
I make the tutorial with the pair_wise_linear_regression algorithm and i have some doubts. i was searching for the code of the algorithm in the files of the tutorial and i didn't saw it. I have my new algorithm programmed in C++ ready to attach him, but i don't know where to put him, in which file i have to put him to start to define the COM interfaces? And in which file is the code of the pair_wise_linear_regression algorithm in the SRC paste of the tutorial?

Thanks

## Algorithm : Data Mining

Feb 26, 2007

Hello friends,

Can u give some idea about the Algorithm in Data Mining for Clustering..

Please reply...

## Time Series Algorithm

Aug 17, 2006

I am trying to predict Revenue gererated by each Person.
My Input like this:

Month Person Revenue

-----------------------------------------
20050101 Person1 \$1000
20050101 Person1 \$2000
20050201 Person1 \$1000
20050101 Person2 \$5000
20050201 Person2 \$2000
20050201 Person2 \$3000

Obviosly for Person1 and 200501 I expect to see on MS Time Series Viewer \$3000, correct?
Instead I see REVENUE(actual) - 200501 VALUE =XXX,
Where XXX is absolutly different number.

Also there are negative numbers in forecast area which is not correct form business point
Person1 who is tough guy tryed to shoot me.
What I am doing wrong. Could you please give me an idea how to extract correct
historical and predict information?

Thnak you,
Tim.

## Which Algorithm To Be Used With Symmetric Keys

Mar 28, 2006

Hi,

I want to create a symmetric key that will be encrypted by certificate key. Can u guide me which algorithm is best out of the following:

DES, TRIPLE_DES, RC2, RC4, RC4_128, DESX, AES_128, AES_192, AES_256.

I tried using AES_128, AES_192, AES_256 but it says 'the algorithm specified for the key are not available in this installation of Windows.'

Pls tell me which else algorithm is best to use and pls specify why.

Thanks

Gaurav

## Which Algorithm Is Better For Customer Retention

Jul 25, 2006

Hi

Pl any one tell me which algorithm is better for Customer retention Using SQL server 2005 analysis services

It will be great if some one can give the same with example of data model with key column , and rest

Thanks in Advance

Rajesh Ladda

## Questions About Microsoft_Linear_Regression Algorithm

Jul 2, 2007

Currently I want to run a vanilla multivariate regression and get some statistics back about the regression that is built. For instance, besides the coefficients, I also want the two-sided p-values on the coefficients and the R2 of the model.

I've tried playing with the Microsoft_Linear_Regression algorithm and have run into two issues. I'm doing all this programmatically using DMX queries rather than through the BI studio.

(a) I can never get the coefficients from the regression to match with results I would get from running R or Excel. The results are close but still significantly off. I suspect this is because the Linear Regression is just a subset of the Decision/Regression Trees functionality, in which case some kind of Bayesian prior is being incorporated here. Is that the issue? And if so, is there some way to turn off the Bayesian scoring and get a vanilla multivariate regression? I don't see anything in the inputs to the linear regression that would let me do this, and even running Microsoft_Decision_Trees with a few different settings, I can't get the output I'm looking for. If there's no way to turn off the Bayesian scoring, can someone explain to me what the prior being used here is and how Bayesian learning is being applied to the regression?

(b) Using the Generic Tree Viewer, I see that there are a few "statistics" values in the Node_Distribution, but I'm not sure what they're referring to. One of them looks like it might be the MSE. I could play with this some more to find out, but I'm hoping someone here can save me that work and tell me what these numbers are. Hopefully they will constitute enough information for me to rebuild the p-values and the R2.

Thanks!

Wilfred

## How To To Develope A New PlugIN Algorithm

Oct 18, 2006

I have a code for Nearest neighbour algorithm, I want to build a datamining algorithm using that code..

I have the following link that includes the source code for a sample plug-in algorithm written in C#.

(managed plug-in framework that's available for download here: )http://www.microsoft.com/downloads/details.aspx?familyid=DF0BA5AA-B4BD-4705-AA0A-B477BA72A9CB&displaylang=en#DMAPI.

But i am confused on where to insert my algorithm logic?

## Association Algorithm Itemsets

Jan 20, 2007

What is the algorithm that generates the itemsets in the Association model? I'm looking to possibly use this part of the Association algorithm (i.e. the grouping into itemsets) in a separate plug-in algorithm.

## Time Series Algorithm

Jan 18, 2007

Hi Jamie:

I am building data mining models to predict the amount of data storage in GB we will need in the future based on what we have used in the past. I have a table for each device with the amount of storage on that device for each day going back one year. I am using the Time Series algorithm to build these mining models. In many cases, where the storage size does not change abruptly, the model is able to predict several periods forward. However, when there are abrupt changes in storage size (due to factors such as truncating transaction logs on the database ), the mining model will not predict more than two periods. Is there something I can change in terms of the parameters the Time Series Algorithm uses so that it can predict farther forward in time or is this the wrong Algorithm to deal with data patterns that have a saw tooth pattern with a negative linear component.

Thanks,

## Help With Setting Algorithm Paramteres

May 28, 2006

I was walking through the Text Mining example - which at one step required me to set Algorithm Parameters - MAXIMUM_OUTPUT_ATTRIBUTES=0. When I tried that the project would not build giving an error -
Error (Data mining): The 'MAXIMUM_INPUT_ATTRIBUTES' data mining parameter is not valid for the 'XYZ' model.

I was getting the same error when I tried to set it for Microsoft_neural_netowrk - Hidden_Node_ratio. When I do a properties from "set Algorithm Properties" from Mining Model, I do not see these properties set as default.

I have installed SQLServer 2005 Standard Edition Microsoft SQL Server Management Studio 9.00.1399.00
Microsoft Analysis Services Client Tools 2005.090.1399.00

Any help would be much appreciated.

Thanks
Rajeev Gupta

## Problem With Picking The Right Algorithm

Feb 8, 2007

Hi

I'm using SQL Server 2005. The problem I have is as follows. I have several production lines and as with everything parts in the line tend to break. I have data from all the breaks that occurred in the last 2 years. What I want to do is predict the next break and the production line it's going to happen on. I would also like to go to a future date and check what possible breaks might occur on that date. I've run quite a few models but none of them helps me with future events. I think I might be using the wrong algorithm or I€™m just not doing it right. If somebody can please suggest an algorithm and maybe help me with a web site that has a tutorial similar to my problem

Thanks
Elmo

## Process Association Algorithm Using ISS

Feb 20, 2008

Hi!

I need to deploy several Association algorithms, so I want to do it using ISS. Can anyone help me telling me which task should I have to use to do it?

Thanks!

Ezequiel

## Any Other Plugin Algorithm Developed??

Sep 19, 2006

hi,

as we know we get clustering algorithm with managed plugin algorithm API

does anyone have developed any other plugin algorithm as i want to check what are the things that needs to be modified. i am not data mining algorithm developer but i just want to check where we have to make changes. i would be better if i get source code for algorithm other than clustering

ANOTHER PLUGIN ALGORITHM REQURIED??

thanks in advanced

## Association Rules Algorithm, Help?

Nov 22, 2007

I need to create a set of cases for a project that uses the Microsoft Association Rules algorithm to make recommendations for products to customers. My question is: the set of scenarios must include all transactions of customers for training?. or is it sufficient some percentage of total transactions? If i do not use all transactions of customers, could be that the algorithm does not consider some products in their groups or rules and could not make recommendations about these?

thanx
Diego B.

Copyrights 2005-15 www.BigResource.com, All rights reserved