Showing posts with label regarding. Show all posts
Showing posts with label regarding. Show all posts

Wednesday, March 21, 2012

LogRegHelper - "A scorecard for Logistic Regression models" does not match Logistic Re

Hello,

This question is regarding the LogRegHelper - "A scorecard for Logistic Regression models" example in sqlserverdatamining Tips and Tricks page. I launched TestLogReg (Analysis Services Database associated with the project) and ran Logistic Regression over that. While the LogReg shows the highest score for IQ (107 - 121), a score of 558, the Logistic Regression shows that Parent Encouragement has the highest score for the case College Plans = 'Plans to Attend'. Can someone verify this and clarify?

I have a few other questions with LR

- In SQL Server 2005 LR Mining Model Viewer "favors" chart, what algorithm is used for generating Scores?

- Can I use this score as a feature selector? Higher score => stronger predictor (input)

- Is the coefficient weight algorithm used in LogReg wrong ?

Thanks

MA

Hi

I guess most of the questions were addressed in this post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1774831&SiteID=1

I will check the LogregHelper stored proc and come back with an answer shortly. However, the most probable cause is that the two attributes (Parent Encouragement and IQ) have relatively close scores / coefficients.

sql

Friday, March 9, 2012

Login/User problems after restore

:confused:

I have a question regarding SQLSERVER. I have 2 systems, production and development. I have restored a copy of the production database into the develeopment server to do some testing but am now having problems connecting to the database.

The issue
======

The database tables in the restored database are owned by a user HEATPROD in production and are stiil owned by that user after the restore. The USERS tab in SQL Server Enterprise Manager for this database does not show the user HEATPROD although the TABLES tab shows that user as owning the tables.

I have created the LOGIN of HEATPROD but am not able to grant this login access to the restored database as I get the error "ERROR 15023: USER OR ROLE HEATPROD ALREADY EXISTS IN THE CURRENT DATABASE".

An attemp to login as the HEATPROD user and access the new database generates the following error "SERVER USER HEATPROD IS NOT A VALID USER IN DATABASE DBATESTDB" however attempts to add this user to the database generate the 15023 error above.

Any suggestion on how to link the LOGIN to the USER and thus gain access to the database would be much appreciated.

TIAIt sounds as if you have an "orphaned user" in your database called HEATPROD.

To check this run the following

Use <Insert DB Name>
go
Select suid, name from sysusers
where name = 'HEATPROD'

If it does exist you need to delete it from this table.
To do that run the following ....

Use <Insert DB Name>
go
sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
go
delete from sysusers where name = 'HEATPROD'
go
sp_configure 'allow updates', 0
RECONFIGURE WITH OVERRIDE
go

When you have deleted the user, Refresh your database through Enterprise Manager.

You can now add the user to your database .... providing a login exists of course.

Hope this helps

P.C. Vaidyanathan|||The problem is that in the master database there is no user with that name.
This can happen when you restore a dabase to another server or domain. Look at microsoft for the solution Q218172|||Running

EXEC sp_change_users_login 'Auto_Fix', 'HEATPROD'

Should do the trick if you are running sql server authentication

Rosko|||Thanks,

It worked as suggested.:)|||This is a script I use to correct logins after restoring from one server to another. The results can be copied to the active pane (where you can run the script) to fix all orphaned users for the database in question.

select 'sp_change_users_login @.Action = ' + char(39) + 'auto_fix' +
char(39) + ', @.usernamepattern = ' + char(39) + name + char(39) + char(13) + 'go'
from sysusers
where issqluser = 1 and (sid is not null and sid <> 0x0)
and suser_sname(sid) is null
order by name

Hope this helps.

Rory