Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Thursday, March 8, 2012

continuous variable prediction

Hi All,

I was wondering if there was a way to specify a range when training a model to predict continuous variables. For instance, the predicted variable can only have a range of 1 - 10.

Thanks

Not really, and it's possible that even if you restrict the training data to the range 1-10 you can end up with predictions outside that range (e.g. if you found x=2y and put 8 as your input).

What you can do is use VBA or Excel MIN/MAX functions on your prediction result. For example you can call

SELECT [MAX]( [MIN]( Predict(MyColumn), 10), 1)

FROM MyModel

PREDICTION JOIN ...

Sunday, February 12, 2012

constraint view

Hi,

I want to know which table my foreign is reference to

for instance I have this statement

ALTER TABLE BANK ADD CONSTRAINT BANKING_R_154 FOREIGN KEY (
COM_CODE ,
ACCOUNT_CODE ) references BANK_GLT

I want execute ine select * from information_schema.I_don't_know

to get the table BANK_GLT from constraint BANKING_R_154

How can I do this?

cheers,

Alessandro

Select * from INFORMATION_SCHEMA.Referential_Constraints RC

INNER JOIN INFORMATION_SCHEMA.Constraint_Column_usage CCU

ON RC.Constraint_Catalog = CCU.Constraint_Catalog AND

RC.Constraint_Schema = CCU.Constraint_Schema AND

RC.Constraint_Name = CCU.Constraint_Name

Where Table_Name = 'SomeTable' --for a table, use Constraint_Name for querying on Constraint Names
--

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Thanks,

but, I would like to know which table my tables is reference to and which columns as well

cheers,