Classification Tree – Craters on Mars
A study was conducted to collect the main information on the size, positions and structures of the craters on Mars. This study was created by Stuart Robbins and contains overall 378540 craters.
A decision tree analysis was conducted to test relationships among a series of explanatory variables and a binary, categorical response variable, i.e. the number of azimuthal layers in the crater.
Latitude and longitude estimation of the position of the crater in decimal degrees, its diameter and the average elevation of the crater were used as explanatory variables. 199 samples were used as training samples for the tree.
The average elevation of the crater was used as inital variable: with a reference value less than 0.015 km. Among the craters satisifying this relation, 147 were identified to have a dimeter less than 2.91 km. 146 of these craters are located at latitudes less than 65 deg.
Among the craters with average elevation greater than 0.015 km, 37 have a dimeter greater than 6.9 km. Among these craters, 23 are located at longitudinal angles less than -17 deg.
----------------------------------------------------------------------------------------------------------
Code
---------------------------------------------------------------------------------------------------------
# -*- coding: utf-8 -*-
"""
"""
# -*- coding: utf-8 -*-
from pandas import Series, DataFrame
import pandas as pd
import numpy as np
import os
import matplotlib.pylab as plt
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import classification_report
import sklearn.metrics
os.chdir(".")
"""
Data Engineering and Analysis
"""
#Load the dataset
AH_data = pd.read_csv("DataSet_marscrater_pds_reduced.csv")
data_clean = AH_data.dropna()
data_clean.dtypes
data_clean.describe()
"""
Modeling and Prediction
"""
#Split into training and testing sets
# Select predictors for current model
# exlcude predictors not needed 'CRATER_ID','CRATER_NAME' 'MORPHOLOGY_EJECTA_1','MORPHOLOGY_EJECTA_2','MORPHOLOGY_EJECTA_3'
predictors =data_clean[['LATITUDE_CIRCLE_IMAGE','LONGITUDE_CIRCLE_IMAGE','DEPTH_RIMFLOOR_TOPOG','DIAM_CIRCLE_IMAGE']]
# use targets DEPTH_RIMFLOOR_TOPOG
targets = data_clean.NUMBER_LAYERS
pred_train, pred_test, tar_train, tar_test = train_test_split(predictors, targets,test_size=0.98)
print(pred_train.shape)
print(pred_test.shape)
print(tar_train.shape)
print(tar_test.shape)
pred_train.shape
pred_test.shape
tar_train.shape
tar_test.shape
#Build model on training data
classifier=DecisionTreeClassifier()
classifier=classifier.fit(pred_train,tar_train)
predictions=classifier.predict(pred_test)
sklearn.metrics.confusion_matrix(tar_test,predictions)
sklearn.metrics.accuracy_score(tar_test, predictions)
#Displaying the decision tree
from sklearn import tree
#from StringIO import StringIO
from io import BytesIO as StringIO
#from StringIO import StringIO
from IPython.display import Image
out = "./tree.txt" # StringIO()
print(out)
dot_data=tree.export_graphviz(classifier)
import pydotplus
import graphviz
#graph=pydotplus.graphviz.graph_from_dot_data(dot_data)
#Image(graph.create_png())
dotfile = StringIO()
tree.export_graphviz(classifier, out_file=dotfile)
graph=pydotplus.graph_from_dot_data(dotfile.getvalue())
graph.write_png("dtree.png")
graph.write_pdf("dtree.pdf")
1 note
·
View note
- Женская зимняя куртка В8523_146 - Цена и размеры: azimuthsport.ru/view_goods/zhenskaya-kurtka-azimuth-b-8523-146-belyj-pid-209588 ______________________________________________________ • Официальный лицензиат бренда Azimuth. • Сертифицированные товары. • Доставка по Москве и МО. • Отправка заказов по СНГ. • Гарантия на товары 30 дней(с момента получения заказа). • Приглашаем партнеров к оптовому сотрудничеству. ______________________________________________________ #azimuthsport #azimuth_official #azimuth #утепленныйкостюм #костюмдляпрогулоксдетьми #гулятьсребенком (at Город Видное) https://www.instagram.com/p/B5pLa8Bo94l/?igshid=14kn72uncav43
0 notes
Symantec (SYMC) At $29.11 Forms Bottom; Cadinha & Co Has Cut By $328,644 Its Intl Business Machines (IBM) Position
Symantec Corporation (SYMC) formed multiple bottom with $26.49 target or 9.00% below today’s $29.11 share price. Symantec Corporation (SYMC) has $18.05 billion valuation. The stock increased 0.48% or $0.14 during the last trading session, reaching $29.11. About 7.58 million shares traded or 28.29% up from the average. Symantec Corporation (NASDAQ:SYMC) has risen 71.82% since December 4, 2016 and is uptrending. It has outperformed by 55.12% the S&P500.
Cadinha & Co Llc decreased Intl Business Machines (IBM) stake by 38.87% reported in 2017Q2 SEC filing. Cadinha & Co Llc sold 2,148 shares as Intl Business Machines (IBM)’s stock declined 15.88%. The Cadinha & Co Llc holds 3,378 shares with $520,000 value, down from 5,526 last quarter. Intl Business Machines now has $143.28B valuation. The stock increased 0.51% or $0.79 during the last trading session, reaching $154.76. About 5.57 million shares traded or 18.67% up from the average. International Business Machines Corporation (NYSE:IBM) has risen 4.86% since December 4, 2016 and is uptrending. It has underperformed by 11.84% the S&P500.
Analysts await International Business Machines Corporation (NYSE:IBM) to report earnings on January, 18. They expect $5.17 EPS, up 3.19% or $0.16 from last year’s $5.01 per share. IBM’s profit will be $4.79B for 7.48 P/E if the $5.17 EPS becomes a reality. After $3.30 actual EPS reported by International Business Machines Corporation for the previous quarter, Wall Street now forecasts 56.67% EPS growth.
Among 31 analysts covering International Business Machines (NYSE:IBM), 10 have Buy rating, 5 Sell and 16 Hold. Therefore 32% are positive. International Business Machines had 111 analyst reports since July 21, 2015 according to SRatingsIntel. KeyBanc Capital Markets maintained the shares of IBM in report on Tuesday, August 22 with “Hold” rating. Credit Suisse maintained it with “Underperform” rating and $110 target in Tuesday, October 18 report. The firm has “Market Perform” rating given on Friday, November 20 by JMP Securities. The stock of International Business Machines Corporation (NYSE:IBM) earned “Hold” rating by Guggenheim on Thursday, July 13. The stock has “Hold” rating by KeyBanc Capital Markets on Wednesday, July 19. The stock of International Business Machines Corporation (NYSE:IBM) earned “Hold” rating by Oppenheimer on Tuesday, July 18. The rating was maintained by Goldman Sachs on Tuesday, September 22 with “Neutral”. The firm has “Neutral” rating by Goldman Sachs given on Tuesday, July 19. Citigroup maintained the stock with “Neutral” rating in Wednesday, October 21 report. The rating was maintained by Stifel Nicolaus on Friday, January 8 with “Buy”.
Investors sentiment decreased to 0.72 in Q2 2017. Its down 0.25, from 0.97 in 2017Q1. It fall, as 100 investors sold IBM shares while 695 reduced holdings. 91 funds opened positions while 484 raised stakes. 530.91 million shares or 0.81% less from 535.24 million shares in 2017Q1 were reported. Capital Rech Glob Investors invested in 0.34% or 7.13M shares. 485,149 are owned by Cibc World Mkts. Vantage Investment Llc invested in 0.24% or 5,437 shares. Psagot House Limited accumulated 661 shares. Axa has invested 0.64% in International Business Machines Corporation (NYSE:IBM). Moreover, Breton Hill Cap Limited has 0.26% invested in International Business Machines Corporation (NYSE:IBM). Afam stated it has 37,282 shares. Azimuth Capital holds 119,801 shares. Horrell Capital Management Inc accumulated 139 shares. Zuckerman Invest Limited Liability has invested 3.28% in International Business Machines Corporation (NYSE:IBM). Palisade Asset Management Ltd Liability holds 2.58% or 85,466 shares. North Point Portfolio Managers Corp Oh owns 0.04% invested in International Business Machines Corporation (NYSE:IBM) for 1,585 shares. Moreover, Verition Fund Ltd Liability Corp has 0.04% invested in International Business Machines Corporation (NYSE:IBM). Moreover, New York State Teachers Retirement Sys has 0.58% invested in International Business Machines Corporation (NYSE:IBM). 39,828 were reported by Tower Bridge Advisors.
Cadinha & Co Llc increased Amazon.Com Inc (NASDAQ:AMZN) stake by 579 shares to 11,096 valued at $10.74 million in 2017Q2. It also upped Microsoft Corp (NASDAQ:MSFT) stake by 7,015 shares and now owns 122,980 shares. Ishares Core Msci Pac (IPAC) was raised too.
Investors sentiment increased to 0.95 in Q2 2017. Its up 0.14, from 0.81 in 2017Q1. It is positive, as 54 investors sold Symantec Corporation shares while 167 reduced holdings. 65 funds opened positions while 146 raised stakes. 554.80 million shares or 1.02% less from 560.54 million shares in 2017Q1 were reported. Moreover, Bluemountain Cap Mgmt Ltd Liability Com has 1.52% invested in Symantec Corporation (NASDAQ:SYMC) for 2.61 million shares. Cambiar Limited Liability Corporation reported 0.58% of its portfolio in Symantec Corporation (NASDAQ:SYMC). Mutual Of America Mngmt Ltd invested 0.05% in Symantec Corporation (NASDAQ:SYMC). Meag Munich Ergo Kapitalanlagegesellschaft Mbh holds 18,795 shares or 0.02% of its portfolio. Guardian Life Insur Company Of America has 0.01% invested in Symantec Corporation (NASDAQ:SYMC) for 1,376 shares. Pictet Asset Mngmt Limited reported 2.70 million shares stake. Moreover, Nj State Employees Deferred Compensation Plan has 0.16% invested in Symantec Corporation (NASDAQ:SYMC). 7,082 are owned by Yakira Management. Regentatlantic Capital Lc holds 0.32% or 122,927 shares in its portfolio. 12,023 were accumulated by Glob X Mgmt Company Ltd Liability Corporation. 45,815 are held by Strs Ohio. Bp Public Limited Com accumulated 80,000 shares or 0.08% of the stock. Hodges holds 0.21% or 126,300 shares. 87,657 were reported by Calamos Ltd Liability Corporation. 257,203 are held by Avalon Advsrs Limited Liability Corp.
The post Symantec (SYMC) At $29.11 Forms Bottom; Cadinha & Co Has Cut By $328,644 Its Intl Business Machines (IBM) Position appeared first on Stock Market News | HillCountryTimes | Get it Today.
from Stock Market News | HillCountryTimes | Get it Today https://www.hillcountrytimes.com/2017/12/04/symantec-symc-at-29-11-forms-bottom-cadinha-co-has-cut-by-328644-its-intl-business-machines-ibm-position/
0 notes